From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Liu Newsgroups: gmane.emacs.bugs Subject: bug#18643: 25.0.50; elisp--expect-function-p Date: Thu, 09 Oct 2014 11:31:13 +0800 Message-ID: References: <86oatmq7lc.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412825549 23013 80.91.229.3 (9 Oct 2014 03:32:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Oct 2014 03:32:29 +0000 (UTC) Cc: 18643@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 09 05:32:21 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 1Xc4Si-0005vs-Pb for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Oct 2014 05:32:21 +0200 Original-Received: from localhost ([::1]:39716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xc4Si-00056m-5e for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Oct 2014 23:32:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xc4SY-00055U-CZ for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2014 23:32:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xc4SQ-0003GC-ML for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2014 23:32:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xc4SQ-0003G8-JE for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2014 23:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xc4SP-0006L5-MT for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2014 23:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Oct 2014 03:32:01 +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.141282548324315 (code B ref 18643); Thu, 09 Oct 2014 03:32:01 +0000 Original-Received: (at 18643) by debbugs.gnu.org; 9 Oct 2014 03:31:23 +0000 Original-Received: from localhost ([127.0.0.1]:38392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xc4Rm-0006K7-P5 for submit@debbugs.gnu.org; Wed, 08 Oct 2014 23:31:23 -0400 Original-Received: from mail-ig0-f176.google.com ([209.85.213.176]:46155) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xc4Rj-0006Jy-Ue for 18643@debbugs.gnu.org; Wed, 08 Oct 2014 23:31:20 -0400 Original-Received: by mail-ig0-f176.google.com with SMTP id hn15so10347142igb.9 for <18643@debbugs.gnu.org>; Wed, 08 Oct 2014 20:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=waWbbPhW2Wd4DkgPxF0WPuw0Q4IDjrjSHUQHIh190CQ=; b=Sps5CGuQPkvAqXzG4lB3zyM7oF9/mG9bXsHRZTMQoOjx9WEKvYPzNOF0Ujz2NOY4b+ hWUkuBA7tEtXs2KRDL3T5PvYY0mg/KbZaAda/PwWGV87I326+GpJvoaKhkj5jfcH53Jr a6F0B3QZnkUvUerNnCkhSglTuRk7XAWMTt7aOaurLXrQfzQZMO4Bq04Mdin7yyTZpK+m OAoaoyAxaZqw3lupel9+CmlK3aAidu2JhNYzRAkMPip6LV0K2+yytj1YNI/8cOxUkfAd OA//o5t9e+ibriGL3hgbfwEqIve/hOxIlmbP61HPmF3K6YoI0b3y1UCiXAbC/gh4AdQx wMVg== X-Received: by 10.50.36.74 with SMTP id o10mr3892442igj.45.1412825478944; Wed, 08 Oct 2014 20:31:18 -0700 (PDT) Original-Received: from fortuna ([221.222.150.213]) by mx.google.com with ESMTPSA id w8sm1536691igz.1.2014.10.08.20.31.16 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 08 Oct 2014 20:31:18 -0700 (PDT) Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAElBMVEUAAAAAAP+LRRP0pGC+ vr7///+7mT1iAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMO DhglKe4AAAEsSURBVCjPbZNBboQwDEV/Cd4X9QJRThApmn0XYW+Jyf2v0m+HhqDBgiAe9rcTG7QH w/1Vn2Ar8gBb/ocywSN3qK9T3z4eFDB4eApocBpeBs1RSykoJd8gQcm8pGmHXFso3ajnmsqV0TnY DQkOfXUfN5NwaI7AWTVOyEhcu1aHmdWItHddUVUcUgUBCkitu8V6ditHVOVdqzl2EQ1ZVGTbdK0V 7cqn8vWzoU5Q/bF9Y/Y0cRU1xwkys5dJ+Dt6pBDWifcNQml8Gh2JVmPSoQzo7en0grswkxrUGYJ7 0hSxxAGr7ZMwYcHIzprpi7TENEE1xtiYxixRlCfPBsUUrwHD7uGIwATrbnODJcVrPpVn3hxiGloe m/S+z3CtuzUSMo83N4DPH+F0evwR3P4A2k+75838OKQAAAAASUVORK5CYII= In-Reply-To: <86oatmq7lc.fsf@yandex.ru> (Dmitry Gutov's message of "Thu, 09 Oct 2014 06:50:55 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (CentOS 6.5) 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:94321 On 2014-10-09 06:50 +0400, Dmitry Gutov wrote: > IME, context-sensitive completion is useful, and people like it. I agree. > Narrowing down the list of possible completions is often quite useful, > especially when it can turn 2-3 completions into just one, which can be > inserted with one key. I think we can sacrifice completion in certain > rare cases to retain this advantage in general. It is the false negatives that kill its usefulness in the case of elisp. For example, (ert-deftest |) and (defun |) no longer have the completions I need. >> For example, one might need to create a variable name based on a >> function name. > > I'm pretty sure writing a new variable definition is a much less > frequent operation than referring to a variable in a function, or > writing a function call. And code completion is most useful when one is > referring to existing variables and functions. I won't jump to such conclusions so soon. You are guessing users' editing habits too much. > If you care to enumerate the main problem cases, and how they fail, it > shouldn't be too hard to add support for them. But of course, we'll > continue to have false negatives in some cases, like third-party macros. What is hard is having a good algorithm to determine completion types correctly. Unfortunately what we have has too many false negatives. I'd much prefer offering multiple candidates instead of showing no completions and with completion-cycling I can get to most completions in under a second. >> I have experienced annoyances here and there and I think the fundamental >> solution is not to second guess but complete liberally as we did before. > > That suggestions sounds like giving up to me. > > For what you're describing, you might like dabbrev-style completion, or > a simple function that looks up symbols in obarray. If you're not using > company-mode, maybe try porting company-dabbrev-code to > completion-at-point-functions, and use that. > > I haven't spent a lot of time using the current trunk, but the recent > changes replicate the logic from company-elisp, and I quite liked it > (before it was deprecated in favor of company-capf). I haven't seen many > complaints about function-variable separation there. > > That backend does have a `company-elisp-detect-function-context' user > option (so that's another solution for the issue discussed here), but it > doesn't seem to be used much (if at all), judging by the publicly > available configurations. My bug report is not based on anything other than completion-at-point, the plain/standard emacs completion UI, which is what I use for elisp for a long while and I am quite content with it. It can be less optimal for other languages. but for elisp it has worked well in the past. HTH, Leo