From: Amos Waterland Date: Sun, 05 Feb 2006 00:37:41 GMT Subject: Re: [PATCH] do not open editor in dumb terminal Message-ID: <20060205003741.GB29021@kvasir.watson.ibm.com> In-Reply-To: <7vu0bgdxmh.fsf@assigned-by-dhcp.cox.net> On Fri, Feb 03, 2006 at 11:56:54AM -0800, Junio C Hamano wrote: > Amos Waterland writes: > > 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. > > No, please don't. > > I run 'git commit' from M-x shell or M-x compile. My EDITOR is > set to 'emacsclient' while inside Emacs. If your TERM is set to `emacs' then that is fine. If it is set to `dumb' however, that seems a bit strange. A dumb terminal is usually understood to be one that does not have the ability to interpret control sequences. The reason I sent the patch is that people get a rather unpleasant introduction to git when vi splatters control characters all over their emacs session when they do their first commit. I agree that people probably should have their EDITOR set to emacsclient though, so if you want to just leave the code as is that's cool with me.