From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Help menu (was: Re: describe-bindings: ^L, bad order, naming) Date: Fri, 18 Nov 2005 09:58:11 -0800 Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1132357525 7864 80.91.229.6 (18 Nov 2005 23:45:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Nov 2005 23:45:25 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 19 00:45:04 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1EdAVa-0000G4-00 for ; Fri, 18 Nov 2005 18:58:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EdAVZ-0001TV-L3 for ged-emacs-devel@m.gmane.org; Fri, 18 Nov 2005 12:58:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EdAVP-0001TP-Ro for emacs-devel@gnu.org; Fri, 18 Nov 2005 12:58:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EdAVO-0001T6-7v for emacs-devel@gnu.org; Fri, 18 Nov 2005 12:58:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EdAVO-0001T2-3m for emacs-devel@gnu.org; Fri, 18 Nov 2005 12:58:34 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EdAVO-0002cR-9q for emacs-devel@gnu.org; Fri, 18 Nov 2005 12:58:34 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jAIIBWIh003355 for ; Fri, 18 Nov 2005 12:11:32 -0600 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jAIHwVpA020537 for ; Fri, 18 Nov 2005 10:58:31 -0700 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id jAIHwUBi020524 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 18 Nov 2005 10:58:31 -0700 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46243 Archived-At: 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.