From: Marius Vollmer <mvo@zagadka.de>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Improving the help interface
Date: Mon, 09 Aug 2004 22:47:33 +0200 [thread overview]
Message-ID: <877js811ju.fsf@zagadka.ping.de> (raw)
In-Reply-To: <1083942714.953.427.camel@localhost> (Andy Wingo's message of "Fri, 07 May 2004 16:11:56 +0100")
Andy Wingo <wingo@pobox.com> writes:
> I've been working a bit on the (help ...) interface. I'll explain why
> changes are needed, and what my proposed solution does.
Thanks, and sorry for the late answer. (I have now organized my mail
better so that I can reply from wherever I am, that should help a
bit...)
> [0] Pretty nifty screenshot:
> http://ambient.2y.net/soundscrape/shots/17-dec-2003.png
Cool!
> The attached patch implements "value help handlers" (as opposed to the
> former "variable help handlers" or such). A value help handler is a proc
> that takes a value. If it returns #f, help keeps looking for
> documentation, perhaps falling back on its normal behavior. If it
> returns a string, that string is taken to be its help. If it returns #t,
> it means that the help has been handled in some other way (graphically,
> perhaps), and `help' has nothing else to do.
I think it is better to separate the action of retrieving the help
text for some feature (value, variable, etc), and the action of
displaying it. Thus, a help-value-handler handler should not display
the help itself, it should just retrieve it. Different ways of
displaying help can be implemented by different versions of 'help',
say.
> Value help handlers are added with `add-value-help-handler!', and
> removed in a similar way.
What about using Goops for this? First, it would suffice to only talk
about 'the helpstring for a value': variables, procedures, macros etc
are all values. Then there would be two levels of dispatching, I'd
say: first on the type of the value, and the default method for that
is to ask a list of 'help sources' with a second generic function.
Like this, maybe:
(define-generic help-for-value)
(define-generic help-from-source)
(define help-sources ...)
(define-method (help-for-value (val <gtk-object>))
...get it from the gtk docs, say...)
(define-method (help-for-value val)
(find-if help-from-source help-sources))
(define-method (help-from-source (src <std-guile-doc-source>))
..use documentation-files ...)
> Thoughts? I'd like this in sometime soon. In the meantime I'm
> throwing it in my branch of guile-lib, with handlers for texinfo and
> stext in (text structured help).
As long as you can cleanly do this, I would prefer not to change the
guile help system in small ways. I think we should first write a
comprehensive documentation for it "This is how the Guile Help System
Should Work" and then implement it insofar as it differs from what we
have now.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2004-08-09 20:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-07 15:11 Improving the help interface Andy Wingo
2004-08-09 20:47 ` Marius Vollmer
2004-08-09 20:47 ` Marius Vollmer [this message]
2004-08-15 11:41 ` Andy Wingo
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877js811ju.fsf@zagadka.ping.de \
--to=mvo@zagadka.de \
--cc=guile-devel@gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).