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: "What's This?" in Describe submenu Date: Mon, 22 Aug 2005 09:37:43 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1124729331 8562 80.91.229.2 (22 Aug 2005 16:48:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Aug 2005 16:48:51 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 22 18:48:39 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E7FRz-0007nN-JT for ged-emacs-devel@m.gmane.org; Mon, 22 Aug 2005 18:47:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E7FVi-0005Io-Sr for ged-emacs-devel@m.gmane.org; Mon, 22 Aug 2005 12:50:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E7FV8-0005GA-1K for emacs-devel@gnu.org; Mon, 22 Aug 2005 12:50:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E7FV1-0005AT-T8 for emacs-devel@gnu.org; Mon, 22 Aug 2005 12:50:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E7FUs-00056b-3N for emacs-devel@gnu.org; Mon, 22 Aug 2005 12:50:06 -0400 Original-Received: from [148.87.122.30] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1E7FJZ-0004JQ-50 for emacs-devel@gnu.org; Mon, 22 Aug 2005 12:38:25 -0400 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by rgminet01.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id j7MGbirY005028 for ; Mon, 22 Aug 2005 10:37:44 -0600 Original-Received: from rgmsgw300.us.oracle.com (localhost [127.0.0.1]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j7MGbhlZ020791 for ; Mon, 22 Aug 2005 10:37:44 -0600 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id j7MGbhgB020786 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Mon, 22 Aug 2005 10:37:43 -0600 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: x-mimeole: Produced By Microsoft MimeOLE V6.00.2800.1506 Importance: Normal 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:42317 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:42317 In its current form, it does IN NO WAY resemble what a Windoze user would expect from the "What's this" function. When you click on the "What's this" function in Windoze (typically not available as a menu item, but as a [?] icon), the cursor changes shape to an arrow with a question mark, and then the user can (in principle) click on anything in the application window to get help for that item (typically an input field). So it gives help for _visible_items_, not key bindings! If we want to keep the "What's this" menu item, then we should implement it properly, and not provide something completely unrelated. FWIW, I wrote such a command - perhaps it can serve as food for thought. It works in Emacs 20 - I haven't yet ported it to 21. It does not change the mouse cursor to a question mark (I wasn't sure how to do that), but that would help indicate the usage. When the command is run, the prompt is "Click mouse on something or type a key sequence". The code is here: http://www.emacswiki.org/cgi-bin/emacs/help+.el. I place the command, called `help-on-click/key', in the Help > Describe submenu, and call it just "This" (so, Describe > This). Here is the doc string: Give help on a key/menu sequence or object clicked with the mouse. The object can be any part of an Emacs window or a name appearing in a buffer. You can do any of the following: 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 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. For example, the KEY `C-g' is not in the index (for some reason), so the manual is searched. (Once an occurrence is found, you can repeatedly type `s' in *Info* to search for additional occurrences.) If you click on a name in a buffer, then `apropos-documentation' and `apropos' are used to find information on the name. These functions are not used when you do something besides click on a name. If you click elsewhere in a buffer other than the minibuffer, then `describe-mode' is used to describe the buffer's current mode(s).