git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] do not open editor in dumb terminal

From
AWAmos Waterland <apw@us.ibm.com>
Date
Feb 5, 2006, 00:37 UTC
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:
Show 11 quoted lines
> Amos Waterland <apw@us.ibm.com> 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.

Previous: Junio C HamanoNext: H. Peter Anvin
Message 3 of 9 in “do not open editor in dumb terminal”
  1. do not open editor in dumb terminalAmos Waterland, Feb 3, 2006
  2. Junio C HamanoFeb 3, 2006
  3. Amos WaterlandFeb 5, 2006
  4. H. Peter AnvinFeb 5, 2006
  5. Junio C HamanoFeb 5, 2006
  6. Daniel BarkalowFeb 5, 2006
  7. Junio C HamanoFeb 5, 2006
  8. Petr BaudisFeb 5, 2006
  9. Junio C HamanoFeb 6, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.