[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

eshell ansi colors, copyright q

From: Mark A. Hershberger
Subject: eshell ansi colors, copyright q
Date: Fri, 09 Mar 2007 12:26:25 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux)

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
+(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
    (add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color)

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]