Closed chris-martin closed 8 years ago
Hi,
Have you loaded eshell?
ELISP> (featurep 'eshell) t
ELISP> (describe-variable 'eshell-preoutput-filter-functions)
(button (t) category help-variable-def-button help-args (eshell-preoutput-filter-functions "/Users/johnny/emacs-24.5/share/emacs/24.5/lisp/eshell/esh-mode.el")) 410 419 (button (t) category help-customize-variable-button help-args (eshell-preoutput-filter-functions)))
Try: (require 'eshell) before using anything eshell-specific (such as said hook) if not.
Chris
On Thu, 31 Mar 2016 21:41:22 -0700, Chris Martin notifications@github.com wrote:
When I add the code from this project's readme to my config, emacs fails with this error:
Symbol's value as variable is void: eshell-preoutput-filter-functions
Emacs 24.5.2
Thanks. So the full config I ended up with is:
(require 'eshell)
(require 'xterm-color)
(add-hook 'eshell-mode-hook
(lambda () (progn
(setq xterm-color-preserve-properties t)
(setenv "TERM" "xterm-256color"))))
(add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter)
(setq eshell-output-filter-functions
(remove 'eshell-handle-ansi-color eshell-output-filter-functions))
Some people have the same issue, and the correct solution should be:
(with-eval-after-load 'esh-mode
(add-hook 'eshell-mode-hook
(lambda () (progn
(setq xterm-color-preserve-properties t)
(setenv "TERM" "xterm-256color"))))
(add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter)
(setq eshell-output-filter-functions
(remove 'eshell-handle-ansi-color eshell-output-filter-functions))
)
When I add the code from this project's readme to my config, emacs fails with this error:
Emacs 24.5.2