Re: [PATCH] do not open editor in dumb terminal
- From
Petr Baudis <pasky@suse.cz>
- Date
- Feb 5, 2006, 17:44 UTC
- Message-ID
- <20060205174422.GG31278@pasky.or.cz>
- In-Reply-To
- <20060203114133.GA11499@kvasir.watson.ibm.com>
Dear diary, on Fri, Feb 03, 2006 at 12:41:33PM CET, I got a letter where Amos Waterland <apw@us.ibm.com> said that...
Show 8 quoted lines
> Many people run git from a shell in emacs (obtained by M-x shell). When > they try to do a commit without specifying a log message on the command > line with -m, git opens vi inside emacs, with unpleasant results. I > think the right answer is to just refuse to open an editor in any dumb > terminal. > > Signed-off-by: Amos Waterland <apw@us.ibm.com> > Cc: Dave C Boutcher <boutcher@cs.umn.edu>
Cogito solves this by [ -t ] and just doing cat instead of $EDITOR if the input is not a terminal. Couldn't Junio just do
emacsclient | cg^H^Hgit commit
in that case? (Note that I'm totally clueless about what emacsclient's usage actually is.)
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ Of the 3 great composers Mozart tells us what it's like to be human, Beethoven tells us what it's like to be Beethoven and Bach tells us what it's like to be the universe. -- Douglas Adams