unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: 12686@debbugs.gnu.org, "'Aaron S. Hawley'" <aaron.s.hawley@gmail.com>
Subject: bug#12686: PATCH: ambiguous help doc strings
Date: Thu, 25 Oct 2012 13:13:06 -0700	[thread overview]
Message-ID: <45567D843F264708B215C86AABDF77C3@us.oracle.com> (raw)
In-Reply-To: <jwvd3068ikn.fsf-monnier+emacs@gnu.org>

> > But if this is not done right away, why not at least do as
> > I suggested in the meantime: move the var-or-fn clause
> > first, so that if a symbol is both it gets treated as both.
> >
> > And that would seem to be appropriate anyway, even if you
> > also do as you suggest, to accommodate other symbols that do
> > not correspond to a minor-mode but which have both var and
> > fun definitions.  IOW, minor modes are not the only case
> > to consider, even if they are an important case.
> 
> If the docstring explicitly refers to the function, I see no 
> reason why Emacs should show both the function and the var.

1. What doc string ("the docstring")?  The fn has a doc string and so does the
var.

Perhaps you are talking about a (probably minority) case where one doc string
explicitly refers to the other, e.g., a fn doc string mentions the var or vice
versa, using a keyword (e.g. `variable').  If so, then yes, in that case there
is no _need_ to show both together, and it would be fine not to.

If you have an easy way of distinguishing that case, fine, it can be excluded.
If you have no easy way, do you really want to scan the string to see if it
mentions the same symbol preceded by a different keyword (e.g. `variable' or
`option', for a fun doc string)?


2. But even if you do not bother to exclude that case, and you show both doc
strings systematically, it's not a big deal.  Typically, one or the other
(usually the var) doc string is quite short.

For example, the minor-mode varible `icicle-mode' has only this (boilerplate) as
its doc (whereas the minor-mode function `icicle-mode' has a _long_ doc string):

  icicle-mode is a variable defined in `icicles-mode.el'.
  Its value is t
  Original value was nil

  Documentation:
  Non-nil if Icicle mode is enabled.
  See the command `icicle-mode' for a description of this minor mode.
  Setting this variable directly does not take effect;
  either customize it (see the info node `Easy Customization')
  or call the function `icicle-mode'.

 You can customize this variable.

And I think things are similar for most cases that are not minor modes.


3. If you really want to think about improving *Help* in a general way then I'd
suggest that the problem is not (within reason) the amount of info we provide
but inadequate organization of it.

For `C-h m' we have tried to impose at least some organization, but essentially
that amounts to only (a) a header line of links to (b) sequentially listed
"sections" that are Emacs pages.  Kind of like a 1990s FAQ web page with an
index/TOC at the top followed by all of the FAQs.

Those header links for `C-h m' are ugly (bold should be banned from Emacs
defaults, because it just doesn't work well for lots of faces), but they are
better than nothing.

Better might be a tabbed organization of the info.  For a symbol such as
`icicle-mode' there could be tabs for the command and the option, for example.
For `C-h m' there could be a major-mode tab and a tab for each minor mode.  Or
some such.

And there are other ways to organize info, besides tabs.

The point here really is that rather than getting excited about finding ways to
exclude some information we should start by including as much as might be
pertinent (fn, var, face,...) and then work on designing a better organized UI.






  reply	other threads:[~2012-10-25 20:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19 20:58 bug#12686: PATCH: ambiguous help doc strings Aaron S. Hawley
2012-10-23  8:04 ` Juri Linkov
2012-10-23 12:32   ` Stefan Monnier
2012-10-23 16:15     ` Drew Adams
2012-10-23 17:02       ` Stefan Monnier
2012-10-25 18:29         ` Drew Adams
2012-10-25 19:21           ` Stefan Monnier
2012-10-25 20:13             ` Drew Adams [this message]
2012-10-25 20:44               ` Aaron S. Hawley
2012-10-25 21:01                 ` Drew Adams
2012-10-25 21:11                   ` Aaron S. Hawley
2012-10-25 21:13                     ` Drew Adams
2012-10-26  1:40                   ` Stefan Monnier
2013-01-11 18:19                     ` Aaron S. Hawley
2013-01-11 23:09                       ` Stefan Monnier
2012-10-23 15:24   ` Aaron S. Hawley

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/emacs/

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

  git send-email \
    --in-reply-to=45567D843F264708B215C86AABDF77C3@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=12686@debbugs.gnu.org \
    --cc=aaron.s.hawley@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).