git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Pascal Obry <pascal@obry.net>,
	git@vger.kernel.org, Theodore Tso <tytso@mit.edu>,
	Jakub Narebski <jnareb@gmail.com>,
	Alex Riesen <raa.lkml@gmail.com>, Andreas Ericsson <ae@op5.se>,
	Matthieu Moy <Matthieu.Moy@imag.fr>,
	Eric Wong <normalperson@yhbt.net>
Subject: Re: [PATCH 1/3] git-help: add -i|--info option to display info page.
Date: Mon, 3 Dec 2007 06:53:14 +0100	[thread overview]
Message-ID: <200712030653.15694.chriscool@tuxfamily.org> (raw)
In-Reply-To: <7vodd9zbvt.fsf@gitster.siamese.dyndns.org>

Le dimanche 2 décembre 2007, Junio C Hamano a écrit :
> Pascal Obry <pascal@obry.net> writes:
> >
> > If would be nice if this could be more generic. For example I'd like to
> > use Emacs woman mode instead of info. Can't we have something like
> >
> >    $ git help --ext XXX
> >
> > "ext" standing for external and calling whatever command recorded into
> > .gitconfig for example ?
>
> There is a bit of conflict here.  We could do that and make the
> implementation of "ext" command responsible to transform "commit" in
>
> 	$ git help --ext commit
>
> to the location of manual page (or formatted HTML page, or node in the
> info documentation).  git itself does not need to know much about where
> the help material is in such an implementation.
>
> But Christian's series is about making such "ext" thing easier to write.
> No matter what kind of web browser is used, it needs to be told where
> the preformatted HTML page for git-commit command is (and it does not
> care where git-commit.1 manpage is found or what the node is called in
> git.info document).  It makes it a bit too limiting by defining -w (web)
> and -i (info) upfront without offering -x (ext), but we need to start
> somewhere.

Yeah, I think that the user should be able to choose both the format and the 
tool used for help pages. And that we should start to make more popular 
formats and tools work well first. That means HTML with web browser first.
(And yeah, my first patch is about "info", but it was a very low hanging 
fruit.)

In the end we may want to support many other tools and format. For example:

"git help --format=man --tool=konqueror log" or
"git help -m --tool=konqueror log"

would launch something like: "konqueror 'man:git-log(1)'"

But of course, to be able to do that, we have to know how each tool is 
working, because the syntax has a good chance to be different in each case.

If we provide a -x|--ext upfront and we don't check if we know about the 
tool the user wants to use, then we will not get information about how to 
properly use the tool and we may break without any meaningfull error for 
many of them.

So if someone has information about how "woman" or other web or man or info 
browser can be used, I will be glad to collect it and eventually use it to 
try to make "git help" work for the tool (though I don't promise to test 
them on platform other than Linux), but I will focus on web formats and 
tools first. Patches are welcome too. 

Thanks in advance,
Christian.

  reply	other threads:[~2007-12-03  5:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-02  5:07 [PATCH 1/3] git-help: add -i|--info option to display info page Christian Couder
2007-12-02  8:54 ` Pascal Obry
2007-12-02  9:25   ` Junio C Hamano
2007-12-03  5:53     ` Christian Couder [this message]
2007-12-03 18:45       ` Pascal Obry
2007-12-04  5:54         ` Christian Couder

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=200712030653.15694.chriscool@tuxfamily.org \
    --to=chriscool@tuxfamily.org \
    --cc=Matthieu.Moy@imag.fr \
    --cc=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=normalperson@yhbt.net \
    --cc=pascal@obry.net \
    --cc=raa.lkml@gmail.com \
    --cc=tytso@mit.edu \
    /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).