I’ve started a mini-series on Emacs comint as I feel it deserves a lot more love than it gets, considering how incredibly useful it is.
Last year, emacs-fu wrote about extending ansi-term. My own recent post on wrapping ansi-term goes even further, configuring the mouse to auto-copy on highlight and using ido to quickly and easily switch between multiple shell buffers.
Still on the
ansi-term topic, sadly it doesn’t work for me in windows. And by default,
M-x shell starts a DOS prompt. martinez has a fix for this in NTEmacs although the following works a little better for me in EmacsW32 1.58.
(setq explicit-bash-args '("--login" "-i")) (setq explicit-shell-file-name "c:/packages/cygwin/bin/bash") (setenv "SHELL" explicit-shell-file-name) (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)
I can’t think of a time I would like to keep trailing whitespace. However, if you need it, flameyes has a solution to selectively remove it or keep it under different directories subtrees. This nicely demonstrates
directory local variables (which have been mentioned by previous commenters on this blog).