From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Minor bug in help+ libraries Date: Wed, 7 Sep 2011 06:48:50 -0700 Message-ID: <0478B86DD78D4AA2968FBC5CBB69047D@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1315403373 27432 80.91.229.12 (7 Sep 2011 13:49:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2011 13:49:33 +0000 (UTC) To: "'suvayu ali'" , "'Emacs mailing list'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 07 15:49:30 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R1IVL-0007fH-Ne for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Sep 2011 15:49:28 +0200 Original-Received: from localhost ([::1]:34222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1IVL-0007yX-7v for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Sep 2011 09:49:27 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1IVH-0007yS-1h for help-gnu-emacs@gnu.org; Wed, 07 Sep 2011 09:49:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1IVF-0000HL-O1 for help-gnu-emacs@gnu.org; Wed, 07 Sep 2011 09:49:23 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:55520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1IVF-0000HA-Fo for help-gnu-emacs@gnu.org; Wed, 07 Sep 2011 09:49:21 -0400 Original-Received: from rtcsinet21.oracle.com (rtcsinet21.oracle.com [66.248.204.29]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p87DnHO8031994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 7 Sep 2011 13:49:19 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rtcsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p87DnGNa001742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Sep 2011 13:49:17 GMT Original-Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p87DnBSm023256; Wed, 7 Sep 2011 08:49:11 -0500 Original-Received: from dradamslap1 (/10.159.32.74) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 07 Sep 2011 06:49:10 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcxtRr1rI0o/dRRgQ2Oc6VaZEFcA9wAHCrJQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: rtcsinet21.oracle.com [66.248.204.29] X-CT-RefId: str=0001.0A090208.4E67765F.0165,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82175 Archived-At: > I think I found a small bug in the help+ libraries. When in a lisp > buffer the point is on a variable or function, hitting C-h f or C-h v > doesn't show the default choice is the function/variable at point. > However hitting RET without entering any text takes you to the correct > documentation. Yes, it's actually a feature, not a bug. :-) Use `M-n' if you need to see the default value. If you really want to see the default value in the prompt, then do surgery on the definitions of `describe-function' and `describe-variable', to replace the prompts in their calls to `completing-read'. Just compare the `completing-read' calls in `help-fns.el' (vanilla) and `help-fns+.el': vanilla (what you like): (if fn (format "Describe function (default %s): " fn) "Describe function: ") + (what I like): (if current-prefix-arg "Describe command: " "Describe function: ") You would replace each of those prompt strings by a conditional such as the one in help-fns.el. --- [FWIW, I use Icicles, which lets the _user_ decide whether to put the default value in the prompt. That's one reason I do not hard-code it into prompts. Option `icicle-default-value': nil - Do not insert default value or add it to prompt. t - Add default value to prompt. Do not insert it. `insert-start' - Insert default value and leave cursor at start. `insert-end' - Insert default value and leave cursor at end. `preselect-start' - Insert and preselect default value; leave cursor at beginning. `preselect-end' - Insert and preselect default value; leave cursor at end. The default value is `t', which gives the behavior you like. Personally, I use the value `insert-end'.]