git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mike Ralphson" <mike.ralphson@gmail.com>
To: git@vger.kernel.org
Subject: Re: call external editor from git-gui?
Date: Thu, 16 Aug 2007 08:59:41 +0100	[thread overview]
Message-ID: <e2b179460708160059x90b0187g30f50784fbe6ac87@mail.gmail.com> (raw)
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:
> 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).

      reply	other threads:[~2007-08-16  7:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 15:30 call external editor from git-gui? Karl Hasselström
2007-08-14  4:55 ` Shawn O. Pearce
2007-08-14  7:00   ` Karl Hasselström
2007-08-15 18:22     ` Jan Hudec
2007-08-15 18:31       ` Uwe Kleine-König
2007-08-15 18:38       ` David Kastrup
2007-08-16  7:59         ` Mike Ralphson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2b179460708160059x90b0187g30f50784fbe6ac87@mail.gmail.com \
    --to=mike.ralphson@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).