Bug 19736 - eshell should set EDITOR (at least, when needed)
Summary: eshell should set EDITOR (at least, when needed)
Status: CLOSED NOTABUG
Alias: None
Product: Branch 4.1
Classification: Distributions
Component: emacs22-common (show other bugs)
Version: unspecified
Hardware: all Linux
: P3 normal
Assignee: Eugene Vlasov
QA Contact: qa-4.1@altlinux.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-23 18:09 MSD by Ivan Zakharyaschev
Modified: 2009-04-23 23:11 MSD (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2009-04-23 18:09:18 MSD
emacs22-common-22.2-alt5

It would be convenient if eshell set EDITOR=emacsclient (at least if EDITOR is initially unset, or perhaps better always).

Then, in the following case, the message could be edited in an Emacs buffer, when "git commit" is called in eshell: 

~/.ssh $ git commit
Terminal is dumb but no VISUAL nor EDITOR defined.
Please supply the message using either -m or -F option.
~/.ssh $
Comment 1 Eugene Vlasov 2009-04-23 23:11:35 MSD
There is several ways to do that:

1. Set EDITOR variable in your session (or just run emacs as "EDITOR=emacsclient emacs").
2. Use something like

(add-hook 'eshell-mode-hook
         '(lambda () (setenv "EDITOR" "emacsclient")))

in your init-file
3. Or use M-x shell (M-x term) (and set this variable in ~/.emacs_SHELLNAME).