all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: Help menu (was: Re: describe-bindings: ^L, bad order, naming)
Date: Fri, 18 Nov 2005 09:58:11 -0800	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICAEABCPAA.drew.adams@oracle.com> (raw)
In-Reply-To: <E1Ed9b5-0007Vf-5Z@fencepost.gnu.org>

    	type a key sequence (e.g. `C-M-s')
    	choose a menu item (e.g. [menu-bar files open-file])
    	click on a scroll bar
    	click on the mode line
    	click in the minibuffer
    	click on an Emacs-related name in a buffer: apropos is called
    	click anywhere else in a buffer: its modes are described

    It sounds like this does everything that C-x k does
    except in the case of clicking on the buffer contents.
    Is that right?

I'm not that familiar with the current C-x k. If it gives help on the
mode-line, minibuffer, and scroll-bar, then yes.

However, this gives a lot more info than what `describe-key' provides. It
tries to give a maximum of info, by using apropos, apropos-documentation
(both with apropos-do-all=t), and `Info-goto-emacs-key-command-node', in
addition to `describe-key'. The idea is essentially, "Find me all
information about ____".

         Help is generally provided using `describe-key' and the
         Emacs online manual (via `Info-goto-emacs-key-command-node').
         If no entry is found in the index of the Emacs manual, then
         the manual is searched from the
         beginning for literal occurrences of KEY.

    I don't quite understand.  How does it decide which one of these to do?
    Does it always try each of them?

The important thing is the general idea of providing something like this;
it's not important what my implementation does. Anyway, it does this:

The type of the object is tested and used to determine what help to gather.
If `describe-key' makes sense for the object (key, mode-line, menu-bar menu
item, mouse-menu menu item, etc.), then that is called. If
`Info-goto-emacs-key-command-node' also makes sense, then that is called
too. (The first info is in *Help*; the second in *Info*.) Specific objects
such as mode-line and minibuffer open the appropriate Info node directly.

If the object is a mouse click on text, then apropos-documentation is called
on symbol-at-point (with apropos-do-all bound to t). Next, apropos is called
on the symbol. (If apropos-documentation produced something, then buffer
*Apropos* is renamed to *Apropos Doc*.)

If a buffer is clicked, but not on text, then `describe-mode' is called.

A message tells you where to look for the help, depending on which sources
produced it:

 "`%s': summary in *Help* buffer; doc in *info* buffer."

 "`%s': summary in *Help* buffer."

 "`%s': doc in *info* buffer."

 "`%s' is undefined."

 "See *Apropos* and *Apropos Doc* buffers."

 "See information on `%s' in the *Apropos* buffer."

 "See information on `%s' in the *Apropos Doc* buffer."

 "No information found regarding `%s'."

 "Mode(s) of buffer `%s' are described in *Help* buffer."

Note: Some basic functions, such as `Info-goto-emacs-key-command-node', were
tweaked to return non-nil if Info doc is found. These are in library
info+.el, not help+.el.

`Info-goto-emacs-key-command-node' was also tweaked to call `Info-search' if
not found. That is, if the term can't be found in the index, then a literal
search for it is made.

The source code is here:
 http://www.emacswiki.org/cgi-bin/wiki/help%2b.el

 http://www.emacswiki.org/cgi-bin/wiki/info%2b.el

help+.el is only for Emacs 20. info+.el works with Emacs 22 too.

HTH.

  reply	other threads:[~2005-11-18 17:58 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-10 20:29 describe-bindings: ^L, bad order, naming David Reitter
2005-11-10 21:27 ` Drew Adams
2005-11-10 21:38   ` Lennart Borgman
2005-11-11  1:03     ` Robert J. Chassell
2005-11-11  2:55       ` Miles Bader
2005-11-11  9:18         ` Kim F. Storm
2005-11-11  7:43       ` David Reitter
2005-11-11  9:05         ` Eli Zaretskii
2005-11-11 10:20           ` Henrik Enberg
2005-11-13 20:54           ` Richard M. Stallman
2005-11-13 22:08             ` Eli Zaretskii
2005-11-13 23:13               ` David Reitter
2005-11-14  0:10                 ` Miles Bader
2005-11-14  0:19                   ` Lennart Borgman
2005-11-14  4:28                     ` Stefan Monnier
2005-11-14 15:35                       ` Lennart Borgman
2005-11-15  5:43                         ` Richard M. Stallman
2005-11-19 11:25                           ` Eli Zaretskii
2005-11-15  3:58                       ` Eli Zaretskii
2005-11-14  4:40                   ` Eli Zaretskii
2005-11-14 17:48                     ` Richard M. Stallman
2005-11-14 18:18                       ` Help menu (was: Re: describe-bindings: ^L, bad order, naming) David Reitter
2005-11-15  4:07                         ` Eli Zaretskii
2005-11-15  4:11                           ` Help menu Juri Linkov
2005-11-15 17:45                             ` Eli Zaretskii
2005-11-15 18:07                         ` Help menu (was: Re: describe-bindings: ^L, bad order, naming) Richard M. Stallman
2005-11-15 18:19                           ` Drew Adams
2005-11-15 18:15                         ` Drew Adams
2005-11-16 22:04                           ` Richard M. Stallman
2005-11-16 23:29                             ` Drew Adams
2005-11-18 17:00                               ` Richard M. Stallman
2005-11-18 17:58                                 ` Drew Adams [this message]
2005-11-18 18:21                                   ` Eli Zaretskii
2005-11-19 23:26                                     ` Richard M. Stallman
2005-11-19 23:44                                       ` Drew Adams
2005-11-19 23:26                                   ` Richard M. Stallman
2005-11-19 23:44                                     ` Drew Adams
2005-11-16 22:04                           ` Richard M. Stallman
2005-11-14 10:45                 ` describe-bindings: ^L, bad order, naming Jason Rumney
2005-11-11  8:54       ` Eli Zaretskii
2005-11-11  9:25       ` Eli Zaretskii
2005-11-11  8:51   ` Eli Zaretskii
2005-11-11 18:02     ` Drew Adams
2005-11-11 18:26       ` Eli Zaretskii
2005-11-11 20:47         ` Robert J. Chassell
2005-11-11  8:47 ` Eli Zaretskii
2005-11-11  9:33   ` David Reitter
2005-11-11 10:02     ` Eli Zaretskii
2005-11-11 10:17       ` David Reitter
2005-11-11 18:02   ` Drew Adams
2005-11-11 19:01     ` Eli Zaretskii
2005-11-11 19:10       ` Drew Adams
2005-11-11 20:49         ` Luc Teirlinck
2005-11-11 21:16           ` David Reitter
2005-11-11 21:26             ` Luc Teirlinck
2005-11-11 22:32               ` David Reitter
2005-11-11 22:42             ` Miles Bader
2005-11-11 23:40               ` David Reitter
2005-11-11 21:25           ` Drew Adams
2005-11-12  6:32           ` Eli Zaretskii
2005-11-12 12:28             ` Robert J. Chassell
2005-11-12 12:58               ` David Reitter
2005-11-12 14:28             ` Luc Teirlinck
2005-11-12 19:48               ` Eli Zaretskii
2005-11-12 20:20                 ` Miles Bader
2005-11-12  6:25         ` Eli Zaretskii
2005-11-12 13:56           ` Drew Adams
2005-11-11 19:13       ` Lennart Borgman
2005-11-13 20:54   ` Richard M. Stallman
2005-11-11 19:35 ` Juri Linkov
2005-11-11 21:01   ` David Reitter
2005-11-12 21:19     ` Juri Linkov
2005-11-12 21:41       ` Drew Adams
2005-11-12 21:53         ` Miles Bader
2005-11-12 23:09           ` Drew Adams
2005-11-12 23:23             ` Chong Yidong
2005-11-12 23:35               ` Drew Adams
2005-11-14  4:54           ` Richard M. Stallman
2005-11-14  0:55         ` Juri Linkov
2005-11-13 20:54 ` Richard M. Stallman
2005-11-13 21:16   ` Drew Adams
2005-11-13 21:23     ` Lennart Borgman
2005-11-13 23:06     ` David Reitter
2005-11-15  5:43       ` Richard M. Stallman
2005-12-29 17:11     ` Richard M. Stallman
2005-12-29 18:54       ` Stefan Monnier
2005-12-30  4:56         ` Richard M. Stallman
2005-12-30  5:09           ` Stefan Monnier
2005-12-30 10:39           ` Andreas Schwab
2005-12-30 22:11             ` Richard M. Stallman
2005-11-14 11:59   ` David Reitter
2005-11-14 14:27     ` Drew Adams
2005-11-15  5:43     ` Richard M. Stallman

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=DNEMKBNJBGPAOPIJOOICAEABCPAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.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.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.