git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: "Rodrigo Silva \(MestreLion\)" <linux@rodrigosilva.com>,
	git@vger.kernel.org, Ben Walton <bwalton@artsci.utoronto.ca>
Subject: Re: [PATCH 2/2] var doc: advertise current DEFAULT_PAGER and DEFAULT_EDITOR settings
Date: Sat, 31 Mar 2012 10:55:06 -0700	[thread overview]
Message-ID: <7v1uo8k64l.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20120331084453.GE4119@burratino> (Jonathan Nieder's message of "Sat, 31 Mar 2012 03:44:53 -0500")

Jonathan Nieder <jrnieder@gmail.com> writes:

> Document the default pager and editor chosen at compile time in the
> git-var(1) manpage so users curious about what command _this_ copy of
> git will fall back to when EDITOR, VISUAL, and PAGER are unset can
> find the answer quickly.
>
> In builds leaving those settings uncustomized, this patch makes the
> manpage continue to say "usually vi" and "usually less" so the
> formatted documentation is usable for a wide audience including users
> of custom builds that change those settings.  If you would like your
> copy of the docs to be less noncommittal, you will need to set
> DEFAULT_PAGER=less and DEFAULT_EDITOR=vi explicitly.
>
> Suggested-by: Junio C Hamano <gitster@pobox.com>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> Thanks for reading.

Thanks for a patch.

I think the Makefile patch to use "-a" takes the right approach (assuming
that the name of the EDITOR/PAGER won't have funny character that would
trip up AsciiDoc, which I think is a reasonably assumption), but I think
even the customized package should say what it is "usually" set on other
people's systems.

In other words, instead of:

>      `$VISUAL`, then `$EDITOR`, and then the default chosen at compile
> +ifndef::git-default-editor[]
>      time, which is usually 'vi'.
> +endif::git-default-editor[]
> +ifdef::git-default-editor[]
> +    time ('{git-default-editor}').
> +endif::git-default-editor[]

something like:

	... then the default chosen at compile time, which is usually 'vi'.
ifdef::git-default-editor[]
	The build you are using chose '{git-default-editor}' as the default.
endif::git-default-editor[]

may be less confusing.

  reply	other threads:[~2012-03-31 17: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 ` [PATCH] Documentation: replace 'vi' for 'editor' to reflect build-time option Jonathan Nieder
2012-03-30  2:16   ` 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 [this message]
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=7v1uo8k64l.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=bwalton@artsci.utoronto.ca \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --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).