git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Rodrigo Silva (MestreLion)" <linux@rodrigosilva.com>
Cc: git@vger.kernel.org, Ben Walton <bwalton@artsci.utoronto.ca>
Subject: Re: [PATCH] Documentation: replace 'vi' for 'editor' to reflect build-time option
Date: Thu, 29 Mar 2012 19:55:23 -0500	[thread overview]
Message-ID: <20120330005523.GA28519@burratino> (raw)
In-Reply-To: <20120330002543.2138.91961.reportbug@localhost6.localdomain6>

Hi Rodrigo,

Rodrigo Silva (MestreLion) wrote:

> git-var(1) did not say that hardcoded fallback 'vi' may have been changed
> at build time. A user could be puzzled if 'nano' pops up even when none of the
> mentioned environment vars or config.editor are set.
>
> Ideally, the build system should be changed to reflect the chosen fallback
> editor when creating the man pages. Not sure if that is even possible though.

Good catch.

Filling in the blank at compile time would be possible, but I'm not
convinced it's a good idea.  Wouldn't the same user be just as puzzled
when

  http://git.kernel.org/?p=git/git-htmldocs.git;a=blob_plain;f=git-var.html

(or whatever page with a nicer URL arises to replace the old
www.kernel.org/...  pages) says the fallback is 'vi' and git behaves
differently?

How about something like this?

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Context: http://bugs.debian.org/666250

 Documentation/git-var.txt |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git i/Documentation/git-var.txt w/Documentation/git-var.txt
index 5317cc24..beef9e28 100644
--- i/Documentation/git-var.txt
+++ w/Documentation/git-var.txt
@@ -43,13 +43,15 @@ GIT_EDITOR::
     `$SOME_ENVIRONMENT_VARIABLE`, `"C:\Program Files\Vim\gvim.exe"
     --nofork`.  The order of preference is the `$GIT_EDITOR`
     environment variable, then `core.editor` configuration, then
-    `$VISUAL`, then `$EDITOR`, and then finally 'vi'.
+    `$VISUAL`, then `$EDITOR`, and then the default chosen at compile
+    time, which is usually 'vi'.
 
 GIT_PAGER::
     Text viewer for use by git commands (e.g., 'less').  The value
     is meant to be interpreted by the shell.  The order of preference
     is the `$GIT_PAGER` environment variable, then `core.pager`
-    configuration, then `$PAGER`, and then finally 'less'.
+    configuration, then `$PAGER`, and then the default chosen at
+    compile time (usually 'less').
 
 Diagnostics
 -----------
-- 

       reply	other threads:[~2012-03-30  0:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120330002543.2138.91961.reportbug@localhost6.localdomain6>
2012-03-30  0:55 ` Jonathan Nieder [this message]
2012-03-30  2:16   ` [PATCH] Documentation: replace 'vi' for 'editor' to reflect build-time option Junio C Hamano
2012-03-30 10:33     ` Bug#666250: " Rodrigo Silva
     [not found]     ` <20120330103326.272B040A067@cobalt.pobox.com>
2012-03-30 16:46       ` Junio C Hamano
2012-03-31  8:40     ` [PATCH 0/2] " Jonathan Nieder
2012-03-31  8:42       ` [PATCH 1/2] var doc: default editor and pager are configurable at build time Jonathan Nieder
     [not found]         ` <4f76de0e.2ac7b60a.54ce.ffffd85eSMTPIN_ADDED@mx.google.com>
2012-03-31 10:51           ` Jonathan Nieder
2012-03-31  8:44       ` [PATCH 2/2] var doc: advertise current DEFAULT_PAGER and DEFAULT_EDITOR settings Jonathan Nieder
2012-03-31 17:55         ` Junio C Hamano
2012-04-18 20:02           ` Jonathan Nieder
2012-03-31 20:29     ` [PATCH] Documentation: replace 'vi' for 'editor' to reflect build-time option Phil Hord

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=20120330005523.GA28519@burratino \
    --to=jrnieder@gmail.com \
    --cc=bwalton@artsci.utoronto.ca \
    --cc=git@vger.kernel.org \
    --cc=linux@rodrigosilva.com \
    /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).