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

Re: call external editor from git-gui?

From
Mike Ralphson <mike.ralphson@gmail.com>
Date
Aug 16, 2007, 07:59 UTC
Message-ID
<e2b179460708160059x90b0187g30f50784fbe6ac87@mail.gmail.com>
In-Reply-To
<86ir7g4p92.fsf@lola.quinscape.zz>

It seems quite common to have a trio of environment variables: $EDITOR, $VISUAL and $XEDITOR, for line, tty-aware and graphical editors respectively.

[http://xdvi.sourceforge.net/inverse-search-emacs-noauctex.html] [http://lists.osuosl.org/pipermail/darcs-users/2006-December/010783.html]

Whether git needs to have a trio of overrides for them is a different matter, or could just recommend that git be aliased or wrapped if the editors needed for git are different to normal.

Cheers, Mike
On 8/15/07, David Kastrup <dak@gnu.org> wrote:
Show 14 quoted lines
> The usual convention (though _very_ hard to find anywhere explicitly,
> so it might more often than not be ignored) is that $VISUAL points to
> an editor that requires a tty to work on, while $EDITOR might get
> along without one.
>
> So one uses VISUAL in preference of EDITOR on ttys/proper terminals,
> but only EDITOR when without one.  A call from git-gui would probably
> fall in the second category.  A call from tig, in contrast, in the
> first category.
>
> The GIT_EDITOR variable has no way of expressing this difference,
> though.  And I doubt that many people remember this.  I googled around
> but failed to come up with a useful reference (of course, both
> variable names being common words does not exactly help).
Previous: David Kastrup
Message 7 of 7 in “call external editor from git-gui?”
  1. Karl HasselströmAug 10, 2007
  2. Shawn O. PearceAug 14, 2007
  3. Karl HasselströmAug 14, 2007
  4. Jan HudecAug 15, 2007
  5. Uwe Kleine-KönigAug 15, 2007
  6. David KastrupAug 15, 2007
  7. Mike RalphsonAug 16, 2007

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.