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

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 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.