From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#18643: 25.0.50; elisp--expect-function-p Date: Fri, 10 Oct 2014 07:56:40 +0400 Message-ID: <543758F8.2000207@yandex.ru> References: <86oatmq7lc.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1412913455 13268 80.91.229.3 (10 Oct 2014 03:57:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Oct 2014 03:57:35 +0000 (UTC) Cc: 18643@debbugs.gnu.org To: Leo Liu , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 10 05:57:28 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XcRKa-0005us-39 for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Oct 2014 05:57:28 +0200 Original-Received: from localhost ([::1]:46079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcRKZ-0005YS-RH for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Oct 2014 23:57:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcRKP-0005YK-NI for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 23:57:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcRKA-0006S5-OW for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 23:57:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcRKA-0006Ry-LI for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 23:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XcRKA-0001I0-6s for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 23:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Oct 2014 03:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18643 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18643-submit@debbugs.gnu.org id=B18643.14129134054923 (code B ref 18643); Fri, 10 Oct 2014 03:57:02 +0000 Original-Received: (at 18643) by debbugs.gnu.org; 10 Oct 2014 03:56:45 +0000 Original-Received: from localhost ([127.0.0.1]:39634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcRJs-0001HK-VH for submit@debbugs.gnu.org; Thu, 09 Oct 2014 23:56:45 -0400 Original-Received: from mail-la0-f49.google.com ([209.85.215.49]:64261) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcRJq-0001HA-KP for 18643@debbugs.gnu.org; Thu, 09 Oct 2014 23:56:43 -0400 Original-Received: by mail-la0-f49.google.com with SMTP id q1so2393066lam.22 for <18643@debbugs.gnu.org>; Thu, 09 Oct 2014 20:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=dak1gtdaBldKsS+i/mS+kP9ckEuTvAMGM44e+RmgJ9A=; b=ZINMfspVbhli2pK6mOhphCxDy2bfx7NW19ZLniznbSFlVf1jU/xY/YA7JfM87z94Aj Y4Gyvm7XZhsm88A7sRPe7Qa2XeSySkvzjyy57h5rE9UGjJBnQV/7xyVLqt7g9QghLoCd tjlICFgVHhGssWzEgiSteB/A9BXJ+jqCVBe8DhexYECc6SX3qXJfHKQ3qChcLrWNlW0o NWj4/t8BYDYISMpnHrLWMmi827w0cSsJqZ7wHXidlGSbqhMAmEec4w+xAUiMCghqvXfu 1RgPlgxAEEjRNoe7LgwmHRlDCGVMJNGENvbR+EsXySeA9crO0+TkdiVCKuZpZxkgMtqy DUtQ== X-Received: by 10.152.204.43 with SMTP id kv11mr1673401lac.25.1412913401458; Thu, 09 Oct 2014 20:56:41 -0700 (PDT) Original-Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id pd6sm1458942lbb.5.2014.10.09.20.56.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Oct 2014 20:56:41 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94364 On 10/10/2014 03:43 AM, Leo Liu wrote: > Is it possible to use weight or priority i.e. the context decided > doesn't cut completion space to a subset but instead prioritise those > fit into the context by putting them at the front. Or find a way to > allow other completions to show up when the input matches none of the > subset. It wouldn't be the worst approach, but we should be able to do better. > Also could we not force users to insert ` before any completion in > strings or comments. Please don't ignore the available information about why things work as they do currently. Have you looked at the revision that introduced that change? Do you have anything to add to the discussion in the related bug? > BTW, this is what happens when false negative hits: > > 1. If I remember the completion and it is short I type it output but > often I double check with C-h f or C-h v to make sure it is correct. > > 2. When it is long or I don't remember I have to use C-h f or C-h v and > copy it over from the *Help* buffer. > > The cost is high and painful. Personally, I use `hippie-expand' as an escape hatch, in the rare cases I have this problem. It might be painful sometimes, but I don't think it's frequent. Here's what happens because of false positives: 1. Write some function call, need to pass in a dynamic variable, invoke completion. Yeah, this one looks kinda right. `eval-defun', run... Nope! This one was just a poorly named function. 2. The reverse, for a symbol in funcall position. 3. Type a short prefix, invoke completion. Get a myriad things to sort through. So, with code completion working this way you also have to use C-h f and C-h v more often than you might have had to otherwise, if only to verify that your code makes sense.