From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 06 01:13:41 2014 Received: (at submit) by debbugs.gnu.org; 6 Oct 2014 05:13:41 +0000 Received: from localhost ([127.0.0.1]:35167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xb0c8-0006Sq-WE for submit@debbugs.gnu.org; Mon, 06 Oct 2014 01:13:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34057) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xb0c7-0006Sj-QR for submit@debbugs.gnu.org; Mon, 06 Oct 2014 01:13:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xb0by-0006mp-QC for submit@debbugs.gnu.org; Mon, 06 Oct 2014 01:13:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xb0by-0006ml-NY for submit@debbugs.gnu.org; Mon, 06 Oct 2014 01:13:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xb0bp-0008Rs-Kl for bug-gnu-emacs@gnu.org; Mon, 06 Oct 2014 01:13:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xb0bg-0006ZU-Ik for bug-gnu-emacs@gnu.org; Mon, 06 Oct 2014 01:13:21 -0400 Received: from mail-pd0-x233.google.com ([2607:f8b0:400e:c02::233]:38436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xb0bg-0006X4-Aj for bug-gnu-emacs@gnu.org; Mon, 06 Oct 2014 01:13:12 -0400 Received: by mail-pd0-f179.google.com with SMTP id r10so2729496pdi.10 for ; Sun, 05 Oct 2014 22:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=R15hbZ+UEns0I4QmXsAqjUrBctA7AJYFrOpzt1LZ8gw=; b=L0D0iqdltdSzWn673OTqnm7RpeMBBCdOPog2YC9pmKJ2JMbLVc1dzLM1ZNo9YPp45s JQkUWOCJoDdnDnjdqqs/CYqU1eUyGGIRC04FpNqPffWO55syFjL4GVvczg4Ak5LQDRKf 1mBlX8licVZ8POEyzPxa7/IYZxK2J0JE5nW4nEbVd4OVvUtVCSOb7bSEoEY2GIsk+MdQ LdEoTwElBUfh61323B8TB0SsyMZU1cYzD+tMcTfpo31Ti/ezvnbT3e+B8sJp/r/q2pkJ IpsWTFfVToEmZPGhcMHfVmbKckXtQG7XSfXVEJEWh7PzEAYDuI9Xnn2nkNgbRqmJS4ue 0jMA== X-Received: by 10.68.57.232 with SMTP id l8mr22141002pbq.107.1412572390900; Sun, 05 Oct 2014 22:13:10 -0700 (PDT) Received: from fortuna ([221.222.150.213]) by mx.google.com with ESMTPSA id lr4sm12316383pab.42.2014.10.05.22.13.08 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sun, 05 Oct 2014 22:13:10 -0700 (PDT) From: Leo Liu To: bug-gnu-emacs@gnu.org Subject: 25.0.50; elisp--expect-function-p X-Debbugs-CC: Date: Mon, 06 Oct 2014 13:13:05 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) emacs should only constrain itself to function completion when absolutely sure. It is not a big deal if function names creep into variable completion or vice versa. Often it is handy to complete to an existing symbol and then edit it into something else. For example, one might need to create a variable name based on a function name. There are a few places where I expect to have a completion based on my past experience but fail now. For example, in (pred ...) pattern of pcase. Other failures, (let (|)) and (let ((|))) where | is point. 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. HTH, Leo From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 08 22:51:02 2014 Received: (at 18643) by debbugs.gnu.org; 9 Oct 2014 02:51:02 +0000 Received: from localhost ([127.0.0.1]:38369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xc3oj-00040Q-7d for submit@debbugs.gnu.org; Wed, 08 Oct 2014 22:51:02 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:61003) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xc3of-00040C-H9 for 18643@debbugs.gnu.org; Wed, 08 Oct 2014 22:50:58 -0400 Received: by mail-la0-f52.google.com with SMTP id hz20so296216lab.39 for <18643@debbugs.gnu.org>; Wed, 08 Oct 2014 19:50:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=2WJHVJtXN6FmsgH3P99dI44c0jNl4mAZB1L02KuaR/M=; b=nwzJA57a5qlmwpwHI5LSorSP/eY7fOnY/k/63/HgPjU1GKDS5ScOx/mC9DtBlk4938 Mmw6js2H7Xtwji7bY7BhQNNeqbPva7d4y5OSMu0ZjfGoQ0AhYiB3s63qMUuF3OSFAson npwZPsK47065iDD5Pggm4jp+AhXBF2qh8VmmedB6KULx5DEcjYC1oSWGZBJsJejHQc9S bLq5O8tncoyBzSOdEqTg+3sREloyxUeSbHDc5EbwvTFYKnqBsWg+5DBQ3RiB9FA6mCbE 3XPywaBX0GSH/TccLokF4IkxeXmgPG84eT+nyN+cDhiZ237YPk7RcsnNNdc6V5DQ6Mr/ IzsA== X-Received: by 10.112.17.132 with SMTP id o4mr8480238lbd.52.1412823056367; Wed, 08 Oct 2014 19:50:56 -0700 (PDT) Received: from axl ([178.252.98.87]) by mx.google.com with ESMTPSA id iq1sm570894lac.9.2014.10.08.19.50.55 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 08 Oct 2014 19:50:55 -0700 (PDT) From: Dmitry Gutov To: Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: Date: Thu, 09 Oct 2014 06:50:55 +0400 In-Reply-To: (Leo Liu's message of "Mon, 06 Oct 2014 13:13:05 +0800") Message-ID: <86oatmq7lc.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Leo, Leo Liu writes: > emacs should only constrain itself to function completion when > absolutely sure. How can we make sure? I think macro-expansion could help in some cases, but implementing that approach is a bit beyond me. > It is not a big deal if function names creep into variable completion or > vice versa. Often it is handy to complete to an existing symbol and then > edit it into something else. IME, context-sensitive completion is useful, and people like it. 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. > 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. > There are a few places where I expect to have a completion based on my > past experience but fail now. For example, in (pred ...) pattern of > pcase. Other failures, (let (|)) and (let ((|))) where | is point. 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. > 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. -- Dmitry From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 08 23:31:23 2014 Received: (at 18643) by debbugs.gnu.org; 9 Oct 2014 03:31:23 +0000 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 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 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) 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) From: Leo Liu To: Dmitry Gutov Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <86oatmq7lc.fsf@yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAElBMVEUAAAAAAP+LRRP0pGC+ vr7///+7mT1iAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMO DhglKe4AAAEsSURBVCjPbZNBboQwDEV/Cd4X9QJRThApmn0XYW+Jyf2v0m+HhqDBgiAe9rcTG7QH w/1Vn2Ar8gBb/ocywSN3qK9T3z4eFDB4eApocBpeBs1RSykoJd8gQcm8pGmHXFso3ajnmsqV0TnY DQkOfXUfN5NwaI7AWTVOyEhcu1aHmdWItHddUVUcUgUBCkitu8V6ditHVOVdqzl2EQ1ZVGTbdK0V 7cqn8vWzoU5Q/bF9Y/Y0cRU1xwkys5dJ+Dt6pBDWifcNQml8Gh2JVmPSoQzo7en0grswkxrUGYJ7 0hSxxAGr7ZMwYcHIzprpi7TENEE1xtiYxixRlCfPBsUUrwHD7uGIwATrbnODJcVrPpVn3hxiGloe m/S+z3CtuzUSMo83N4DPH+F0evwR3P4A2k+75838OKQAAAAASUVORK5CYII= Date: Thu, 09 Oct 2014 11:31:13 +0800 In-Reply-To: <86oatmq7lc.fsf@yandex.ru> (Dmitry Gutov's message of "Thu, 09 Oct 2014 06:50:55 +0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (CentOS 6.5) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 09 02:17:37 2014 Received: (at 18643) by debbugs.gnu.org; 9 Oct 2014 06:17:37 +0000 Received: from localhost ([127.0.0.1]:38438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xc72e-00029n-BO for submit@debbugs.gnu.org; Thu, 09 Oct 2014 02:17:36 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:47815) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xc72c-00029e-EY for 18643@debbugs.gnu.org; Thu, 09 Oct 2014 02:17:35 -0400 Received: by mail-la0-f41.google.com with SMTP id pn19so518280lab.0 for <18643@debbugs.gnu.org>; Wed, 08 Oct 2014 23:17:33 -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=l/QnZLPj2vVRl3ZLxZElItutmUvGTtXDSyJ+tv6A6pc=; b=KKaBThaDO6HFaJsxXq8Ya6GyQEZOBFrV18FxGoESUfemk9fm7OpCoax8sm8Rp3kqby 9vZWe2M5Koqno/d/Ns+PN7z5tt4W5dBOqUddn0eAH1T82sewfWYIZtk4Hyh1CAAhsUMs 6Odg3CJjk7PZ0hzwCu+osMMhI1p153NrLc6EJeLm49n6+wbDgqRv35hxM4ZonuQNSGr3 FvFCKnJoTjnLwbb2LG8uw3gwq4TCx9Hcda6TQgxci1z1ez/fFRw7FdT2TRo4fzFrWH/5 PCxT/ih/NaUWa4jF8YIwgJBKeN3pEDZ3n8WXahE91I4rm56IvJatptSDlaVAo6EnvYvW tLzQ== X-Received: by 10.112.149.2 with SMTP id tw2mr15458993lbb.21.1412835453314; Wed, 08 Oct 2014 23:17:33 -0700 (PDT) Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id z5sm680523lae.21.2014.10.08.23.17.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Oct 2014 23:17:32 -0700 (PDT) Message-ID: <5436287C.3080805@yandex.ru> Date: Thu, 09 Oct 2014 10:17:32 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <86oatmq7lc.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 10/09/2014 07:31 AM, Leo Liu wrote: > It is the false negatives that kill its usefulness in the case of elisp. I disagree with the word "kill" here. Somewhat diminish, maybe. > For example, (ert-deftest |) and (defun |) no longer have the > completions I need. These would be trivial to improve. >> 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. In which part? The lower frequency of new definitions is self-evident, I think. > 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. In that case, I guess you'll have to add a user option. `lisp-completion-at-point-uses-context', or something like that. > My bug report is not based on anything other than completion-at-point, Does that mean my suggestions can't be based on anything else? > 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. I've been using it for a while as well, and I wouldn't say it was, or is, perfect. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 09 11:27:51 2014 Received: (at 18643) by debbugs.gnu.org; 9 Oct 2014 15:27:51 +0000 Received: from localhost ([127.0.0.1]:39292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcFd8-0002Kf-0T for submit@debbugs.gnu.org; Thu, 09 Oct 2014 11:27:50 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:4450) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcFd3-0002KR-Fx for 18643@debbugs.gnu.org; Thu, 09 Oct 2014 11:27:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="93698947" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Oct 2014 11:27:44 -0400 Received: by pastel.home (Postfix, from userid 20848) id 5290785A3; Thu, 9 Oct 2014 11:27:44 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p Message-ID: References: <86oatmq7lc.fsf@yandex.ru> Date: Thu, 09 Oct 2014 11:27:44 -0400 In-Reply-To: (Leo Liu's message of "Thu, 09 Oct 2014 11:31:13 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18643 Cc: 18643@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > 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. Dmitry, what is it exactly that changed? I mean, Elisp completion has been context-sensitive "for ever", so the change is not that it now is, but that it now reacts to the context differently. Oh, I think I see: the change is the introduction of elisp--form-quoted-p such that if elisp--form-quoted-p returns nil (and we're not expecting a function), we only complete against var names instead of the previous behavior of expanding against "anything". I think this is not right: we should have a elisp--expect-exp-p which returns non-nil in a context where we know the symbol at point should be a valid expression (i.e. a variable). Not sure how to write it, tho, but in its absence I think we're better off completing against "anything" than restricting ourselves to variables. BTW, to improve on these behaviors, one approach is to take the macro-expansion code used in elisp--local-variables and use it "everywhere". I.e. expand elisp--local-variables so it doesn't just return the list of local vars, but also returns whether we're inside a quote, or we're expecting a function, or we're expecting an expression. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 09 19:43:30 2014 Received: (at 18643) by debbugs.gnu.org; 9 Oct 2014 23:43:30 +0000 Received: from localhost ([127.0.0.1]:39555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcNMn-0002uC-Ni for submit@debbugs.gnu.org; Thu, 09 Oct 2014 19:43:30 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:44023) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcNMl-0002u4-Al for 18643@debbugs.gnu.org; Thu, 09 Oct 2014 19:43:27 -0400 Received: by mail-pa0-f41.google.com with SMTP id eu11so604513pac.14 for <18643@debbugs.gnu.org>; Thu, 09 Oct 2014 16:43:26 -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=Ntn7Gy2OU0nRmysvVE7jLna/OnrVjHMHT8dN4gNqn+U=; b=SU4neyp3ucotWzBkNBxb4SaZuqd/cN3/B/0m8iS1g0rWcAJNcDc1v1Sbaj5bOV5Sby 1ML7Z5jXB6Vz+Jnx/9WHvvNNVOmbhH46jvgE3dxF2gwZY2ruKfKNfxpvnYE8iBgILxgY 0bk/UZobHKkwK1BcBWck/4bBC0+h0bGiLvgAIEg70DzNzix6NU24qa8HDpjPf1OkXhQt FCz8/f5kgqqPeV0Wblh3bDnBxZ4dH3XjeqMlpA9G9g4mIcUPv5ML7BxzEe9LtbU1wURH veVhZkY3ohsfiOyh3hf32Q45fp0TfMFsJG4K8diVjHS00IK4IJGUs5BHzL6HuM6AyTnO o0gg== X-Received: by 10.70.37.165 with SMTP id z5mr1242669pdj.13.1412898206152; Thu, 09 Oct 2014 16:43:26 -0700 (PDT) Received: from fortuna ([221.222.150.213]) by mx.google.com with ESMTPSA id ip3sm1566591pbc.58.2014.10.09.16.43.23 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 09 Oct 2014 16:43:25 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <86oatmq7lc.fsf@yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAMFBMVEUaFRZLMy1dTENxVzKQ WiCrXQ97cmO/dSqSh3akjGTApXy5sJ7Sxo/Sz8Xo6eP9//xJbkruAAAAAWJLR0QAiAUdSAAAAAlw SFlzAAACxQAAAsUBidZ/7wAAAAd0SU1FB9cBBwMJOwHXewoAAAIBSURBVCjPVdNBiNNAFADQ6J4F x3hThHZBBC+WCFI8SS0iezRDcMHLHkLAg6gJH/fgYQ9xYlj2sLK4KHgqCgXFhda2Idmr4kkQPZQ0 nkQMbTypbMmMM2m7ZgYSmMef/5OZPwo7HFnx3uKPcmj0Dht1LWZJ+Hvr7dIFZXRUwl9VRTuuKDJ+ U44gjscknK4hhJaCkYRsWjmBtLqXlJAG2wipNe18OZJu1BBq1E8xafl4s6Jq2mUZGftU1y7CCxnp FVUDWJXx4C66BKBnErbuoaYNtoRTu6EZBsCbMn7W+5qOAR6WvxNOby9jHWC9hAf3n304CdiAByXs 3Nh9roLDkyb/sWV712vYwaLSAn8CPMHIAAzOPDKP2COAFm4Y4ODVWc6xG7KXsN7UeUJjjimx2uwd gCgNhr0i8C/xyCD5CiCKAMY3Bf5oDzx//w/fimscdcAZU2jv9sedx6+nYPPFIoWI/GK6QZ+EFGOR ErAjCnV3vPZ7XqlTIMbOLY7fLcvvmT7rXNWaGDexIY44N12TG2PDp7vqyl57dnCeuWwyNpnEURxk fTbDYeBnKRn4oejPYI4sH6WviBumEZ/GxX4X/x6EcURFZ7E071bjQGAxpcOAEOJuTiroDEea5Szv rVWLYfl7ZiQwSUToxrkux7OLixAWGz22+HIyWTRYcVfomOwvzusfjtVIGgLHf3MAAAAASUVORK5C YII= Date: Fri, 10 Oct 2014 07:43:19 +0800 In-Reply-To: (Stefan Monnier's message of "Thu, 09 Oct 2014 11:27:44 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (CentOS 6.5) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: 18643@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-10-09 11:27 -0400, Stefan Monnier wrote: > BTW, to improve on these behaviors, one approach is to take the > macro-expansion code used in elisp--local-variables and use it > "everywhere". I.e. expand elisp--local-variables so it doesn't just > return the list of local vars, but also returns whether we're inside > a quote, or we're expecting a function, or we're expecting an expression. 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. Also could we not force users to insert ` before any completion in strings or comments. 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. Thanks, Leo From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 09 21:16:07 2014 Received: (at 18643) by debbugs.gnu.org; 10 Oct 2014 01:16:07 +0000 Received: from localhost ([127.0.0.1]:39577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcOoQ-0005Ll-LV for submit@debbugs.gnu.org; Thu, 09 Oct 2014 21:16:07 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:22265) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcOoO-0005Le-Rn for 18643@debbugs.gnu.org; Thu, 09 Oct 2014 21:16:05 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="93747615" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Oct 2014 21:16:04 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1D2B185A3; Thu, 9 Oct 2014 21:16:04 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p Message-ID: References: <86oatmq7lc.fsf@yandex.ru> Date: Thu, 09 Oct 2014 21:16:04 -0400 In-Reply-To: (Leo Liu's message of "Fri, 10 Oct 2014 07:43:19 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18643 Cc: 18643@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> BTW, to improve on these behaviors, one approach is to take the >> macro-expansion code used in elisp--local-variables and use it >> "everywhere". I.e. expand elisp--local-variables so it doesn't just >> return the list of local vars, but also returns whether we're inside >> a quote, or we're expecting a function, or we're expecting an expression. > 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. Yes, we can do that with completion-table-in-turn. Note that the elisp--local-variables is pretty precise, so it might not be necessary. > Also could we not force users to insert ` before any completion in > strings or comments. We could provide a config option, but I'd rather we don't offer those completions by default. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 09 23:34:11 2014 Received: (at 18643) by debbugs.gnu.org; 10 Oct 2014 03:34:11 +0000 Received: from localhost ([127.0.0.1]:39623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcQy1-0000gG-OT for submit@debbugs.gnu.org; Thu, 09 Oct 2014 23:34:10 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:47802) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcQxy-0000g5-HY for 18643@debbugs.gnu.org; Thu, 09 Oct 2014 23:34:07 -0400 Received: by mail-lb0-f173.google.com with SMTP id 10so2310887lbg.32 for <18643@debbugs.gnu.org>; Thu, 09 Oct 2014 20:34:05 -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=TWMxufDpqDfRcuqvYs06hKdAC8xQ/5xX26Ytl6LNavo=; b=zSBWoGV4nmrQCp/sv0Iem8GAIGGrcvmgCD9zhJLDHKGJwIQcv4njFRu9QznDakGOy+ /54JDeTVEMXCDNFQkVumr/js3em/CHiLRWa6xbaJlslPZV0+BdxBHgOBKZyKqEBuB9tz q5W/GoQ0DBSLdFMBYbG9cP6tFU5/Rhj8AjLq/r79mCLIex06SJ7682oTddsPvSI9c/TW 4IRiYq9f5M44Su9jZHcJrAq3Dh9yDStHi4/F3wB0KCuMblb6YTIimIoVD646WWCF/cBQ WbqNqxIIIWa+DTeDIleWeir6A5aynIO4pdQ1Yg4FO7BBY/FfdM46BJkkFmKjswgANnMZ m1jg== X-Received: by 10.152.7.145 with SMTP id j17mr1497919laa.67.1412912045454; Thu, 09 Oct 2014 20:34:05 -0700 (PDT) Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id d9sm1427831lbp.49.2014.10.09.20.34.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Oct 2014 20:34:04 -0700 (PDT) Message-ID: <543753AC.3090604@yandex.ru> Date: Fri, 10 Oct 2014 07:34:04 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Stefan Monnier , Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <86oatmq7lc.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 10/09/2014 07:27 PM, Stefan Monnier wrote: > I mean, Elisp completion has been context-sensitive "for ever", so the > change is not that it now is, but that it now reacts to the > context differently. It completed against "all available symbols" in way too many situations. And the logic was even simpler before 24.4, where IIRC you adopted some code from company-elisp (and also reimplemented some). > I think this is not right: we should have a elisp--expect-exp-p > which returns non-nil in a context where we know the symbol at point > should be a valid expression (i.e. a variable). Yes, I guess it would make more sense (this function can whitelist certain cases, like function name in a defun, for example). > Not sure how to write > it, tho, but in its absence I think we're better off completing against > "anything" than restricting ourselves to variables. Emacs 25.1 is probably still far away enough for us to get this right. No need to revert useful changes. > BTW, to improve on these behaviors, one approach is to take the > macro-expansion code used in elisp--local-variables and use it > "everywhere". I.e. expand elisp--local-variables so it doesn't just > return the list of local vars, but also returns whether we're inside > a quote, or we're expecting a function, or we're expecting an expression. I'm glad that you think this approach will work. Sounds like then the code will just have to handle a fixed number of forms, which is solvable. Now I just have to wrap my head around `elisp--local-variables'. :) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 09 23:56:45 2014 Received: (at 18643) by debbugs.gnu.org; 10 Oct 2014 03:56:45 +0000 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 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 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) 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) Message-ID: <543758F8.2000207@yandex.ru> Date: Fri, 10 Oct 2014 07:56:40 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Leo Liu , Stefan Monnier Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <86oatmq7lc.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 10 00:07:16 2014 Received: (at 18643) by debbugs.gnu.org; 10 Oct 2014 04:07:16 +0000 Received: from localhost ([127.0.0.1]:39645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcRU3-0001bS-Q1 for submit@debbugs.gnu.org; Fri, 10 Oct 2014 00:07:16 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:40731) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcRU1-0001bH-4A for 18643@debbugs.gnu.org; Fri, 10 Oct 2014 00:07:13 -0400 Received: by mail-pd0-f174.google.com with SMTP id y13so880741pdi.19 for <18643@debbugs.gnu.org>; Thu, 09 Oct 2014 21:07:12 -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=ZebSmiJyHyyHCpHV76F9j+qxZ8j6aLMLHU4Vax04Nk8=; b=iNeAH2o6CgYbT/XWXFsoBWNk5THFtrW9kgcoifvS5XtNTCUxnFkAPiwrN04Wccdby9 LP7I4vLq0MvkCR3YWKojF5lqXG6XioghD4Oyhwwe1e2S//JueW/hnbUcSe7MxRMySpti +F6P8PrDMYAY9/gAGXEVINZs/2hPAZkg+xbU4ogsv9Pid2Y4+ZH4+eb8UG+8J8R3VCf4 x1Mi8OgbcbleoRZXy5PfyHhGVQEbljky05Bi8GN79IpOlCwk+OrV09DOPl7P/yPN9DnL OtMhI4SFyO7D4B0lI7JPBPzxkch/nm7ptpGYwOYPYiSXz4gk1tANKVd1ZtL9dww3Y0l4 AG5g== X-Received: by 10.66.218.164 with SMTP id ph4mr2386863pac.116.1412914032359; Thu, 09 Oct 2014 21:07:12 -0700 (PDT) Received: from fortuna ([114.248.243.105]) by mx.google.com with ESMTPSA id o13sm1987871pdl.24.2014.10.09.21.07.09 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 09 Oct 2014 21:07:11 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <86oatmq7lc.fsf@yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAG1BMVEUAAAA9Cgm3Hx1WWFWA gn+WmJWsrqv4+vcCAwCRl2MkAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAYoA AAGKATOXMFgAAAAHdElNRQfXAQwDNR+ZJmElAAABIklEQVQoz22SPW+DQAyGWUq65qasd9PNUSX4 AZHK2C1rJy5jpDS4IwRVup9dn7GNafpKIPPgzztXFSujqq1eM2n8h22oMkvxI/i9C97kRfMRUN55 dS3BrsAwBXUtMLAO4lryh8kTjOxKpQNniNxAgZOEe4bZwsDTFhKdqZRLNII4OQNHhEuq/RMkm6Cj TnnEA/fk0BorcYn5qA3oaeAxbaBOLrX+9G48NZ2Fzc2tzDM8Q+tMypEOqYHh8mAWaaK3U/cDMOT5 aMZMABgPXc7zPMs1A8DXO756GFJ/4fMEq47hTsAdn5avoxZ4ywl0c2w4Flu2Ybeyb3S+EqxX2DYA H8veJGEDTnHnrXvRaPyt+2kSfK6rfBZ2tUtfP/mR+pR6sX8BUZ/cDV7tvkoAAAAASUVORK5CYII= Date: Fri, 10 Oct 2014 12:07:06 +0800 In-Reply-To: (Stefan Monnier's message of "Thu, 09 Oct 2014 21:16:04 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (CentOS 6.5) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: Dmitry Gutov , 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-10-09 21:16 -0400, Stefan Monnier wrote: > Yes, we can do that with completion-table-in-turn. > Note that the elisp--local-variables is pretty precise, so it might not > be necessary. Indeed. > We could provide a config option, but I'd rather we don't offer those > completions by default. For example, I need to add comment to a line with a bit of lisp form. I already M-; and typed in a few words followed by `:': ;; Another way: (average (compute-weight ....) ...) Now I won't be able to complete anything while finishing the form. I have to uncomment first then finish the form and comment again. Leo From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 10 00:33:29 2014 Received: (at 18643) by debbugs.gnu.org; 10 Oct 2014 04:33:29 +0000 Received: from localhost ([127.0.0.1]:39658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcRtQ-0002J2-Mx for submit@debbugs.gnu.org; Fri, 10 Oct 2014 00:33:29 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:44652) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcRtO-0002Is-Km for 18643@debbugs.gnu.org; Fri, 10 Oct 2014 00:33:27 -0400 Received: by mail-pa0-f48.google.com with SMTP id eu11so966906pac.7 for <18643@debbugs.gnu.org>; Thu, 09 Oct 2014 21:33:25 -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=d9xfE2JOZWb90HnWrM/aQuY39H/vWuMLUvC4pz7SJ1A=; b=KJQmFkbNWHEMX1DS/DJ3VgUgBWeHe9JB7N2ccs10JAGYiPmWQGD6LIbwvsVG7Z70Vi qnu+xDnvy0VwrcOBy2GVXOkrRqnPSCrjbb6cS/fwoq1eHF5xffNtUisMonvbDlPLvTgG RtSLl7tosjP9aV8Gig5IEeb86/dBV5U09sxYfO5aXp6s1NCv6j/DwRxovd8zRNnEaFsP 425/2c2i72ssilUwqNIwNMiiUfUEvecgMVggwXeiZNZbdISiwxlH4B1jG7nciRiXmMqw FIAvmH+ldVUU5/7F6DaOf5fu6Nt1Dws3wYhOj+px9KlwxITReV6YcJFCINFHkUUdBOBo URoQ== X-Received: by 10.68.69.44 with SMTP id b12mr2356575pbu.121.1412915605492; Thu, 09 Oct 2014 21:33:25 -0700 (PDT) Received: from fortuna ([114.248.243.105]) by mx.google.com with ESMTPSA id ve10sm1998049pbc.65.2014.10.09.21.33.23 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 09 Oct 2014 21:33:24 -0700 (PDT) From: Leo Liu To: Dmitry Gutov Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <86oatmq7lc.fsf@yandex.ru> <543758F8.2000207@yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAgMAAADxkFD+AAAADFBMVEUvT09qWs3/pQD///+J kUVcAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMLOd3veKQA AACuSURBVBjTldE9CgIxEAXgB+lEyFUC2wo5ikdZ8DSypxhMY7H9VuIVwlqkGRgnm59VsHGafIQ3 CZlAtmKIRaHETgYa12lqvEsPYKf8wXHsPGfqPaUM0g9aJPKFXkmNQmSDqwzz4Fpgpz+6WAPY2z5o uPJJpu0uypcl4nyCibMLQ8lCiVjayLoQvw5LsVKQuHPRR958HZbOcVsKeepcLxpByjycGvnKmY+c MBvrtyjfe0vmuLvdq/kAAAAASUVORK5CYII= Date: Fri, 10 Oct 2014 12:33:09 +0800 In-Reply-To: <543758F8.2000207@yandex.ru> (Dmitry Gutov's message of "Fri, 10 Oct 2014 07:56:40 +0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (CentOS 6.5) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: Stefan Monnier , 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-10-10 07:56 +0400, Dmitry Gutov wrote: > 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? Sorry, I am merely reporting this as a usability bug and I don't intend to get too deep into it (too little time :(). If I can work around it I do that and get back to my work. For this bug I actually tried to get used to it. I failed so I spoke up but not to blame any change. You seem to be fairly confident on the approach chosen. Good and I look forward to its improvements. Please be considerate on two things: 1. Leave room for other usage habits; 2. Rely less on heuristics. As also suggested by Stefan, do what he did with elisp--local-variables, i.e. code walk the expansion of the sexp and pick out the var/function postions/names. elisp--local-variables performs really well because it `guess' it right. HTH, Leo From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 10 09:20:17 2014 Received: (at 18643) by debbugs.gnu.org; 10 Oct 2014 13:20:17 +0000 Received: from localhost ([127.0.0.1]:39786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xca7E-0001Ar-D4 for submit@debbugs.gnu.org; Fri, 10 Oct 2014 09:20:17 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:63119) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xca7C-0001Aj-GL for 18643@debbugs.gnu.org; Fri, 10 Oct 2014 09:20:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AucGAIDvNVNFxKjo/2dsb2JhbABZgwaDSrw0e4MOgRcXdIIlAQEBAQIBViMFCwsOJhIUGA0kiAQI0hkXjiNXB4Q4BJRilDeBaoNMIYEt X-IPAS-Result: AucGAIDvNVNFxKjo/2dsb2JhbABZgwaDSrw0e4MOgRcXdIIlAQEBAQIBViMFCwsOJhIUGA0kiAQI0hkXjiNXB4Q4BJRilDeBaoNMIYEt X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="93785714" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Oct 2014 09:20:13 -0400 Received: by pastel.home (Postfix, from userid 20848) id 4D83985E6; Fri, 10 Oct 2014 09:20:13 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p Message-ID: References: <86oatmq7lc.fsf@yandex.ru> <543753AC.3090604@yandex.ru> Date: Fri, 10 Oct 2014 09:20:13 -0400 In-Reply-To: <543753AC.3090604@yandex.ru> (Dmitry Gutov's message of "Fri, 10 Oct 2014 07:34:04 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18643 Cc: Leo Liu , 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I'm glad that you think this approach will work. Sounds like then the code > will just have to handle a fixed number of forms, which is solvable. I'm not sure it will, but experience seems to indicate that it works well for local variables, so there's hope. > Now I just have to wrap my head around `elisp--local-variables'. :) It's very simple: It takes the string between the first opening paren and point, appends a special symbol (the witness) followed by the number of missing closing parens to make the whole string a valid sexp, than reads¯oexpands that. And then we traverse the expanded code (a tree) straight from the root to the leaf corresponding to point (which is done in elisp--local-variables-1), collecting various info along the way. Of course, traversing the tree efficiently is hard/impossible because we don't know for sure where is the witness (which represents point) in the tree, so we'd have to go through all the nodes of the tree, whereas we want to limit ourselves to going down from the root straight to the right leaf without backtracking. Luckily, we know that point started "at the very end" of the sexp, and macroexpansion tends to preserve the order, so if we always follow "the rightmost child", we often find the witness. Of course, it doesn't always work: e.g. if we start from (with-foo witness), we'll generally end up with a macro-expanded code of the form (unwind-protect (progn (something) witness) (somethingelse)) and going down the rightmost child won't find the witness. Maybe we could/should do a full backtracking traversal of the whole tree instead, so it works more often. After all, we use macroexpand-all already, so we do perform such a traversal elsewhere anyway (and we don't really have to: we could perform the macroexpansion only along the spine we descend). Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 10 09:25:12 2014 Received: (at 18643) by debbugs.gnu.org; 10 Oct 2014 13:25:12 +0000 Received: from localhost ([127.0.0.1]:39790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcaBy-0001Id-Tx for submit@debbugs.gnu.org; Fri, 10 Oct 2014 09:25:11 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:46846) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcaBv-0001IU-Cq for 18643@debbugs.gnu.org; Fri, 10 Oct 2014 09:25:08 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIxALDiYSFBgNJC6HVgjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIxALDiYSFBgNJC6HVgjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="93799209" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Oct 2014 09:25:06 -0400 Received: by pastel.home (Postfix, from userid 20848) id A0CA985E6; Fri, 10 Oct 2014 09:25:06 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p Message-ID: References: <86oatmq7lc.fsf@yandex.ru> Date: Fri, 10 Oct 2014 09:25:06 -0400 In-Reply-To: (Leo Liu's message of "Fri, 10 Oct 2014 12:07:06 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18643 Cc: Dmitry Gutov , 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> We could provide a config option, but I'd rather we don't offer those >> completions by default. > For example, I need to add comment to a line with a bit of lisp form. I > already M-; and typed in a few words followed by `:': > ;; Another way: (average (compute-weight ....) ...) > Now I won't be able to complete anything while finishing the form. I > have to uncomment first then finish the form and comment again. I know, but there's really no way for Emacs to know what you intend to complete here. So I think the right solution for this is to write a completion-at-point-function which is designed specifically for "completion in strings and comments" and which would probably rely on something like dabbrev, complemented by a major-mode-supplied list of additional candidates. WDYT? Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 10 16:53:28 2014 Received: (at 18643) by debbugs.gnu.org; 10 Oct 2014 20:53:28 +0000 Received: from localhost ([127.0.0.1]:40472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XchBn-0000FP-62 for submit@debbugs.gnu.org; Fri, 10 Oct 2014 16:53:27 -0400 Received: from forward2o.mail.yandex.net ([37.140.190.31]:51737) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XchBj-0000FC-53 for 18643@debbugs.gnu.org; Fri, 10 Oct 2014 16:53:24 -0400 Received: from web5o.yandex.ru (web5o.yandex.ru [95.108.205.105]) by forward2o.mail.yandex.net (Yandex) with ESMTP id 261F24860249; Sat, 11 Oct 2014 00:53:21 +0400 (MSK) Received: from 127.0.0.1 (localhost [127.0.0.1]) by web5o.yandex.ru (Yandex) with ESMTP id 7A9195280C65; Sat, 11 Oct 2014 00:53:20 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1412974400; bh=I5941mg0KJL7aIXCOrDvNzg2NnryXIgyqIpM/g6F6Qw=; h=From:To:Cc:In-Reply-To:References:Subject:Date; b=IW2VDO5g2UQNXrxqRPxiinP7GLfHEfOATnpCq0zWXskPjGHkraoFDfC7NJWb+fIjW Bnfe5aCZrgadYlwLuSaRrDUBiNCKYqotaQEWquVVujUI0KLrMqHfKUf0K8aVDzvKFs pCeU1srdO23BMhnxpYdJQtgA9KKEszShOBLDZ9RM= Received: from [5.18.182.112] ([5.18.182.112]) by web5o.yandex.ru with HTTP; Sat, 11 Oct 2014 00:53:20 +0400 From: Dmitry Gutov To: Stefan Monnier , Leo Liu In-Reply-To: References: Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p MIME-Version: 1.0 Message-Id: <3601111412974400@web5o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sat, 11 Oct 2014 00:53:20 +0400 Content-Transfer-Encoding: 8bit Content-Type: text/html; charset=koi8-r X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 5:25 PM, 10 ÏËÔÑÂÒÑ 2014šÇ., Stefan Monnier : a completion-at-point-function which is designed specifically for "completion in strings and comments" and which would probably rely on something like dabbrev, complemented by a major-mode-supplied list of additional candidates. [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [37.140.190.31 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 1.1 MIME_HTML_ONLY BODY: Message only has text/html MIME parts 0.6 HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML tag 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 0.0 FSL_HELO_BARE_IP_2 FSL_HELO_BARE_IP_2 X-Debbugs-Envelope-To: 18643 Cc: "18643@debbugs.gnu.org" <18643@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 5:25 PM, 10 ÏËÔÑÂÒÑ 2014šÇ., Stefan Monnier : a completion-at-point-function which is designed specifically for "completion in strings and comments" and which would probably rely on something like dabbrev, complemented by a major-mode-supplied list of additional candidates. [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [37.140.190.31 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 1.1 MIME_HTML_ONLY BODY: Message only has text/html MIME parts 0.6 HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML tag 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 5:25 PM, 10 ÏËÔÑÂÒÑ 2014šÇ., Stefan Monnier <monnier@iro.umontreal.ca>:


a completion-at-point-function which is designed specifically for
"completion in strings and comments" and which would probably rely on
something like dabbrev, complemented by a major-mode-supplied list of
additional candidates.


The "complemented" part there gives me pause: we just got out of the situation when a person writing prose in a docstring kept getting Lisp functions in completions.

I rather think the right solution would start with a stricter convention for code snippets in docstrings. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 10 20:16:45 2014 Received: (at 18643) by debbugs.gnu.org; 11 Oct 2014 00:16:45 +0000 Received: from localhost ([127.0.0.1]:40624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XckMW-0006ul-AH for submit@debbugs.gnu.org; Fri, 10 Oct 2014 20:16:44 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:35965) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XckMT-0006uc-Ue for 18643@debbugs.gnu.org; Fri, 10 Oct 2014 20:16:42 -0400 Received: by mail-pa0-f41.google.com with SMTP id eu11so2635919pac.28 for <18643@debbugs.gnu.org>; Fri, 10 Oct 2014 17:16:40 -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=d4gRYFG0+zUnETS9jXMt5xqvMclTsiNuGwHfCKJ70f0=; b=DxXCRiCcjhd6gSuBRbHEIiBiKjw3Wgt0W3pMhhGMwswXzCdnRvpoV/jjKi70GC4Jwe ik3CtVBT6XwNn1BG2TIhR1muLajgnlungKaGudHxEKnNgCeZATQo68ZsTjTtbCcQMb9Q 2fZ8CkHn4+IH+M3lYNzYtStOBoAWUWEKPudZeswy2+/Dh4Ag3KxvxrhbMDL1d5E/JkuW dUv5d1uVmCagwjMpz9047sVbF6oUfAPeDphU7F3NFZoR32PgcuU9d6Yg5/u1SboACFli wb6gawER8f0s0o6kBLiX6sQTFmpo4Tro4eyKm+J37KKRfyarYjvTGrhICUsvUZVi0nHB Oh5Q== X-Received: by 10.68.252.230 with SMTP id zv6mr8744241pbc.13.1412986600312; Fri, 10 Oct 2014 17:16:40 -0700 (PDT) Received: from fortuna ([114.248.243.105]) by mx.google.com with ESMTPSA id ra4sm4635290pab.33.2014.10.10.17.16.37 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 10 Oct 2014 17:16:39 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <86oatmq7lc.fsf@yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAG1BMVEUAAAA9Cgm3Hx1WWFWA gn+WmJWsrqv4+vcCAwCRl2MkAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAYoA AAGKATOXMFgAAAAHdElNRQfXAQwDNR+ZJmElAAABIklEQVQoz22SPW+DQAyGWUq65qasd9PNUSX4 AZHK2C1rJy5jpDS4IwRVup9dn7GNafpKIPPgzztXFSujqq1eM2n8h22oMkvxI/i9C97kRfMRUN55 dS3BrsAwBXUtMLAO4lryh8kTjOxKpQNniNxAgZOEe4bZwsDTFhKdqZRLNII4OQNHhEuq/RMkm6Cj TnnEA/fk0BorcYn5qA3oaeAxbaBOLrX+9G48NZ2Fzc2tzDM8Q+tMypEOqYHh8mAWaaK3U/cDMOT5 aMZMABgPXc7zPMs1A8DXO756GFJ/4fMEq47hTsAdn5avoxZ4ywl0c2w4Flu2Ybeyb3S+EqxX2DYA H8veJGEDTnHnrXvRaPyt+2kSfK6rfBZ2tUtfP/mR+pR6sX8BUZ/cDV7tvkoAAAAASUVORK5CYII= Date: Sat, 11 Oct 2014 08:16:33 +0800 In-Reply-To: (Stefan Monnier's message of "Fri, 10 Oct 2014 09:25:06 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (CentOS 6.5) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: Dmitry Gutov , 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-10-10 09:25 -0400, Stefan Monnier wrote: > I know, but there's really no way for Emacs to know what you intend to > complete here. I am fine with giving me anything from obarray. elisp names tend to be very long anything that you can give me help me save time. > So I think the right solution for this is to write > a completion-at-point-function which is designed specifically for > "completion in strings and comments" and which would probably rely on > something like dabbrev, complemented by a major-mode-supplied list of > additional candidates. > > WDYT? Is this a solution for elisp or all modes? I am only concerned about elisp mode though, which already has a good completion source ie obarray. For example, in common lisp I prefer the fuzzy completion (from slime) which basically gives me anything sorted by score (with a user settable cutoff). I haven't had any problem quickly getting the completion I have in mind. I don't understand why we work so hard to prevent completion in strings and comments. Sorry if this has been discussed. Thanks, Leo From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 10 20:25:30 2014 Received: (at 18643) by debbugs.gnu.org; 11 Oct 2014 00:25:30 +0000 Received: from localhost ([127.0.0.1]:40628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XckUz-00079K-Ka for submit@debbugs.gnu.org; Fri, 10 Oct 2014 20:25:29 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:47311) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XckUx-00079A-Lf for 18643@debbugs.gnu.org; Fri, 10 Oct 2014 20:25:28 -0400 Received: by mail-pa0-f53.google.com with SMTP id kq14so2676947pab.12 for <18643@debbugs.gnu.org>; Fri, 10 Oct 2014 17:25:26 -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=gnFYeUvwP/8QUBgr08Xz8Z6eu2SkYiupHj89+nXPf48=; b=E/tUAJCkkIiEXABb9R8wq9IUf/CFel8AzG4xHLphYxTYIMcYdRft2TtcVVavbLEIg7 SRcpjNDQmysutiEpxnCW1bimlZaQZxLlXMtLj6jH0zyzQk8njLh5arYIQpJHcF++K9se NOArr4wjY42qvcnOowy28EnvVx9qU2UF042QR5lcXqV5gIVFcu3Lq5qYgXs88DHzPVNx CoI0Tbfailp7NoDSEdSSBzBc7W+dMt7H9Pq71n7rfegp+bYVQczPevMyve4K4YDWTemO WWoNm3g6TqNDL6S9uEmytj3YEYfho0C/VJZtB4zNGEjFDcxhoLZTppZAyvCIb5YjbvjE SoZw== X-Received: by 10.66.141.139 with SMTP id ro11mr8581407pab.43.1412987126634; Fri, 10 Oct 2014 17:25:26 -0700 (PDT) Received: from fortuna ([114.248.243.105]) by mx.google.com with ESMTPSA id zn2sm4557968pbb.41.2014.10.10.17.25.24 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 10 Oct 2014 17:25:26 -0700 (PDT) From: Leo Liu To: Dmitry Gutov Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <3601111412974400@web5o.yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= Date: Sat, 11 Oct 2014 08:25:20 +0800 In-Reply-To: <3601111412974400@web5o.yandex.ru> (Dmitry Gutov's message of "Sat, 11 Oct 2014 00:53:20 +0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (CentOS 6.5) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: Stefan Monnier , "18643@debbugs.gnu.org" <18643@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-10-11 00:53 +0400, Dmitry Gutov wrote: > The "complemented" part there gives me pause: we just got out of the > situation when a person writing prose in a docstring kept getting Lisp > functions in completions. > > I rather think the right solution would start with a stricter > convention for code snippets in docstrings. This gives me a sense that you are thinking about a situation when someone uses company and has the completions displayed immediately. If true I am dubious with this change. Are we to switch to company by default? In standard default emacs behaviour, I had never getting anything without me asking for it, be it in comments or strings or code. They only appear when I ask. Leo From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 11 09:47:48 2014 Received: (at 18643) by debbugs.gnu.org; 11 Oct 2014 13:47:48 +0000 Received: from localhost ([127.0.0.1]:40831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xcx1P-0004QG-Ld for submit@debbugs.gnu.org; Sat, 11 Oct 2014 09:47:47 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:38797) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xcx1M-0004Q4-5R for 18643@debbugs.gnu.org; Sat, 11 Oct 2014 09:47:45 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcGAIDvNVNFxKjo/2dsb2JhbABZgwaDSlK/a4EXF3SCJQEBAQECASMzIwULCQIODAIYDgICFBgNJBMbh1YIkwOcGKJ+F4EpjR4zB4JvgUkBA6kZgWqDTCE X-IPAS-Result: ArcGAIDvNVNFxKjo/2dsb2JhbABZgwaDSlK/a4EXF3SCJQEBAQECASMzIwULCQIODAIYDgICFBgNJBMbh1YIkwOcGKJ+F4EpjR4zB4JvgUkBA6kZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="94020521" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Oct 2014 09:47:43 -0400 Received: by pastel.home (Postfix, from userid 20848) id EA94D859C; Sat, 11 Oct 2014 09:47:42 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p Message-ID: References: <3601111412974400@web5o.yandex.ru> Date: Sat, 11 Oct 2014 09:47:42 -0400 In-Reply-To: <3601111412974400@web5o.yandex.ru> (Dmitry Gutov's message of "Sat, 11 Oct 2014 00:53:20 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18643 Cc: Leo Liu , "18643@debbugs.gnu.org" <18643@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > 5:25 PM, 10 =D0=BE=D0=BA=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2014 =D0=B3., Stef= an Monnier : > a completion-at-point-function which is designed specifically for > "completion in strings and comments" and which would probably rely on > something like dabbrev, complemented by a major-mode-supplied list of > additional candidates. > The "complemented" part there gives me pause: we just got out of the > situation when a person writing prose in a docstring kept getting Lisp > functions in completions. But by being a separate function, users can add/remove it at will, depending on their preference. > I rather think the right solution would start with a stricter convention = for > code snippets in docstrings.=20 That's a non-starter, because while we can apply this to our own code, we can't enforce it on others's, Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 11 09:48:31 2014 Received: (at 18643) by debbugs.gnu.org; 11 Oct 2014 13:48:31 +0000 Received: from localhost ([127.0.0.1]:40835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xcx27-0004Rm-7N for submit@debbugs.gnu.org; Sat, 11 Oct 2014 09:48:31 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:37801) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xcx25-0004Rc-HW for 18643@debbugs.gnu.org; Sat, 11 Oct 2014 09:48:29 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="94020550" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Oct 2014 09:48:28 -0400 Received: by pastel.home (Postfix, from userid 20848) id D82FA859C; Sat, 11 Oct 2014 09:48:28 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p Message-ID: References: <3601111412974400@web5o.yandex.ru> Date: Sat, 11 Oct 2014 09:48:28 -0400 In-Reply-To: (Leo Liu's message of "Sat, 11 Oct 2014 08:25:20 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18643 Cc: "18643@debbugs.gnu.org" <18643@debbugs.gnu.org>, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > If true I am dubious with this change. Are we to switch to company by > default? I'd like to include company in core Emacs, yes. Enable it by default, maybe not, or not yet. But it's an important use case. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 11 10:21:28 2014 Received: (at 18643) by debbugs.gnu.org; 11 Oct 2014 14:21:28 +0000 Received: from localhost ([127.0.0.1]:41218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcxY0-0005Nv-5U for submit@debbugs.gnu.org; Sat, 11 Oct 2014 10:21:28 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:49668) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcxXy-0005Nn-3k for 18643@debbugs.gnu.org; Sat, 11 Oct 2014 10:21:26 -0400 Received: by mail-pa0-f41.google.com with SMTP id eu11so3387345pac.14 for <18643@debbugs.gnu.org>; Sat, 11 Oct 2014 07:21:25 -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=M48CyrO28uyoRjzoXqhkAAtrM6KJWW+aNxSCouS3N80=; b=Lub8v8QMHFSp22dAoNf3bD+DEkNrxWbPOM7LOf0BCOCgMgcH+TYAKilf4KLZe/O+Yx 4l3kGKWm3Ugg/VsTZO9rdMewMMcEo3Dg8v18yzyPxQ1LRtvYxU7iNXjGOvbIRECwZu/t Mqm7RxMtmq2pUEqfYfXC2FPdX+LTMZw8wIbX4HCEyFtYNeZOPaBndg9P3FytOUvSuDal 7vEyWYtyY7xBkKYADMotWpiwhyOv6W49PULKBlpagz/3gHr/WLqqPEBjuDMGuRfdXHrl atHRWbmJ8W7xXS1vCXABQPR0vgV0gmFEPGsx1e4AmdJam3ryvNuEp/+c+HU3qYSvwnog 00Gg== X-Received: by 10.68.196.137 with SMTP id im9mr12115836pbc.57.1413037285052; Sat, 11 Oct 2014 07:21:25 -0700 (PDT) Received: from fortuna ([114.248.243.105]) by mx.google.com with ESMTPSA id c9sm6264673pdn.81.2014.10.11.07.21.21 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sat, 11 Oct 2014 07:21:24 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <3601111412974400@web5o.yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAMFBMVEUaFRZLMy1dTENxVzKQ WiCrXQ97cmO/dSqSh3akjGTApXy5sJ7Sxo/Sz8Xo6eP9//xJbkruAAAAAWJLR0QAiAUdSAAAAAlw SFlzAAACxQAAAsUBidZ/7wAAAAd0SU1FB9cBBwMJOwHXewoAAAIBSURBVCjPVdNBiNNAFADQ6J4F x3hThHZBBC+WCFI8SS0iezRDcMHLHkLAg6gJH/fgYQ9xYlj2sLK4KHgqCgXFhda2Idmr4kkQPZQ0 nkQMbTypbMmMM2m7ZgYSmMef/5OZPwo7HFnx3uKPcmj0Dht1LWZJ+Hvr7dIFZXRUwl9VRTuuKDJ+ U44gjscknK4hhJaCkYRsWjmBtLqXlJAG2wipNe18OZJu1BBq1E8xafl4s6Jq2mUZGftU1y7CCxnp FVUDWJXx4C66BKBnErbuoaYNtoRTu6EZBsCbMn7W+5qOAR6WvxNOby9jHWC9hAf3n304CdiAByXs 3Nh9roLDkyb/sWV712vYwaLSAn8CPMHIAAzOPDKP2COAFm4Y4ODVWc6xG7KXsN7UeUJjjimx2uwd gCgNhr0i8C/xyCD5CiCKAMY3Bf5oDzx//w/fimscdcAZU2jv9sedx6+nYPPFIoWI/GK6QZ+EFGOR ErAjCnV3vPZ7XqlTIMbOLY7fLcvvmT7rXNWaGDexIY44N12TG2PDp7vqyl57dnCeuWwyNpnEURxk fTbDYeBnKRn4oejPYI4sH6WviBumEZ/GxX4X/x6EcURFZ7E071bjQGAxpcOAEOJuTiroDEea5Szv rVWLYfl7ZiQwSUToxrkux7OLixAWGz22+HIyWTRYcVfomOwvzusfjtVIGgLHf3MAAAAASUVORK5C YII= Date: Sat, 11 Oct 2014 22:21:16 +0800 In-Reply-To: (Stefan Monnier's message of "Sat, 11 Oct 2014 09:48:28 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (CentOS 6.5) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: "18643@debbugs.gnu.org" <18643@debbugs.gnu.org>, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-10-11 09:48 -0400, Stefan Monnier wrote: > I'd like to include company in core Emacs, yes. Enable it by default, > maybe not, or not yet. But it's an important use case. That's my impression. It is perfectly fine to make things work better for company. I am a bit worried seeing the default get worse. Leo From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 11 12:18:42 2014 Received: (at 18643) by debbugs.gnu.org; 11 Oct 2014 16:18:42 +0000 Received: from localhost ([127.0.0.1]:41233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XczNR-0008Pk-Hm for submit@debbugs.gnu.org; Sat, 11 Oct 2014 12:18:41 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:50383) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XczNP-0008PZ-Cz for 18643@debbugs.gnu.org; Sat, 11 Oct 2014 12:18:39 -0400 Received: by mail-lb0-f170.google.com with SMTP id u10so4638383lbd.15 for <18643@debbugs.gnu.org>; Sat, 11 Oct 2014 09:18:38 -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=OzJQiw6g4wEd/opfi+KN529aqmLYKDxRP3AVt7x3Et8=; b=ebD7K1fKdK3E+3UgRBXR6Lgl1IFAsaQDlbK76Q40dDIcBioNVomaypTV3WJXMGP65H cu3wm/40ckO1EZ9uYM/VkRGyMJ32D87H6OxC8iv8R1YdDsD3eTBtQ5QuGTJDdXRqoYiF aEIS5Wrj/xM74Ux2nyVUGNPKcdzlAkTPGREcG+GyRDx0n9+qngc4SmTWwHlefnBGG3cS aOXin6omWsDA4/JAfmKEBY/LsvZbYBfEOEG0CWECANB1oFHIcG74kD0uEVM6m1qIi0kr Ajo14MS+pJn+dEUZEWo6moTTCflTVAMU9APazN915b23/FuKov6mGD037FSOm2T42/HN PYAQ== X-Received: by 10.112.149.2 with SMTP id tw2mr12072936lbb.21.1413044318269; Sat, 11 Oct 2014 09:18:38 -0700 (PDT) Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id z2sm2832239laa.15.2014.10.11.09.18.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Oct 2014 09:18:36 -0700 (PDT) Message-ID: <5439585A.3030201@yandex.ru> Date: Sat, 11 Oct 2014 20:18:34 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <3601111412974400@web5o.yandex.ru> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: Leo Liu , "18643@debbugs.gnu.org" <18643@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 10/11/2014 05:47 PM, Stefan Monnier wrote: > But by being a separate function, users can add/remove it at will, > depending on their preference. Hmm, that's one option, yes. >> I rather think the right solution would start with a stricter convention for >> code snippets in docstrings. > > That's a non-starter, because while we can apply this to our own code, > we can't enforce it on others's, Then those others won't get Lisp completion is docstrings. Which is their choice, and not that big a deal. The convention doesn't have to be complicated. For example, we can limit ourselves to considering blocks within comments or docstrings separated by newlines from the rest of the text, and only when each line starts with 2+ (or 4+?) spaces. As a plus, we'll be able to modify the indentation function to work in these blocks, too. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 11 12:31:42 2014 Received: (at 18643) by debbugs.gnu.org; 11 Oct 2014 16:31:42 +0000 Received: from localhost ([127.0.0.1]:41240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xcza1-0000Je-3d for submit@debbugs.gnu.org; Sat, 11 Oct 2014 12:31:41 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:51204) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XczZy-0000JT-S4 for 18643@debbugs.gnu.org; Sat, 11 Oct 2014 12:31:39 -0400 Received: by mail-la0-f41.google.com with SMTP id pn19so4894131lab.28 for <18643@debbugs.gnu.org>; Sat, 11 Oct 2014 09:31:37 -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=t2QZl24fEEZCOy0sfujrdwK5e53iRydS2an6zavlYNk=; b=mVy1J8c90hznS8qwaRNfffBhzntRTzm3EzMgkPKVnB6ESnngfTiFaDuHaNX+4NflV/ eqNDW6iEdY8TFAuuFDZR5EZMtF1XoO8o9+CmlpY0AkLuQwx9acLmT0xrxr/zeVN5q+Bs 6WcXqpO0OaKBbPGlidiYbYJspLsk+DmSqIiDq7xvvzfkTysrk6Z9INke0irz1VDLWPZs Cnho7nBHSlNvEGYKzDVJq0E5PUW+Dd1PNeVI74ATgmrDhjPWVs1ULXJQeEeBeE1uXjLY WgNAkRiR1z07Uvs0+JKfNlNOOvYR+Gd2t1k18yDQifp1J69oITAqzVczsUEw2VOF3FYv 30PA== X-Received: by 10.112.183.233 with SMTP id ep9mr12131750lbc.56.1413045097714; Sat, 11 Oct 2014 09:31:37 -0700 (PDT) Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id ju20sm2845359lab.14.2014.10.11.09.31.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Oct 2014 09:31:36 -0700 (PDT) Message-ID: <54395B65.2060704@yandex.ru> Date: Sat, 11 Oct 2014 20:31:33 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <86oatmq7lc.fsf@yandex.ru> <543758F8.2000207@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: Stefan Monnier , 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 10/10/2014 08:33 AM, Leo Liu wrote: > Sorry, I am merely reporting this as a usability bug and I don't intend > to get too deep into it (too little time :(). I'm not asking you to code, just to read the available info. Otherwise you're assuming others have the time to repeat the discussions. > I failed so I spoke up but not to blame any change. Why not? vc-annotate is a standard tool. > 1. Leave room for other usage habits; Sure. But unfortunately, supporting a set of different usage habits means the result may be suboptimal for some of them. On 10/11/2014 04:25 AM, Leo Liu wrote: > This gives me a sense that you are thinking about a situation when > someone uses company and has the completions displayed immediately. Yes, that's my point of reference. But on the other hand, you could say that it just emphasises the existing problem: Lisp code outside of quotes usually constitutes the minority of the text in docstrings (and moreso in comments). The rest of the text would be better served by a different completion function (maybe dictionary-based, like Ispell). And if `lisp-completion-at-point' offers completions there, no other completion function can do so. > In standard default emacs behaviour, I had never getting anything > without me asking for it, be it in comments or strings or code. They > only appear when I ask. Maybe someone else would prefer to see actual words as completions, when they are writing prose? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 11 13:08:04 2014 Received: (at 18643) by debbugs.gnu.org; 11 Oct 2014 17:08:04 +0000 Received: from localhost ([127.0.0.1]:41256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xd09D-0001J2-VQ for submit@debbugs.gnu.org; Sat, 11 Oct 2014 13:08:04 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:43942) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xd09A-0001Ic-Pp for 18643@debbugs.gnu.org; Sat, 11 Oct 2014 13:08:01 -0400 Received: by mail-lb0-f174.google.com with SMTP id p9so4596805lbv.5 for <18643@debbugs.gnu.org>; Sat, 11 Oct 2014 10:07:59 -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=IEkbXuEJ0+RS014ck1G3TJB0xOmAmLMHS3AlAF+ckKw=; b=LWagoJLAbPwTT8zS5QC+LnADLCCmC2HO0aR/iYngM4UEJ1U4sSXLSA60Areeog2xqZ YMG0GLo3RsGVxMYuaUtE2IaPIYYxQ8Gq+GIMEKawEGwx+1sRcdsObJG4K6ll/sDji3yR 0BGAxJ8n6S6ckNiqouykdHl7SGd/KNpsr75CnJZ9dg5rmKqfIOIKjcnWtmVB+vhkpGTj IuVZSY87uIwUMlFDyCaeATBqXKIbrbN1uMtWhndyVoeMEBGIKM1gjyYs3EipojeOVJf8 NGNkCBRNuhryuqri5gpUzWcbWlJhyU4zydy1ivS5Zl39NpMi+R/FKj+HiFwjwYag8IOJ 6a+g== X-Received: by 10.152.9.37 with SMTP id w5mr12598951laa.28.1413047279919; Sat, 11 Oct 2014 10:07:59 -0700 (PDT) Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id 2sm2865190lai.36.2014.10.11.10.07.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Oct 2014 10:07:58 -0700 (PDT) Message-ID: <543963ED.2030107@yandex.ru> Date: Sat, 11 Oct 2014 21:07:57 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <86oatmq7lc.fsf@yandex.ru> <543753AC.3090604@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: Leo Liu , 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 10/10/2014 05:20 PM, Stefan Monnier wrote: >> Now I just have to wrap my head around `elisp--local-variables'. :) > > It's very simple: :) > It takes the string between the first opening paren and point, appends > a special symbol (the witness) followed by the number of missing closing > parens to make the whole string a valid sexp, than reads¯oexpands > that. And then we traverse the expanded code (a tree) straight from the > root to the leaf corresponding to point (which is done in > elisp--local-variables-1), collecting various info along the way. Thanks! I guess it might fail if some macros along the way require more arguments than we actually give them. But that can be worked around on case-by-case basis. > Of course, traversing the tree efficiently is hard/impossible because > we don't know for sure where is the witness (which represents point) in > the tree, so we'd have to go through all the nodes of the tree, whereas > we want to limit ourselves to going down from the root straight to the > right leaf without backtracking. I can see how performance could be a problem, but so far it's never been the bottleneck for me. In the cases I measured, (lisp--local-variables) takes around 1-2 ms (and up to 10ms near the end of the huge `cl--parse-loop-clause'). So even the caching mechanism you have in `lisp--local-variables-completion-table' could be unnecessary. On the other hand, I've managed to find a specific case when it fails (will file the bug shortly). From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 14 14:32:34 2014 Received: (at 18643) by debbugs.gnu.org; 14 Oct 2014 18:32:34 +0000 Received: from localhost ([127.0.0.1]:43463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe6td-0005bF-9Z for submit@debbugs.gnu.org; Tue, 14 Oct 2014 14:32:33 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:49956) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe6tb-0005b5-Hk for 18643@debbugs.gnu.org; Tue, 14 Oct 2014 14:32:32 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s9EIWUSd014800; Tue, 14 Oct 2014 14:32:30 -0400 Received: by ceviche.home (Postfix, from userid 20848) id D3E7E66089; Tue, 14 Oct 2014 14:32:26 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p Message-ID: References: <3601111412974400@web5o.yandex.ru> Date: Tue, 14 Oct 2014 14:32:26 -0400 In-Reply-To: (Leo Liu's message of "Sat, 11 Oct 2014 22:21:16 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5094=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5094> : inlines <1396> : streams <1316769> : uri <1824896> X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 18643 Cc: "18643@debbugs.gnu.org" <18643@debbugs.gnu.org>, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> I'd like to include company in core Emacs, yes. Enable it by default, >> maybe not, or not yet. But it's an important use case. > That's my impression. It is perfectly fine to make things work better > for company. I am a bit worried seeing the default get worse. I agree, we should try to handle both cases better. I.e. have a way to distinguish "the user explicitly requested completion, so try to come up with something" from the company case where we only want to auto pop up a completion menu if we're sufficiently confident that the suggestions are valuable. Question is how to do it. One way I see we could do it is by adding a property to completion data (e.g. in the data returned by the completion-at-point-function) which says something like "unsure" or "low-quality" so we could ignore those when the user hasn't explicitly requested completion. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 14 14:34:47 2014 Received: (at 18643) by debbugs.gnu.org; 14 Oct 2014 18:34:47 +0000 Received: from localhost ([127.0.0.1]:43467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe6vm-0005gl-BE for submit@debbugs.gnu.org; Tue, 14 Oct 2014 14:34:46 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:50626) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe6vj-0005gZ-SO for 18643@debbugs.gnu.org; Tue, 14 Oct 2014 14:34:44 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s9EIYgVI015343; Tue, 14 Oct 2014 14:34:43 -0400 Received: by ceviche.home (Postfix, from userid 20848) id C4B1F66089; Tue, 14 Oct 2014 14:34:42 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p Message-ID: References: <3601111412974400@web5o.yandex.ru> <5439585A.3030201@yandex.ru> Date: Tue, 14 Oct 2014 14:34:42 -0400 In-Reply-To: <5439585A.3030201@yandex.ru> (Dmitry Gutov's message of "Sat, 11 Oct 2014 20:18:34 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5094=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5094> : inlines <1396> : streams <1316771> : uri <1824897> X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 18643 Cc: Leo Liu , "18643@debbugs.gnu.org" <18643@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >>> I rather think the right solution would start with a stricter >>> convention for code snippets in docstrings. >> That's a non-starter, because while we can apply this to our own code, >> we can't enforce it on others's, > Then those others won't get Lisp completion is docstrings. Which is their > choice, and not that big a deal. There's also the case where text happens to match your convention, so the user will get completion when she doesn't want it. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 15 22:35:10 2014 Received: (at 18643) by debbugs.gnu.org; 16 Oct 2014 02:35:10 +0000 Received: from localhost ([127.0.0.1]:45027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeauD-0003ml-PF for submit@debbugs.gnu.org; Wed, 15 Oct 2014 22:35:10 -0400 Received: from mail-la0-f53.google.com ([209.85.215.53]:38513) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeauB-0003md-On for 18643@debbugs.gnu.org; Wed, 15 Oct 2014 22:35:08 -0400 Received: by mail-la0-f53.google.com with SMTP id gq15so2074816lab.40 for <18643@debbugs.gnu.org>; Wed, 15 Oct 2014 19:35:06 -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=k1gi+GQMxDJCZWMEgh9pi/2f7AJybBxH7HPYy/FTTIM=; b=oFiyiQQC1N2GaKJX90WGRWYaXLesYXZeAbVN7RMnADc7a/7i7S4BgQUL5LZ5Is88l3 jrZfP0105YessEAfqQhBgHRslQwiEkNtm9rnqDIRwVR/n+Lu8Et+N+ADZ5OvyITrRm3S W7zkK9Lxim8WtVQtZZ1iHj2RTBtgzd5E5z1T/lyrvS6C390aJTc6IdrvG+aW6SzrmN6M 5RJNuDf8uXD0LTNjHkPP9JnoqO0URl3ddnAaRPCvUETbiMfGazbdJVae/10AoEm5pDDB PsfI2/D3pmzg0Xq0QwCGRpfq4S76UVmupOFv7Wbb+buW1jHwJdJrLJWgUjuMPSnwU1Sb GTCw== X-Received: by 10.112.87.162 with SMTP id az2mr16084588lbb.15.1413426906323; Wed, 15 Oct 2014 19:35:06 -0700 (PDT) Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id am7sm7255227lbc.41.2014.10.15.19.35.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Oct 2014 19:35:05 -0700 (PDT) Message-ID: <543F2ED7.5020603@yandex.ru> Date: Thu, 16 Oct 2014 06:35:03 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <3601111412974400@web5o.yandex.ru> <5439585A.3030201@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: Leo Liu , "18643@debbugs.gnu.org" <18643@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 10/14/2014 10:34 PM, Stefan Monnier wrote: > There's also the case where text happens to match your convention, so > the user will get completion when she doesn't want it. Then the result still won't be worse than the Emacs 24.4 behavior. Still, the text written in a way I described may be not Lisp code, but it's unlikely to be prose (unless it's a way of displaying a block quote?), so this kind of heuristic can be useful anyway. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 15 22:42:27 2014 Received: (at 18643) by debbugs.gnu.org; 16 Oct 2014 02:42:28 +0000 Received: from localhost ([127.0.0.1]:45032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xeb1H-0003zz-1u for submit@debbugs.gnu.org; Wed, 15 Oct 2014 22:42:27 -0400 Received: from mail-lb0-f181.google.com ([209.85.217.181]:34585) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xeb1D-0003zj-3b for 18643@debbugs.gnu.org; Wed, 15 Oct 2014 22:42:23 -0400 Received: by mail-lb0-f181.google.com with SMTP id l4so2030803lbv.26 for <18643@debbugs.gnu.org>; Wed, 15 Oct 2014 19:42:22 -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=bIKHwbcUZnXbKaEF3eWl+Y6QrAZITLA4ZJV61RN92Uk=; b=MxuynzSAkoKhHyIZCK1SjcFST7d4BeAk6OOoqTXyGZ1Oq1GVAJlpYbvNfyWsExAD+/ U+UvIsXYNmRY1+iMQSDSie/qUs0po/M6GVHTDM4TCCIYz3kzaFeB9uwAUq876XXGfFa5 SCIJlRnEkxBui9i1G0rC8xdnSLNdohVjS9XlJqCquYB+RPvT6mHb+rw/mv7XCTOI8z/W ymwh8RPPgFi447M9cBRbvMz57lWPBdol/Cn6Kez3C0/gNIgPvTV0AAhpHRKid/6tAlpr QN5xs6Exg3mXRQW4TvPlAuGLGRQqTB4uZQusJtf17zD+eCoZO4PWXEFuGoJ0Cj7Rm6YF Ax9A== X-Received: by 10.112.47.132 with SMTP id d4mr16236134lbn.64.1413427341973; Wed, 15 Oct 2014 19:42:21 -0700 (PDT) Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id t6sm6129236lbb.23.2014.10.15.19.42.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Oct 2014 19:42:21 -0700 (PDT) Message-ID: <543F308B.4000504@yandex.ru> Date: Thu, 16 Oct 2014 06:42:19 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Stefan Monnier , Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <3601111412974400@web5o.yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: "18643@debbugs.gnu.org" <18643@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 10/14/2014 10:32 PM, Stefan Monnier wrote: > I agree, we should try to handle both cases better. I.e. have a way to > distinguish "the user explicitly requested completion, so try to come up > with something" from the company case where we only want to auto pop up > a completion menu if we're sufficiently confident that the suggestions > are valuable. The idea makes a certain amount of sense, but I'm not sure if "try to come up with something" should be performed in contexts where other completion functions are likely to be more valuable. > Question is how to do it. One way I see we could do it is by adding > a property to completion data (e.g. in the data returned by the > completion-at-point-function) which says something like "unsure" or > "low-quality" so we could ignore those when the user hasn't explicitly > requested completion. How will that interact with other elements in completion-at-point-functions? Suppose there's another function there, named ispell-complete-at-point. And suppose it always returns non-nil when in strings or comments, which looks like a reasonable behavior. Which function will be used in comment if the user explicitly requested completion, and if lisp-completion-at-point returned `unsure'? Will that depend on the order of the elements in c-a-p-f? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 15 23:36:36 2014 Received: (at 18643) by debbugs.gnu.org; 16 Oct 2014 03:36:36 +0000 Received: from localhost ([127.0.0.1]:45058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xebrg-0005OF-4A for submit@debbugs.gnu.org; Wed, 15 Oct 2014 23:36:36 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:46264) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xebrd-0005O5-6e for 18643@debbugs.gnu.org; Wed, 15 Oct 2014 23:36:33 -0400 Received: by mail-pa0-f51.google.com with SMTP id lj1so2591079pab.10 for <18643@debbugs.gnu.org>; Wed, 15 Oct 2014 20:36:32 -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=qA46PnKqq9OALn10WXzx95dApyqcBsQV5PIefEXtXgw=; b=CDPuNrqYBG/ncHlcvU7X2KCCOWyED42+ivNNMIcdIOygmpq7xCX68kivky8PJxxN2V R2Y7dndpTMMmtjOC6xxPdvwu+lTIzHwRJ5ywFlzQdVvu0HcInqME4YfjHX66E6ijlFai M8hRSOz0fXV2KLSBIE03XpIk8wtEHiiprT7aGLunOWGgB5o4i4E/KC9Pc2jpOJNpJ5KO E0djUeL38Gc3DK9eVc9gWdG/AG4WfKRovFeuvQhAlNfCux3lfJTK5OgkNFAEtMDqjlI6 tFGZuMXCg0LewRp3tdiRK9nJCdGV8BN0j30QGQvSHIF1vLbTByFPsmb+wdHSud0+N66F 6+gg== X-Received: by 10.66.249.66 with SMTP id ys2mr931796pac.143.1413430591926; Wed, 15 Oct 2014 20:36:31 -0700 (PDT) Received: from fortuna ([221.222.153.119]) by mx.google.com with ESMTPSA id ib8sm12206714pad.43.2014.10.15.20.36.29 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 15 Oct 2014 20:36:31 -0700 (PDT) From: Leo Liu To: Dmitry Gutov Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <3601111412974400@web5o.yandex.ru> <5439585A.3030201@yandex.ru> <543F2ED7.5020603@yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= Date: Thu, 16 Oct 2014 11:36:25 +0800 In-Reply-To: <543F2ED7.5020603@yandex.ru> (Dmitry Gutov's message of "Thu, 16 Oct 2014 06:35:03 +0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (CentOS 6.5) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: Stefan Monnier , "18643@debbugs.gnu.org" <18643@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-10-16 06:35 +0400, Dmitry Gutov wrote: > Still, the text written in a way I described may be not Lisp code, but > it's unlikely to be prose (unless it's a way of displaying a block > quote?), so this kind of heuristic can be useful anyway. In the past 1-2 months I happen to write an elisp tool from scratch, which has the following stats: component 1: file1: 2744 lines file2: 275 lines component 2: file1: 3194 lines with component 2 v0.7.2 released on 08 Oct 2014. The packages are developed using emacs trunk and happened to have some parts developed before the change and others after the change. When I told you I tried to live with it, I did try very hard. Speaking from experience, the recent change to elisp-completion-at-point has gotten in the way more than just once. It is painfully difficult to see how this is an improvement to the default features. (BTW, I hope to submit the packages for inclusion in emacs sometime later) Leo From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 05:59:44 2014 Received: (at 18643) by debbugs.gnu.org; 16 Oct 2014 09:59:44 +0000 Received: from localhost ([127.0.0.1]:45266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XehqR-00072H-Av for submit@debbugs.gnu.org; Thu, 16 Oct 2014 05:59:43 -0400 Received: from mail-la0-f44.google.com ([209.85.215.44]:63534) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XehqO-000727-Bk for 18643@debbugs.gnu.org; Thu, 16 Oct 2014 05:59:41 -0400 Received: by mail-la0-f44.google.com with SMTP id hs14so2568468lab.17 for <18643@debbugs.gnu.org>; Thu, 16 Oct 2014 02:59:39 -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=9GkOOqs5j+cqJEPumTUMlSA8+/QOgE26xYtXLGW9H0s=; b=Fc9RY3UKjKv8Vdll/LXVPXTwWiCgwbgJyIF72W0Zlb8KZELguPIN7ZBwP9HVdeB0Fm 4ILllpwi371y+pfBTe295op2YGbOyFxDdGle7ixHR0WTfpbgRwOUE/LH4IV6qxndQ3ry Ujo/viSQvz3qqB/vbUAve9LWzLgUG3tTmh8SVnEhU2fFmkepCePSZagRVSOpgGCE7uFW fEhPj2Z0L9t5DrpWJW3brPr9eVEF5uerAKd+YHDIjRbnG6JvCsmzT1HmPWXjixPcOkZU JmhIxtK26ctPfl06EB496Tv1Od+gKGeYEim/iLO9HjapsbVQBKtFGGkBYG6NyhweIxrJ lbRg== X-Received: by 10.112.28.75 with SMTP id z11mr269434lbg.49.1413453579193; Thu, 16 Oct 2014 02:59:39 -0700 (PDT) Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id k7sm7606969lak.22.2014.10.16.02.59.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Oct 2014 02:59:37 -0700 (PDT) Message-ID: <543F9708.1000601@yandex.ru> Date: Thu, 16 Oct 2014 13:59:36 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <3601111412974400@web5o.yandex.ru> <5439585A.3030201@yandex.ru> <543F2ED7.5020603@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18643 Cc: Stefan Monnier , "18643@debbugs.gnu.org" <18643@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 10/16/2014 07:36 AM, Leo Liu wrote: > On 2014-10-16 06:35 +0400, Dmitry Gutov wrote: >> Still, the text written in a way I described may be not Lisp code, but >> it's unlikely to be prose (unless it's a way of displaying a block >> quote?), so this kind of heuristic can be useful anyway. > ... > Speaking from experience, the recent change to elisp-completion-at-point > has gotten in the way more than just once. It is painfully difficult to > see how this is an improvement to the default features. Sorry, I don't know what you're trying to say. The heuristic I mention above is a proposal, not something already implemented, so it couldn't have helped or hurt you over these last 1-2 months. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 09:10:45 2014 Received: (at 18643) by debbugs.gnu.org; 16 Oct 2014 13:10:45 +0000 Received: from localhost ([127.0.0.1]:45376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XekpI-0004rG-Lg for submit@debbugs.gnu.org; Thu, 16 Oct 2014 09:10:44 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:34893) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XekpF-0004r5-Hd for 18643@debbugs.gnu.org; Thu, 16 Oct 2014 09:10:42 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOAEDlGKUN4Fqg0wh X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOAEDlGKUN4Fqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="94344407" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 Oct 2014 09:10:40 -0400 Received: by pastel.home (Postfix, from userid 20848) id 6B4ED85A2; Thu, 16 Oct 2014 09:10:40 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p Message-ID: References: <3601111412974400@web5o.yandex.ru> <543F308B.4000504@yandex.ru> Date: Thu, 16 Oct 2014 09:10:40 -0400 In-Reply-To: <543F308B.4000504@yandex.ru> (Dmitry Gutov's message of "Thu, 16 Oct 2014 06:42:19 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18643 Cc: Leo Liu , "18643@debbugs.gnu.org" <18643@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > The idea makes a certain amount of sense, but I'm not sure if "try to come > up with something" should be performed in contexts where other completion > functions are likely to be more valuable. Most likely the "unsure" tables would also be ":exclusive no". > How will that interact with other elements in completion-at-point-functions? We get to decide. > Which function will be used in comment if the user explicitly requested > completion, and if lisp-completion-at-point returned `unsure'? Will that > depend on the order of the elements in c-a-p-f? Yes, and it will depend on whether lisp-completion-at-point and ispell-complete-at-point return ":exclusive no". And maybe it will depend on some new-feature-to-be-invented-to-make-it-work-better. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 26 09:45:00 2022 Received: (at 18643) by debbugs.gnu.org; 26 Apr 2022 13:45:00 +0000 Received: from localhost ([127.0.0.1]:37697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njLUy-0004mn-Bo for submit@debbugs.gnu.org; Tue, 26 Apr 2022 09:45:00 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njLUw-0004mY-CW for 18643@debbugs.gnu.org; Tue, 26 Apr 2022 09:44:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gU1N2ZcZpRbPIdpMfHeX8dqqo+RNqkXCziaK47eJSlI=; b=rzCRw4jjU1bWH6mzhJ61lOs4Tl CRTQNiyAR3VZ6Qw8P1XHuyUo1Q9/PXdnJKT/CUtZ06ACf7W3JuizhHnSuBf0wmiRXJgmFKiiCsakk fRuqQ7P5QaoyC8PgAkcjFhwfucwESVC9/5D4CnlVthvnW0A3Zj6VpPgYdQlzOzShX7O0=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njLUo-00011S-0I; Tue, 26 Apr 2022 15:44:52 +0200 From: Lars Ingebrigtsen To: Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: X-Now-Playing: Coffins's _Defilements_: "I Hate You (Grief cover)" Date: Tue, 26 Apr 2022 15:44:48 +0200 In-Reply-To: (Leo Liu's message of "Mon, 06 Oct 2014 13:13:05 +0800") Message-ID: <87h76gez73.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Leo Liu writes: > emacs should only constrain itself to function completion when > absolutely sure. > > It is not a big deal if function names creep into variable completion or > vice versa. Often it is handy to comp [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18643 Cc: 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Leo Liu writes: > emacs should only constrain itself to function completion when > absolutely sure. > > It is not a big deal if function names creep into variable completion or > vice versa. Often it is handy to complete to an existing symbol and then > edit it into something else. For example, one might need to create a > variable name based on a function name. > > There are a few places where I expect to have a completion based on my > past experience but fail now. For example, in (pred ...) pattern of > pcase. Other failures, (let (|)) and (let ((|))) where | is point. > > 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. (I'm going through old bug reports that unfortunately weren't resolved at the time.) Skimming this bug report, it's not exactly clear what it's all about, but perhaps things have changed since this was reported seven years ago. That is, if you have (defun lalabar ()) (defvar lalavar nil) (let ((lala| )) and hit `C-M-i', it'll expand to lalavar, and not lalabar. But perhaps you had something other in mind? Or does this work as you wanted it to in recent Emacs versions? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 26 09:45:04 2022 Received: (at control) by debbugs.gnu.org; 26 Apr 2022 13:45:05 +0000 Received: from localhost ([127.0.0.1]:37702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njLV2-0004pB-JZ for submit@debbugs.gnu.org; Tue, 26 Apr 2022 09:45:04 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njLV0-0004mf-Hz for control@debbugs.gnu.org; Tue, 26 Apr 2022 09:45:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ri3aqkEwUA2DL5zjRc93JILQfu8nfikI/c6cRMx1aV0=; b=r8OQ0CudsolL2UD8iQZRkYb6Co NjpIY+IOgWHQL/NXDSK0mri+aUVEzzAym2aH0T0Dn/roF1Oe+R/lxAQ6/y2pH6fQ3i9ThxHo420Zr bNEbW5I+gaCGm7EhquhOW7DqCCVQo+Y4RZOuEvVMBYTijMKLxOapLSt4NRehap8MVECQ=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njLUs-00011c-Pa for control@debbugs.gnu.org; Tue, 26 Apr 2022 15:44:56 +0200 Date: Tue, 26 Apr 2022 15:44:54 +0200 Message-Id: <87fsm0ez6x.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #18643 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 18643 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 18643 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 26 11:46:53 2022 Received: (at 18643) by debbugs.gnu.org; 26 Apr 2022 15:46:53 +0000 Received: from localhost ([127.0.0.1]:40310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njNOv-0000XG-BB for submit@debbugs.gnu.org; Tue, 26 Apr 2022 11:46:53 -0400 Received: from mail-pf1-f175.google.com ([209.85.210.175]:44680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njNOt-0000X4-Rs for 18643@debbugs.gnu.org; Tue, 26 Apr 2022 11:46:52 -0400 Received: by mail-pf1-f175.google.com with SMTP id a15so18318878pfv.11 for <18643@debbugs.gnu.org>; Tue, 26 Apr 2022 08:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version; bh=jm9fvsIf+j5ATYQ+fcNTGJIbqDA/ne7aZpqPpAAMuGM=; b=kCKqpuO8yAyQf5kr12nUr4OsoU/8LW0Z+3h6I2put08s5O6c3dEEYn/MrsvceCfkkU jibKv670IB936qplg83fMbMBVaJygVmkvH00/qr/8snjCO8Ypbuwg67ZkkUc8bfaTatt 6+60+oAKGeDcx/N8BsB68PvPXnL1cHL39QDUcZ/er1fKSV6kYeTMSfVcnCXBX9MbI/Oh bCpzNuLinqiD1J9e//fSq/sGFjIXiWOaYh4rUbohGyTc6/qob4FJkpjAnJSUhfEO1Wcj kiM2rLozfYV7LGeD+OKGpOhFHXFNFqqhlqxBPRInkEGNvWVO/HWlfF1n/XiNHZSfFj/5 5dgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version; bh=jm9fvsIf+j5ATYQ+fcNTGJIbqDA/ne7aZpqPpAAMuGM=; b=SoSKnsTrR2+410+uBYi51EhDUFksq/tq0bhSdaHfj0Bf5bU6TEuPIZLFITey7MwG6S dDIWdOgtRlvMy4kzRZk4zJBfA4ngVW/xKnvydw5o0F/I17kMqI3XkuQ8AGrwXo5xalsa DYboTnPwnil+QoH+xVFSHI9SIiVAf+d3H6hP0BaYu/lnIyGtl88eNej01Hd6WfDK3dGf 3SUfBwzfBmb+FCmxYT8bjIuvzGRJpjB3ruqcAbibkis5hniijkc367c+Hr2fyCCDpUXQ Ww7AVrJ2/yIL1y992sGDfMRLUtSisSA9WVgFOf8s7obHdnBAuGGbjJAZHgoetkTs7Za3 VQIw== X-Gm-Message-State: AOAM533ZgeZCbImC89Vpp51MFS+kZodiHABjqfCJ0CjyUSs2k3AxhmOG ha81l95gQn69BAlG/LtDMImZVe5Cn3pYhGQl X-Google-Smtp-Source: ABdhPJxEf9FmS4MN+34Cu7OOK5LBSktDP6QP5KCOGhBvxtYou3NV6dQML58MUqIfwwh1x7hzgff96A== X-Received: by 2002:a05:6a00:22cd:b0:50a:69c9:1806 with SMTP id f13-20020a056a0022cd00b0050a69c91806mr25330517pfj.51.1650988005545; Tue, 26 Apr 2022 08:46:45 -0700 (PDT) Received: from zeuss-MacBook-Air.local ([119.92.1.225]) by smtp.gmail.com with ESMTPSA id 23-20020a630417000000b003aaf7f47bdfsm10134372pge.85.2022.04.26.08.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 08:46:44 -0700 (PDT) From: Leo Liu To: Lars Ingebrigtsen Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <87h76gez73.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf X0cAAAAASUVORK5CYII= Date: Tue, 26 Apr 2022 23:46:41 +0800 In-Reply-To: <87h76gez73.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 26 Apr 2022 15:44:48 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (macOS 11.6.5) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18643 Cc: 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2022-04-26 15:44 +0200, Lars Ingebrigtsen wrote: > (I'm going through old bug reports that unfortunately weren't resolved > at the time.) > > Skimming this bug report, it's not exactly clear what it's all about, > but perhaps things have changed since this was reported seven years ago. > That is, if you have > > (defun lalabar ()) > (defvar lalavar nil) > > (let ((lala| )) > > and hit `C-M-i', it'll expand to lalavar, and not lalabar. > > But perhaps you had something other in mind? Or does this work as you > wanted it to in recent Emacs versions? It's probably too late since this is like a long time ago. I remember there were some changes to elisp that caused completion to fail in some places. It was counter-productive for those who are used to the old way. For example, (pcase x ((pred |) )). Leo From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 07:52:43 2022 Received: (at 18643) by debbugs.gnu.org; 27 Apr 2022 11:52:43 +0000 Received: from localhost ([127.0.0.1]:41390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njgDr-0000UW-Jf for submit@debbugs.gnu.org; Wed, 27 Apr 2022 07:52:43 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njgDq-0000UI-6M for 18643@debbugs.gnu.org; Wed, 27 Apr 2022 07:52:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ukQ5S8UgXSw+talIMX3c91XG0wCnpF2cqn6UFscXEkU=; b=rQbK9uCdeXxoC82gGai80vHMQx gbq0CzrHv/rtWne59QcqXLyF3o3lhZ3B1IxOBpAf3STVhV/WCflZgabb0VXCCZdTGhZXFaYSPve9V KZhlgNVphzr28ckkwy7ieycmYrR0zE1pQs12XCLYBxmkOsjw9P1FJSpnCPqaEvoQuOPc=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njgDh-0004u7-WC; Wed, 27 Apr 2022 13:52:36 +0200 From: Lars Ingebrigtsen To: Leo Liu Subject: Re: bug#18643: 25.0.50; elisp--expect-function-p References: <87h76gez73.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXe0sSdel48JR3/ //8L91rsAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YEGwsYF3PM1h4AAAGISURBVCjPTdK/btswEAbw j4IVIJsMyAWsJyj6FHSQGGgmpTCFSLNtxHwKL901mB48aTAF8XvK3skFWk766f6AdxIWxasBrIUe RQ5bb5abB7JCUPxFXthiWawWM7AATCE1brV0Dh/GObcD6cnfDCQTPDvyxnB44Ha7ki76GbERNOyO E46cqlETm3oQpFKLfZAbtZ6l9OOVHxZtRSfPjGwA/8J3RRpHQZ9yTZOYxWFYmypqKL5h+P5sfGjI Ma0xPT8Zpl8aKtEZkzEtpSzusDkji5+r9xl9gWzAekuGHU4yZI9v0iFekFtFJhdPFrYUWPNCtrUk AT2QyXxy7RwIwBPZWdyNRXNWXGsQO+Q1KkEPnve6Q2nNARyc9DCyL94FrZ3ryR38vbdf0AAvst6+ YRAkvgri0ad5cCtIh1OaV2JlvfRBAyktoO+cIqxLxRgV7uc/JPf2qQ26JJ2D2yaNRIVzzSS47OVT Rec6TZv2fkb7JTj1P4KUPNJOtopJfoOtjJDaupIkwRn/nz/A5eciy6xF5wAAACV0RVh0ZGF0ZTpj cmVhdGUAMjAyMi0wNC0yN1QxMToyNDoyMyswMDowMICy9ooAAAAldEVYdGRhdGU6bW9kaWZ5ADIw MjItMDQtMjdUMTE6MjQ6MjMrMDA6MDDx7042AAAAAElFTkSuQmCC X-Now-Playing: Kate Bush's _The Dreaming_: "All The Love" Date: Wed, 27 Apr 2022 13:52:31 +0200 In-Reply-To: (Leo Liu's message of "Tue, 26 Apr 2022 23:46:41 +0800") Message-ID: <87bkwmeoao.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Leo Liu writes: > It's probably too late since this is like a long time ago. I remember > there were some changes to elisp that caused completion to fail in some > places. It was counter-productive for those who are [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18643 Cc: 18643@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Leo Liu writes: > It's probably too late since this is like a long time ago. I remember > there were some changes to elisp that caused completion to fail in some > places. It was counter-productive for those who are used to the old way. > For example, (pcase x ((pred |) )). OK; I'm closing this bug report, then. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 07:52:52 2022 Received: (at control) by debbugs.gnu.org; 27 Apr 2022 11:52:52 +0000 Received: from localhost ([127.0.0.1]:41393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njgDz-0000Uu-QC for submit@debbugs.gnu.org; Wed, 27 Apr 2022 07:52:51 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njgDy-0000Ue-0R for control@debbugs.gnu.org; Wed, 27 Apr 2022 07:52:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QqX/kLTLA26Rf40QNVNighlx85qQFPwkO2H1WTF808k=; b=LdoEYtyQM+jk850kjcbq650r1O H95SBpf8I7YILyFLOJwEjexYWLVPKIYCSeuzNUhkGLLPh9D4Kdo/czSrrmjsSGFxbTBV+DLic3MlV VDQx98WJZcwLUSWRkmhAaQyLxFWWFpykJkzgZlDZOLKMJB5/a3SvGWsnCLuOw/o3quvg=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njgDq-0004uI-7c for control@debbugs.gnu.org; Wed, 27 Apr 2022 13:52:44 +0200 Date: Wed, 27 Apr 2022 13:52:41 +0200 Message-Id: <87a6c6eoae.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #18643 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 18643 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 18643 quit From unknown Tue Aug 19 14:23:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 26 May 2022 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator