From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#4718: 23.1; C-h f gives doc for the wrong function Date: Wed, 14 Oct 2009 09:40:50 -0400 Message-ID: References: <4A14BB04EC704AE8AC77727C8363945A@us.oracle.com> <662D8A34F24B4D73ABAD8A7BE21766CC@us.oracle.com> Reply-To: Stefan Monnier , 4718@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255528102 24713 80.91.229.12 (14 Oct 2009 13:48:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Oct 2009 13:48:22 +0000 (UTC) Cc: 'Juanma Barranquero' , 4718@emacsbugs.donarmstrong.com To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 14 15:48:12 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1My4Cv-0003UQ-Gb for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Oct 2009 15:48:01 +0200 Original-Received: from localhost ([127.0.0.1]:45839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1My4Cu-00048B-VQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Oct 2009 09:48:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1My4CG-0003p4-2A for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 09:47:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1My4CB-0003nq-Bu for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 09:47:19 -0400 Original-Received: from [199.232.76.173] (port=46689 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1My4CA-0003nb-UI for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 09:47:15 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:32878) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1My4CA-0003cD-CW for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 09:47:14 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9EDlAiI003664; Wed, 14 Oct 2009 06:47:12 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n9EDj5e6003144; Wed, 14 Oct 2009 06:45:05 -0700 Resent-Date: Wed, 14 Oct 2009 06:45:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 14 Oct 2009 13:45:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4718 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4718-submit@emacsbugs.donarmstrong.com id=B4718.12555276582987 (code B ref 4718); Wed, 14 Oct 2009 13:45:04 +0000 Original-Received: (at 4718) by emacsbugs.donarmstrong.com; 14 Oct 2009 13:40:58 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.181]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9EDeuon002979 for <4718@emacsbugs.donarmstrong.com>; Wed, 14 Oct 2009 06:40:57 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYEAAdy1UpMCqsb/2dsb2JhbACBUddchC4Eh3U X-IronPort-AV: E=Sophos;i="4.44,557,1249272000"; d="scan'208";a="47538431" Original-Received: from 76-10-171-27.dsl.teksavvy.com (HELO pastel.home) ([76.10.171.27]) by ironport2-out.pppoe.ca with ESMTP; 14 Oct 2009 09:40:51 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id E67F87F5B; Wed, 14 Oct 2009 09:40:50 -0400 (EDT) In-Reply-To: <662D8A34F24B4D73ABAD8A7BE21766CC@us.oracle.com> (Drew Adams's message of "Tue, 13 Oct 2009 21:24:08 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 14 Oct 2009 09:47:19 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31922 Archived-At: > But we should not impose a regimental `ask' for this in general. > The problem does not exist for prefix completion. We should show you > the sole completion and ask for confirmation only when it does not > correspond to prefix completion. Non-basic completion is the only > case where there is really an element of surprise, confusion, and lack > of understanding. I disagree, the same problem exists for prefix completion. Maybe it's less frequent, but it exists nevertheless. Which brings us to the reason why we don't currently ask: choosing the wrong name is harmless because C-h f does not perform any dangerous operation that might lose you some work. >> For what it's worth I have a local patch that indirectly changes this >> behavior: it accepts any function name (even non-existing ones), >> requires confirmation for non-existing ones, and then tries to guess >> which file to load to find the function. > The problem is not non-existing functions. In that case, the current > code would still say `No match'. The problem is (a) treating > additional patterns as matches when combined with (b) RET. Reread what I wrote: I said "indirectly". It's related not for its functionality but because if we want to be able to accept non-existing functions, then RET can't perform completion any more. > I don't even think this is specific to `C-h f'. We should probably do > the same thing most of the time: make RET confirm when the completion > is not an obvious one (i.e. a suffix). That's almost already the case: it's fairly rare for Emacs completion to use this kind of strong `require-match'. Stefan