From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: mah@everybody.org (Mark A. Hershberger) Newsgroups: gmane.emacs.devel Subject: eshell ansi colors, copyright q Date: Fri, 09 Mar 2007 12:26:25 -0500 Message-ID: <87wt1qib0e.fsf@everybody.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173461241 6462 80.91.229.12 (9 Mar 2007 17:27:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Mar 2007 17:27:21 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 09 18:27:17 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HPis7-0007E7-9J for ged-emacs-devel@m.gmane.org; Fri, 09 Mar 2007 18:27:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPisQ-0008C2-Dc for ged-emacs-devel@m.gmane.org; Fri, 09 Mar 2007 12:27:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HPisD-0008At-5e for emacs-devel@gnu.org; Fri, 09 Mar 2007 12:27:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HPisB-0008A1-Q3 for emacs-devel@gnu.org; Fri, 09 Mar 2007 12:27:20 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPisB-00089r-ID for emacs-devel@gnu.org; Fri, 09 Mar 2007 12:27:19 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HPirp-0003W5-Qm for emacs-devel@gnu.org; Fri, 09 Mar 2007 12:26:58 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HPire-0002YO-7w for emacs-devel@gnu.org; Fri, 09 Mar 2007 18:26:46 +0100 Original-Received: from 24.115.83.248.res-cmts.eph.ptd.net ([24.115.83.248]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Mar 2007 18:26:46 +0100 Original-Received: from mah by 24.115.83.248.res-cmts.eph.ptd.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Mar 2007 18:26:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 24.115.83.248.res-cmts.eph.ptd.net X-URL: http://mah.everybody.org/weblog/ User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux) Cancel-Lock: sha1:dSRn5muDUmOIwvGYSHpeVFIcBtg= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67635 Archived-At: Question: Is this sufficiently short/different/obvious that it doesn't require a copyright assignment? After reading on http://www.emacswiki.org/cgi-bin/wiki/EshellColor that eshell doesn't handle ansi colors properly, I would like to add the following to eshell/esh-mode.el: --- esh-mode.el 09 Mar 2007 12:11:17 -0500 1.27 +++ esh-mode.el 09 Mar 2007 12:20:17 -0500 @@ -1078,6 +1078,13 @@ (custom-add-option 'eshell-output-filter-functions 'eshell-handle-control-codes) +(defun eshell-handle-ansi-color () + (ansi-color-apply-on-region eshell-last-output-start + eshell-last-output-end)) + +(custom-add-option 'eshell-output-filter-functions + 'eshell-handle-ansi-color) + ;;; Code: ;;; arch-tag: ec65bc2b-da14-4547-81d3-a32af3a4dc57 The emacswiki page contains the following snip which I adapted above: (defun eshell-handle-ansi-color () (ansi-color-apply-on-region eshell-last-output-start eshell-last-output-end)) (add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color) -- http://hexmode.com/ GPG Fingerprint: 7E15 362D A32C DFAB E4D2 B37A 735E F10A 2DFC BFF5 The most beautiful experience we can have is the mysterious. -- Albert Einstein, The World As I See it