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

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

From
Junio C Hamano <junkio@cox.net>
Date
Feb 3, 2006, 19:56 UTC
Message-ID
<7vu0bgdxmh.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060203114133.GA11499@kvasir.watson.ibm.com>
Amos Waterland <apw@us.ibm.com> writes:
Show 5 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.
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.

As a matter of fact, I do almost all my work inside Emacs and this setting works rather well for not only git but for other people's commands (like 'cvs commit').

It might be an option not to fall back on vi and instead to fall back on ed/ex when neither EDITOR nor VISUAL is specified and the terminal is dumb. But the patch as-is is unacceptable.

Previous: Amos WaterlandNext: Amos Waterland
Message 2 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.