From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jan 2014 04:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 16604@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13911435928601 (code B ref -1); Fri, 31 Jan 2014 04:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Jan 2014 04:46:32 +0000 Received: from localhost ([127.0.0.1]:42146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W95zs-0002Ef-A3 for submit@debbugs.gnu.org; Thu, 30 Jan 2014 23:46:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56008) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W95zq-0002EY-Nv for submit@debbugs.gnu.org; Thu, 30 Jan 2014 23:46:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W95zk-0001lq-4f for submit@debbugs.gnu.org; Thu, 30 Jan 2014 23:46:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W95zk-0001ll-1a for submit@debbugs.gnu.org; Thu, 30 Jan 2014 23:46:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W95ze-0007Xj-3W for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2014 23:46:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W95zY-0001kX-8o for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2014 23:46:18 -0500 Received: from mail-ea0-x22f.google.com ([2a00:1450:4013:c01::22f]:42346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W95zY-0001kP-1g for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2014 23:46:12 -0500 Received: by mail-ea0-f175.google.com with SMTP id z10so2042868ead.20 for ; Thu, 30 Jan 2014 20:46:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=3TIG62LjCusbE5sHEVBb1PI+LQo8rH7eN5kJ+bWBEvY=; b=JrvaJhankTF9eG/+1SYPS7LtVB9jJS/MnhMWRmah3NH0t80nJRHBP4sDNfwpoW6NLi vPxOgd6ulY3XbSFW++yMHvo4PuZPaTHg2hpJg1o9hb3aCIO0eSr5aKl9/QWeMm8BJfSo sPxwsOX37gGEdBWx2vxC3oQi8xN0yTG8QL1Q5EovcQ6eZZvi9WSiX/7vQDhgS9CtwSrW uzfco+8Vg+ItRI2VSnDUohVSFbmbnOhlMlklLEXxvCt4frUHVCnjQ+ChB0khsqarxppe DHJ3Q+vb6v1pJaR5tGlf2cjR4vrrv2fJqfo+8tggUJdUN7mhwQXz1rzUbJOQOAtVBIf5 6fiA== X-Received: by 10.15.56.132 with SMTP id y4mr15413813eew.61.1391143570875; Thu, 30 Jan 2014 20:46:10 -0800 (PST) Received: from axl (62-151-136.netrun.cytanet.com.cy. [62.228.151.136]) by mx.google.com with ESMTPSA id m9sm17930246eeh.3.2014.01.30.20.46.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 Jan 2014 20:46:10 -0800 (PST) From: Dmitry Gutov Date: Fri, 31 Jan 2014 06:46:01 +0200 Message-ID: <87d2j8yd12.fsf@yandex.ru> 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-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 (----) Example: (defmacro fizzle (&rest body) (declare (indent defun)) `(let ((coooooooon 0)) ,@body)) (defun fozzle () (fizzle (foo co))) 1. Evaluate the macro. 2. Put point after "co" in fozzle, press C-M-i. 3. See it get automatically completed to "coooooooon", even though there are many dynamic variables that start with "co". In GNU Emacs 24.3.50.4 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.6) of 2014-01-23 on axl Repository revision: 116128 dmantipov@yandex.ru-20140123121808-f1qhuudj4oy3bxbi Windowing system distributor `The X.Org Foundation', version 11.0.11405000 System Description: Ubuntu 13.10 From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jan 2014 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.139117889727528 (code B ref 16604); Fri, 31 Jan 2014 14:35:02 +0000 Received: (at 16604) by debbugs.gnu.org; 31 Jan 2014 14:34:57 +0000 Received: from localhost ([127.0.0.1]:42469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9FBJ-00079v-1I for submit@debbugs.gnu.org; Fri, 31 Jan 2014 09:34:57 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:27750) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9FBG-00079n-Sy for 16604@debbugs.gnu.org; Fri, 31 Jan 2014 09:34:55 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+J67/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av8EABK/CFHO+J67/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="46491117" Received: from 206-248-158-187.dsl.teksavvy.com (HELO pastel.home) ([206.248.158.187]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 31 Jan 2014 09:34:54 -0500 Received: by pastel.home (Postfix, from userid 20848) id 2687A6011E; Fri, 31 Jan 2014 09:34:54 -0500 (EST) From: Stefan Monnier Message-ID: References: <87d2j8yd12.fsf@yandex.ru> Date: Fri, 31 Jan 2014 09:34:54 -0500 In-Reply-To: <87d2j8yd12.fsf@yandex.ru> (Dmitry Gutov's message of "Fri, 31 Jan 2014 06:46:01 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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 (/) > 3. See it get automatically completed to "coooooooon", even though there > are many dynamic variables that start with "co". Right, the completion first tries locally let-bound vars. It only tries to complete against global vars once this fails. Stefan From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jan 2014 14:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.139117905127791 (code B ref 16604); Fri, 31 Jan 2014 14:38:02 +0000 Received: (at 16604) by debbugs.gnu.org; 31 Jan 2014 14:37:31 +0000 Received: from localhost ([127.0.0.1]:42473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9FDm-0007EA-PL for submit@debbugs.gnu.org; Fri, 31 Jan 2014 09:37:31 -0500 Received: from mail-wg0-f44.google.com ([74.125.82.44]:47885) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9FDj-0007E1-SG for 16604@debbugs.gnu.org; Fri, 31 Jan 2014 09:37:28 -0500 Received: by mail-wg0-f44.google.com with SMTP id l18so8837437wgh.11 for <16604@debbugs.gnu.org>; Fri, 31 Jan 2014 06:37:26 -0800 (PST) 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=BhPVYh48pTRvnr8blWaFWc0S3G/O6IY6raLidLjqfDk=; b=xN50nGTnGTZuGiZDIpgzdCgU39DmfETI1CAlK+XNA1Al5NWS2UebFVmgnrQi1y8owX PaG6oyk7WDsVj4WolG06rwdJYbDGlbzB48Mo0mLbLENiaer2jNv0/iutwlXmFf1XOAQX BGe8DTEXpq/fLb6KBaQISG20MurNP8PW2kkeWxn0qgfUMi+zuknnDMH7sWKdQgQ1yU3x BxO2UosBspw76JTs4TUISMmuTj+x1vGouqDq/fIObjUu2AR2Hu94lZCSPqzaTbLGmtUG smOXpj43D+spRs0sYxoryrCDWOzq8yeC30pnjXqrvUDJPmlRnyUTY9RxZ58UdYrVpn+b HiDg== X-Received: by 10.180.98.165 with SMTP id ej5mr8553017wib.33.1391179046708; Fri, 31 Jan 2014 06:37:26 -0800 (PST) Received: from [192.168.0.94] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by mx.google.com with ESMTPSA id hy8sm20054152wjb.2.2014.01.31.06.37.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 06:37:25 -0800 (PST) Message-ID: <52EBB523.70501@yandex.ru> Date: Fri, 31 Jan 2014 16:37:23 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 References: <87d2j8yd12.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) 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 31.01.2014 16:34, Stefan Monnier wrote: >> 3. See it get automatically completed to "coooooooon", even though there >> are many dynamic variables that start with "co". > > Right, the completion first tries locally let-bound vars. It only tries > to complete against global vars once this fails. So this is the intended behavior? I don't like it. I'd rather it offered both as completions, but put the local vars at the top (not sure if that's possible with completion-at-point). From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point In-Reply-To: <87d2j8yd12.fsf@yandex.ru> Resent-From: Thierry Volpiatto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jan 2014 15:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 16604@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.139118075731446 (code B ref -1); Fri, 31 Jan 2014 15:06:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Jan 2014 15:05:57 +0000 Received: from localhost ([127.0.0.1]:43378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9FfJ-0008B7-0v for submit@debbugs.gnu.org; Fri, 31 Jan 2014 10:05:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53652) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9FfF-0008Aq-Uw for submit@debbugs.gnu.org; Fri, 31 Jan 2014 10:05:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9Ff9-0004tP-7N for submit@debbugs.gnu.org; Fri, 31 Jan 2014 10:05:53 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FSL_HELO_BARE_IP_2,RCVD_NUMERIC_HELO autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Ff8-0004tH-Hc for submit@debbugs.gnu.org; Fri, 31 Jan 2014 10:05:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Ff2-0005xU-Mp for bug-gnu-emacs@gnu.org; Fri, 31 Jan 2014 10:05:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9Few-0004rA-Iu for bug-gnu-emacs@gnu.org; Fri, 31 Jan 2014 10:05:40 -0500 Received: from plane.gmane.org ([80.91.229.3]:55462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Fev-0004r5-Uz for bug-gnu-emacs@gnu.org; Fri, 31 Jan 2014 10:05:34 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W9Feu-0005tD-Ux for bug-gnu-emacs@gnu.org; Fri, 31 Jan 2014 16:05:32 +0100 Received: from 37.161.177.243 ([37.161.177.243]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jan 2014 16:05:32 +0100 Received: from thierry.volpiatto by 37.161.177.243 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jan 2014 16:05:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ From: Thierry Volpiatto Date: Fri, 31 Jan 2014 16:05:18 +0100 Organization: Emacs Helm Lines: 15 Message-ID: <8738k4nqdt.fsf@gmail.com> References: <87d2j8yd12.fsf@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 37.161.177.243 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:czn0JUGQff5Ifjk9I8KE6FkfgLI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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: -1.4 (-) 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: -3.2 (---) Stefan Monnier writes: >> 3. See it get automatically completed to "coooooooon", even though there >> are many dynamic variables that start with "co". > > Right, the completion first tries locally let-bound vars. It only tries > to complete against global vars once this fails. Very bad IMO, what you do here is assuming the user wants to complete against the let bounded var, which is maybe not the case. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Feb 2014 01:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.13913059593784 (code B ref 16604); Sun, 02 Feb 2014 01:53:01 +0000 Received: (at 16604) by debbugs.gnu.org; 2 Feb 2014 01:52:39 +0000 Received: from localhost ([127.0.0.1]:45532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9mEg-0000yx-Qw for submit@debbugs.gnu.org; Sat, 01 Feb 2014 20:52:39 -0500 Received: from mail-ea0-f176.google.com ([209.85.215.176]:63629) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9mEd-0000ym-DW for 16604@debbugs.gnu.org; Sat, 01 Feb 2014 20:52:36 -0500 Received: by mail-ea0-f176.google.com with SMTP id h14so3038914eaj.35 for <16604@debbugs.gnu.org>; Sat, 01 Feb 2014 17:52:34 -0800 (PST) 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=ePcUkmYrh/NtfFpXQkY3e9EHVhYaaATfmFZCLX3g6JQ=; b=F9ICCodgyjat1JKV1nbbTX7B/XABGi8o8LnM4yNKdT93f44kVM43WALVzy53LjOTGe V/zJRR3BpcoCmIQMoD/UOSEaoN+Urtfm4mhIKOBcuIPsiBYG/2bX9OhMTYntIzDL3qOo zwLp48tYV8idV1vwhQm2uvfGqADk18kzl8m9BSYWgVjxoW+rL9YTtqNX9SfL52U+zTtS IdKth9wfw9PmfcUqz8VIh74RbCK3fQDNPWu52vzABv3WV0NimTYuzK+3AteeVNMuYULG ABCQdKsSTs+6JJBP3RUobTFBOb9aYdYHDpfqbNLbI63qA2DnZEGol+u1Lm6ewFPTyipc L0Sg== X-Received: by 10.15.35.194 with SMTP id g42mr33905133eev.20.1391305954450; Sat, 01 Feb 2014 17:52:34 -0800 (PST) Received: from [192.168.10.2] (31-122-60.netrun.cytanet.com.cy. [31.153.122.60]) by mx.google.com with ESMTPSA id x2sm56061238eeo.8.2014.02.01.17.52.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Feb 2014 17:52:33 -0800 (PST) Message-ID: <52EDA4DE.8050904@yandex.ru> Date: Sun, 02 Feb 2014 03:52:30 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 References: <87d2j8yd12.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) 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 (/) Is it okay to install the following patch? On a related note, company-capf returns nil to `duplicates', but with the patch below, for example, I do receive duplicates from it. And with another, functional completion table I wrote in a third-party package. Should I change `duplicates' to t? === modified file 'lisp/emacs-lisp/lisp.el' --- lisp/emacs-lisp/lisp.el 2014-01-01 07:43:34 +0000 +++ lisp/emacs-lisp/lisp.el 2014-02-02 01:42:32 +0000 @@ -830,7 +830,7 @@ ;; use it to provide a more specific completion table in some ;; cases. E.g. filter out keywords that are not understood by ;; the macro/function being called. - (list nil (completion-table-in-turn + (list nil (completion-table-merge lisp--local-variables-completion-table obarray) ;Could be anything. :annotation-function === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2014-01-07 23:36:29 +0000 +++ lisp/minibuffer.el 2014-02-02 01:46:41 +0000 @@ -393,6 +393,27 @@ (complete-with-action action table string pred)) tables))) +(defun completion-table-merge (&rest tables) + "Create a completion table that collects completions from all TABLES." + ;; FIXME: same caveat as in `completion-table-in-turn', only harder + ;; to fix. + (lambda (string pred action) + (cond + ((null action) + (try-completion string + (mapcar (lambda (table) + (try-completion string table pred)) + tables) + pred)) + ((eq action t) + (apply #'append (mapcar (lambda (table) + (all-completions string table pred)) + tables))) + ((not (or (eq (car-safe action) 'boundaries) + (eq action 'metadata))) + (completion--some (lambda (table) (test-completion string table pred)) + tables))))) + (defun completion-table-with-quoting (table unquote requote) ;; A difficult part of completion-with-quoting is to map positions in the ;; quoted string to equivalent positions in the unquoted string and From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Feb 2014 02:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.13913087708213 (code B ref 16604); Sun, 02 Feb 2014 02:40:01 +0000 Received: (at 16604) by debbugs.gnu.org; 2 Feb 2014 02:39:30 +0000 Received: from localhost ([127.0.0.1]:45565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9my2-00028O-Au for submit@debbugs.gnu.org; Sat, 01 Feb 2014 21:39:30 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:3266) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9my0-00028E-Fr for 16604@debbugs.gnu.org; Sat, 01 Feb 2014 21:39:28 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+J67/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av8EABK/CFHO+J67/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="46592986" Received: from 206-248-158-187.dsl.teksavvy.com (HELO pastel.home) ([206.248.158.187]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 01 Feb 2014 21:39:27 -0500 Received: by pastel.home (Postfix, from userid 20848) id 3DB8D600F8; Sat, 1 Feb 2014 21:39:26 -0500 (EST) From: Stefan Monnier Message-ID: References: <87d2j8yd12.fsf@yandex.ru> <52EDA4DE.8050904@yandex.ru> Date: Sat, 01 Feb 2014 21:39:26 -0500 In-Reply-To: <52EDA4DE.8050904@yandex.ru> (Dmitry Gutov's message of "Sun, 02 Feb 2014 03:52:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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 (/) > Is it okay to install the following patch? I think it should wait. I also think it should be configurable (I definitely prefer the current behavior; in my use cases your behavior makes the lisp--local-variables-completion-table pretty much useless because there's almost always some other global variable that starts with a similar prefix). > On a related note, company-capf returns nil to `duplicates', but with the > patch below, for example, I do receive duplicates from it. And with another, > functional completion table I wrote in a third-party package. Should > I change `duplicates' to t? Hmm... I think so, yes. Stefan From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Feb 2014 03:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.139131001710374 (code B ref 16604); Sun, 02 Feb 2014 03:01:01 +0000 Received: (at 16604) by debbugs.gnu.org; 2 Feb 2014 03:00:17 +0000 Received: from localhost ([127.0.0.1]:45573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9nI8-0002hG-OR for submit@debbugs.gnu.org; Sat, 01 Feb 2014 22:00:17 -0500 Received: from mail-ee0-f51.google.com ([74.125.83.51]:57210) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9nI6-0002h7-4n for 16604@debbugs.gnu.org; Sat, 01 Feb 2014 22:00:14 -0500 Received: by mail-ee0-f51.google.com with SMTP id b57so2993702eek.38 for <16604@debbugs.gnu.org>; Sat, 01 Feb 2014 19:00:13 -0800 (PST) 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=iVvF9t91EnkcEuVoqolAzkmda24GrmpyhsRr/glUbwc=; b=aesNePbbMERxumI7YIuZdA2wETVS+yytwKGPKcoMm9trPgfQqfiABp5N7M4D5JZxlx 5bbSLEoVQ8PD0vPEtgSmY9pdQUYgSWKYPuKcLb+RCaqoTy0B4qb+LwZZ5n94vdNgNcuc O0+SBWBvbrEXdsipryLnl4QyHbK11znHZ4AGpO7YTjccZur+pDpXgkoz17X3Mm0HPdqn ndkR5OKlQ5ehaSJVsAypx3N2Kg+W2JzilnrVoTx9hdEj/7GBUGbHBRREHe37IgmmJCK5 bd5AsQjoe5ZUJ2pTU3Y6Bv23iNNiygPr3EQ8ZxpjKWEIKqHGXZ6KahgvjIADh+J47wMZ /b4w== X-Received: by 10.14.194.131 with SMTP id m3mr34925461een.2.1391310013109; Sat, 01 Feb 2014 19:00:13 -0800 (PST) Received: from [192.168.10.2] (31-122-60.netrun.cytanet.com.cy. [31.153.122.60]) by mx.google.com with ESMTPSA id 46sm56458122ees.4.2014.02.01.19.00.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Feb 2014 19:00:12 -0800 (PST) Message-ID: <52EDB4B9.9000901@yandex.ru> Date: Sun, 02 Feb 2014 05:00:09 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 References: <87d2j8yd12.fsf@yandex.ru> <52EDA4DE.8050904@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) 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 02.02.2014 04:39, Stefan Monnier wrote: > I think it should wait. Pity. It's a regression compared to company-elisp, as far as I'm concerned. > I also think it should be configurable (I > definitely prefer the current behavior; in my use cases your behavior > makes the lisp--local-variables-completion-table pretty much useless > because there's almost always some other global variable that starts > with a similar prefix). True, lisp--local-variables-completion-table is less useful this way, but it still plays a part when the binding form hasn't been evaluated yet, and so the local variable symbols aren't yet in obarray. If you were using Company, by the way, you could take advantage of the ordering of candidates based on their occurrences in the visible part of the buffer, which will be supported in the next version. Naturally, local vars will be at the top, as long as they're visible in the window. From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Feb 2014 14:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.139135034211419 (code B ref 16604); Sun, 02 Feb 2014 14:13:01 +0000 Received: (at 16604) by debbugs.gnu.org; 2 Feb 2014 14:12:22 +0000 Received: from localhost ([127.0.0.1]:45725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9xmX-0002y6-7V for submit@debbugs.gnu.org; Sun, 02 Feb 2014 09:12:21 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:5481) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9xmU-0002xy-Ng for 16604@debbugs.gnu.org; Sun, 02 Feb 2014 09:12:19 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+J67/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av8EABK/CFHO+J67/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="46611382" Received: from 206-248-158-187.dsl.teksavvy.com (HELO pastel.home) ([206.248.158.187]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 02 Feb 2014 09:12:17 -0500 Received: by pastel.home (Postfix, from userid 20848) id B702D600EC; Sun, 2 Feb 2014 09:12:14 -0500 (EST) From: Stefan Monnier Message-ID: References: <87d2j8yd12.fsf@yandex.ru> <52EDA4DE.8050904@yandex.ru> <52EDB4B9.9000901@yandex.ru> Date: Sun, 02 Feb 2014 09:12:14 -0500 In-Reply-To: <52EDB4B9.9000901@yandex.ru> (Dmitry Gutov's message of "Sun, 02 Feb 2014 05:00:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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 (/) > Pity. It's a regression compared to company-elisp, as far as I'm concerned. You can still use company-elisp in the mean time. >> I also think it should be configurable (I definitely prefer the >> current behavior; in my use cases your behavior makes the >> lisp--local-variables-completion-table pretty much useless because >> there's almost always some other global variable that starts with >> a similar prefix). > True, lisp--local-variables-completion-table is less useful this way, but it > still plays a part when the binding form hasn't been evaluated yet, and so > the local variable symbols aren't yet in obarray. I guess it's true that if you choose among a list of completions (or if you use completion cycling), the extra elements from obarray aren't nearly as problematic as if you rely on just "plain completion". Stefan From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Feb 2014 18:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.13913655017699 (code B ref 16604); Sun, 02 Feb 2014 18:25:02 +0000 Received: (at 16604) by debbugs.gnu.org; 2 Feb 2014 18:25:01 +0000 Received: from localhost ([127.0.0.1]:46607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WA1j2-000205-Mx for submit@debbugs.gnu.org; Sun, 02 Feb 2014 13:25:00 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:4035) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WA1iz-0001zw-WA for 16604@debbugs.gnu.org; Sun, 02 Feb 2014 13:24:58 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+J67/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av8EABK/CFHO+J67/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="46619930" Received: from 206-248-158-187.dsl.teksavvy.com (HELO pastel.home) ([206.248.158.187]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 02 Feb 2014 13:24:56 -0500 Received: by pastel.home (Postfix, from userid 20848) id 29088600F5; Sun, 2 Feb 2014 13:24:54 -0500 (EST) From: Stefan Monnier Message-ID: References: <87d2j8yd12.fsf@yandex.ru> <52EDA4DE.8050904@yandex.ru> <52EDB4B9.9000901@yandex.ru> Date: Sun, 02 Feb 2014 13:24:54 -0500 In-Reply-To: (Stefan Monnier's message of "Sun, 02 Feb 2014 09:12:14 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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 guess it's true that if you choose among a list of completions (or > if you use completion cycling), the extra elements from obarray aren't > nearly as problematic as if you rely on just "plain completion". So maybe "merge" is indeed a better default than "in-turn". The behavior I'm looking for in completion-at-point should probably be obtained more along the lines of what is done in file-name completion where completion-ignored-extensions is used before calling try-completion. Stefan From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Feb 2014 02:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.139139300428501 (code B ref 16604); Mon, 03 Feb 2014 02:04:02 +0000 Received: (at 16604) by debbugs.gnu.org; 3 Feb 2014 02:03:24 +0000 Received: from localhost ([127.0.0.1]:46989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WA8sd-0007Pc-RE for submit@debbugs.gnu.org; Sun, 02 Feb 2014 21:03:24 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:46271) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WA8sb-0007PU-MH for 16604@debbugs.gnu.org; Sun, 02 Feb 2014 21:03:22 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpYzZ/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av8EABK/CFFFpYzZ/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="46635331" Received: from 69-165-140-217.dsl.teksavvy.com (HELO pastel.home) ([69.165.140.217]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 02 Feb 2014 21:03:20 -0500 Received: by pastel.home (Postfix, from userid 20848) id 15120600F8; Sun, 2 Feb 2014 21:03:20 -0500 (EST) From: Stefan Monnier Message-ID: References: <87d2j8yd12.fsf@yandex.ru> <52EDA4DE.8050904@yandex.ru> <52EDB4B9.9000901@yandex.ru> Date: Sun, 02 Feb 2014 21:03:19 -0500 In-Reply-To: (Stefan Monnier's message of "Sun, 02 Feb 2014 13:24:54 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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 (/) > So maybe "merge" is indeed a better default than "in-turn". I guess it means it might be worth trying to fix it for 24.4. But your completion-table-merge needs to be improved: the list passed to the outer `try-completion' needs to only hold strings, whereas the inner `try-completion's can return nil or t. Stefan From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Feb 2014 03:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.13913993186003 (code B ref 16604); Mon, 03 Feb 2014 03:49:02 +0000 Received: (at 16604) by debbugs.gnu.org; 3 Feb 2014 03:48:38 +0000 Received: from localhost ([127.0.0.1]:47069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAAWR-0001Yh-F0 for submit@debbugs.gnu.org; Sun, 02 Feb 2014 22:48:37 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:53643) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAAWP-0001YZ-HG for 16604@debbugs.gnu.org; Sun, 02 Feb 2014 22:48:34 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpYzZ/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IPAS-Result: Av8EABK/CFFFpYzZ/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="46645073" Received: from 69-165-140-217.dsl.teksavvy.com (HELO pastel.home) ([69.165.140.217]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 02 Feb 2014 22:48:32 -0500 Received: by pastel.home (Postfix, from userid 20848) id 73DF2619BA; Sun, 2 Feb 2014 22:48:32 -0500 (EST) From: Stefan Monnier Message-ID: References: <87d2j8yd12.fsf@yandex.ru> <52EDA4DE.8050904@yandex.ru> <52EDB4B9.9000901@yandex.ru> Date: Sun, 02 Feb 2014 22:48:32 -0500 In-Reply-To: (Stefan Monnier's message of "Sun, 02 Feb 2014 21:03:19 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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 (/) >> So maybe "merge" is indeed a better default than "in-turn". > I guess it means it might be worth trying to fix it for 24.4. > But your completion-table-merge needs to be improved: the list passed to > the outer `try-completion' needs to only hold strings, whereas the inner > `try-completion's can return nil or t. Also, the outer try-completion could end up returning t if one of the inner ones returns the string we're trying to complete. We might be better off always going through "(apply #'append (mapcar #'all-completions ...))", e.g. via completion-table-dynamic. Also, we should try and check that the sub-tables all have "trivial" boundaries, and no quoting. Stefan From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Feb 2014 05:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.139149223428454 (code B ref 16604); Tue, 04 Feb 2014 05:38:01 +0000 Received: (at 16604) by debbugs.gnu.org; 4 Feb 2014 05:37:14 +0000 Received: from localhost ([127.0.0.1]:48645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAYh7-0007Or-FF for submit@debbugs.gnu.org; Tue, 04 Feb 2014 00:37:14 -0500 Received: from mail-ee0-f50.google.com ([74.125.83.50]:52376) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAYh4-0007Oi-IE for 16604@debbugs.gnu.org; Tue, 04 Feb 2014 00:37:11 -0500 Received: by mail-ee0-f50.google.com with SMTP id d17so3997076eek.23 for <16604@debbugs.gnu.org>; Mon, 03 Feb 2014 21:37:09 -0800 (PST) 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=RNqeH0OLdiSq0Nz4Zlj8j+3d36KacoCtKEgTHriLbVM=; b=TMGRRrjv8Zqk5AdWmHbCADIOevbRGaUuD3YoK205Y1qyZDIppNBzQeCMzsag0z2pg8 WYck1xrcMTIyXLgRfVLBvJ8s82TRybw3jHJwgX+gXbyInRkQ88yP+na72CzL8c2ub+JF t9SuBobuyDxHP4JKig5Uhgp9HhMqjZdcSwQPTc74ihZmiBLRAKXU6xU7JYVOKp/XUU3U 4hM6fqgXUrv56me1erCF0HcyFKZDJkoGW1L18FBy/vT30c28tC9Jzj6oMpEDhW9mMmm2 cGKkTtdprjMcPOUxtP0alqD8iHjNbTIYyFWIVPvLVs2sTbLDz/Fa3KhDp6vlgmwNUe7m MYDA== X-Received: by 10.14.212.71 with SMTP id x47mr215571eeo.98.1391492229760; Mon, 03 Feb 2014 21:37:09 -0800 (PST) Received: from [192.168.10.2] (83-54-31.netrun.cytanet.com.cy. [83.168.54.31]) by mx.google.com with ESMTPSA id y47sm36735834eel.14.2014.02.03.21.37.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Feb 2014 21:37:08 -0800 (PST) Message-ID: <52F07C82.4080707@yandex.ru> Date: Tue, 04 Feb 2014 07:37:06 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 References: <87d2j8yd12.fsf@yandex.ru> <52EDA4DE.8050904@yandex.ru> <52EDB4B9.9000901@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) 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 02.02.2014 20:24, Stefan Monnier wrote: > The behavior I'm looking for in completion-at-point should probably be > obtained more along the lines of what is done in file-name completion > where completion-ignored-extensions is used before calling > try-completion. I'm not sure I understand. Would there be a variable defining a regexp or glob for variable and function names that will be ignored unless they are the only candidates? > Also, we should try and check that the sub-tables all have "trivial" boundaries, and no quoting. Do we do that at "runtime" (after the lambda has been returned)? And just blow up calls with action `metadata' or `boundaries . ...' with error whenever that's not true? I figured just documenting problematic cases might be enough (like `completion-table-in-turn' does, I suppose it has a similar problem with quoting). > Also, the outer try-completion could end up returning t if one of the inner ones returns the string we're trying to complete. We might be better off always going through "(apply #'append (mapcar #'all-completions ...))", e.g. via completion-table-dynamic. Sounds not very efficient. See the updated patch, does this look right to you? I have a hard time testing it, though. lisp-completion-at-point seems to suggest any symbols that I've ever typed anyway, so there's no way to check that lisp--local-variables-completion-table is even used. === modified file 'lisp/emacs-lisp/lisp.el' --- lisp/emacs-lisp/lisp.el 2014-01-01 07:43:34 +0000 +++ lisp/emacs-lisp/lisp.el 2014-02-02 01:42:32 +0000 @@ -830,7 +830,7 @@ ;; use it to provide a more specific completion table in some ;; cases. E.g. filter out keywords that are not understood by ;; the macro/function being called. - (list nil (completion-table-in-turn + (list nil (completion-table-merge lisp--local-variables-completion-table obarray) ;Could be anything. :annotation-function === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2014-01-07 23:36:29 +0000 +++ lisp/minibuffer.el 2014-02-04 05:25:30 +0000 @@ -393,6 +393,36 @@ (complete-with-action action table string pred)) tables))) +(defun completion-table-merge (&rest tables) + "Create a completion table that collects completions from all TABLES." + ;; FIXME: same caveat as in `completion-table-in-turn', only harder + ;; to fix. + (lambda (string pred action) + (cond + ((null action) + (let ((retvals (mapcar (lambda (table) + (try-completion string table pred)) + tables)) + (prelim (try-completion string retvals pred))) + (cond + ((and (stringp prelim) (not (memq t retvals))) prelim) + ((null prelim) (and (memq t retvals) t)) + ;; Here `prelim' is either t, and that means there's at least + ;; one string in `retvals', and all of them are equal to + ;; STRING. + ;; Or `prelim' is a string, but there's a `t' in `retvals', + ;; which means those matches won't all match `prelim'. + (t string)))) + ((eq action t) + + (apply #'append (mapcar (lambda (table) + (all-completions string table pred)) + tables))) + (t + (completion--some (lambda (table) + (complete-with-action action table string pred)) + tables))))) + (defun completion-table-with-quoting (table unquote requote) ;; A difficult part of completion-with-quoting is to map positions in the ;; quoted string to equivalent positions in the unquoted string and From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Feb 2014 17:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.13915365085054 (code B ref 16604); Tue, 04 Feb 2014 17:56:02 +0000 Received: (at 16604) by debbugs.gnu.org; 4 Feb 2014 17:55:08 +0000 Received: from localhost ([127.0.0.1]:49689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAkDC-0001JP-EH for submit@debbugs.gnu.org; Tue, 04 Feb 2014 12:55:07 -0500 Received: from mercure.iro.umontreal.ca ([132.204.24.67]:58925) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAkD6-0001Ix-I5 for 16604@debbugs.gnu.org; Tue, 04 Feb 2014 12:55:01 -0500 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 4F37384E49; Tue, 4 Feb 2014 12:54:59 -0500 (EST) Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 368331E5913; Tue, 4 Feb 2014 12:54:35 -0500 (EST) Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id 0777BB40FE; Tue, 4 Feb 2014 12:54:34 -0500 (EST) From: Stefan Monnier Message-ID: References: <87d2j8yd12.fsf@yandex.ru> <52EDA4DE.8050904@yandex.ru> <52EDB4B9.9000901@yandex.ru> <52F07C82.4080707@yandex.ru> Date: Tue, 04 Feb 2014 12:54:34 -0500 In-Reply-To: <52F07C82.4080707@yandex.ru> (Dmitry Gutov's message of "Tue, 04 Feb 2014 07:37:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-Spam-Status: No X-Spam-Score: -2.9 (--) 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: -2.9 (--) > I'm not sure I understand. Would there be a variable defining a regexp or > glob for variable and function names that will be ignored unless they are > the only candidates? I was thinking of a new property which would define a function which reduces the set of candidates considered for completion-try-completions. File completion could use it to implement completion-ignored-extensions and we could use it here to prefer a local varname. >> Also, we should try and check that the sub-tables all have "trivial" >> boundaries, and no quoting. > Do we do that at "runtime" (after the lambda has been returned)? And just > blow up calls with action `metadata' or `boundaries . ...' with error > whenever that's not true? We don't want to do those checks all the time, so it should probably be done only once when we combine the two tables (if possible) or not at all. > I figured just documenting problematic cases might be enough (like > completion-table-in-turn' does, I suppose it has a similar problem with > quoting). Right. > Sounds not very efficient. Probably lost in the noise. > See the updated patch, does this look right to you? Could be, see below. > I have a hard time testing it, though. lisp-completion-at-point seems to > suggest any symbols that I've ever typed anyway, so there's no way to check > that lisp--local-variables-completion-table is even used. Sounds like a bug in lisp-completion-at-point. > + (let ((retvals (mapcar (lambda (table) > + (try-completion string table pred)) > + tables)) > + (prelim (try-completion string retvals pred))) try-completion's behavior when passed a list mixing strings and symbols is not really defined. So this second call to `try-completion' relies on largely undocumented behavior. Two solutions: either you add a comment about what behavior you assume, or you change the code to avoid this problem. E.g. change retvals with (delq nil ...) and replace t with `string'. Stefan From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Feb 2014 04:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.139157528119273 (code B ref 16604); Wed, 05 Feb 2014 04:42:01 +0000 Received: (at 16604) by debbugs.gnu.org; 5 Feb 2014 04:41:21 +0000 Received: from localhost ([127.0.0.1]:50013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAuIb-00050n-3K for submit@debbugs.gnu.org; Tue, 04 Feb 2014 23:41:21 -0500 Received: from mail-ee0-f44.google.com ([74.125.83.44]:37052) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAuIZ-00050e-8c for 16604@debbugs.gnu.org; Tue, 04 Feb 2014 23:41:19 -0500 Received: by mail-ee0-f44.google.com with SMTP id c13so4735110eek.3 for <16604@debbugs.gnu.org>; Tue, 04 Feb 2014 20:41:18 -0800 (PST) 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=utTdWImZsnpT7L3J6atgxZfkEQ69EtP4hIOLv+Ueajo=; b=FC3OF3Mo/L6sZ0XunDVU+uMfxnD5pN4qnGupRl9Ke5xVqVIc1D2Yh+bBXkL8yW0u5p Mdx2mJeLO14jw8+xqUlGn5Wpw5V2GX+rglgtmtKrRbmZ/XHLo6NKHbCju4Mh5WS/E2sW 6MHXYJhJOvcU51cKl0R6ETBRf4U+g6ODXbc3ADPkACJV190UccXPyBF8f+sdU+Hn8hsc JuAYBOe94Zde4aNvOxK7GiqCs1xNQlly+8rt6fMOUI4OSLXFAxkKJeyjdkhZL+rWjssR R7d4F6EX3E36LRh3LCWYqTJ0dUoiodv34o1EKMixCBI2Mq+K+IWc0dDuNGzXgTLasRcO A/PA== X-Received: by 10.14.5.11 with SMTP id 11mr19130339eek.57.1391575278342; Tue, 04 Feb 2014 20:41:18 -0800 (PST) Received: from [192.168.10.2] (83-46-90.netrun.cytanet.com.cy. [83.168.46.90]) by mx.google.com with ESMTPSA id g1sm96651953eet.6.2014.02.04.20.41.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Feb 2014 20:41:17 -0800 (PST) Message-ID: <52F1C0EA.9090406@yandex.ru> Date: Wed, 05 Feb 2014 06:41:14 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 References: <87d2j8yd12.fsf@yandex.ru> <52EDA4DE.8050904@yandex.ru> <52EDB4B9.9000901@yandex.ru> <52F07C82.4080707@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) 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 04.02.2014 19:54, Stefan Monnier wrote: > I was thinking of a new property which would define a function which > reduces the set of candidates considered for > completion-try-completions. File completion could use it to implement > completion-ignored-extensions and we could use it here to prefer > a local varname. An approach that would work for completion-at-point, but wouldn't touch compan-capf? Sounds promising, though out of scope for this bug. > We don't want to do those checks all the time, so it should probably be > done only once when we combine the two tables (if possible) `completion-metadata' requires both input string and a predicate (I guess, for maximum flexibility of functional completion tables). Pass it an empty string and a nil? And completion boundaries requires suffix as an input. I guess we could see if the table supports boundaries at all by passing an empty string, and if so, raise an error (ignoring the possibility that the table supports only a certain set of suffixes). In that case, we'd be breaking support for merging tables that define boundaries, but are known by the caller to return identical ones. Which could be useful, I guess. > or not at all. Sounds good to me. > Sounds like a bug in lisp-completion-at-point. See http://debbugs.gnu.org/16646. >> + (let ((retvals (mapcar (lambda (table) >> + (try-completion string table pred)) >> + tables)) >> + (prelim (try-completion string retvals pred))) > > try-completion's behavior when passed a list mixing strings and symbols > is not really defined. So this second call to `try-completion' relies > on largely undocumented behavior. Two solutions: either you add > a comment about what behavior you assume, or you change the code to > avoid this problem. > > E.g. change retvals with (delq nil ...) and replace t with `string'. Sure, thanks for catching this. === modified file 'lisp/emacs-lisp/lisp.el' --- lisp/emacs-lisp/lisp.el 2014-01-01 07:43:34 +0000 +++ lisp/emacs-lisp/lisp.el 2014-02-02 01:42:32 +0000 @@ -830,7 +830,7 @@ ;; use it to provide a more specific completion table in some ;; cases. E.g. filter out keywords that are not understood by ;; the macro/function being called. - (list nil (completion-table-in-turn + (list nil (completion-table-merge lisp--local-variables-completion-table obarray) ;Could be anything. :annotation-function === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2014-01-07 23:36:29 +0000 +++ lisp/minibuffer.el 2014-02-05 04:38:11 +0000 @@ -388,11 +388,38 @@ "Create a completion table that tries each table in TABLES in turn." ;; FIXME: the boundaries may come from TABLE1 even when the completion list ;; is returned by TABLE2 (because TABLE1 returned an empty list). + ;; Same potential problem if any of the tables use quoting. (lambda (string pred action) (completion--some (lambda (table) (complete-with-action action table string pred)) tables))) +(defun completion-table-merge (&rest tables) + "Create a completion table that collects completions from all TABLES." + ;; FIXME: same caveats as in `completion-table-in-turn', only harder + ;; to fix. + (lambda (string pred action) + (cond + ((null action) + (let ((retvals (mapcar (lambda (table) + (try-completion string table pred)) + tables))) + (if (member string retvals) + string + (try-completion string + (mapcar (lambda (value) + (if (eq value t) string value)) + (delq nil retvals)) + pred)))) + ((eq action t) + (apply #'append (mapcar (lambda (table) + (all-completions string table pred)) + tables))) + (t + (completion--some (lambda (table) + (complete-with-action action table string pred)) + tables))))) + (defun completion-table-with-quoting (table unquote requote) ;; A difficult part of completion-with-quoting is to map positions in the ;; quoted string to equivalent positions in the unquoted string and From unknown Mon Jun 23 16:47:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16604: 24.3.50; False negatives in lisp-completion-at-point Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Feb 2014 13:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 16604@debbugs.gnu.org Received: via spool by 16604-submit@debbugs.gnu.org id=B16604.139160839922468 (code B ref 16604); Wed, 05 Feb 2014 13:54:01 +0000 Received: (at 16604) by debbugs.gnu.org; 5 Feb 2014 13:53:19 +0000 Received: from localhost ([127.0.0.1]:50309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WB2uk-0005qK-OF for submit@debbugs.gnu.org; Wed, 05 Feb 2014 08:53:19 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:57480) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WB2ui-0005qC-Pp for 16604@debbugs.gnu.org; Wed, 05 Feb 2014 08:53:17 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpZBG/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGOSIoggzGBXoMV X-IPAS-Result: Av4EABK/CFFFpZBG/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGOSIoggzGBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="46826313" Received: from 69-165-144-70.dsl.teksavvy.com (HELO pastel.home) ([69.165.144.70]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 Feb 2014 08:53:15 -0500 Received: by pastel.home (Postfix, from userid 20848) id C9301606BB; Wed, 5 Feb 2014 08:53:15 -0500 (EST) From: Stefan Monnier Message-ID: References: <87d2j8yd12.fsf@yandex.ru> <52EDA4DE.8050904@yandex.ru> <52EDB4B9.9000901@yandex.ru> <52F07C82.4080707@yandex.ru> <52F1C0EA.9090406@yandex.ru> Date: Wed, 05 Feb 2014 08:53:15 -0500 In-Reply-To: <52F1C0EA.9090406@yandex.ru> (Dmitry Gutov's message of "Wed, 05 Feb 2014 06:41:14 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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 (/) > `completion-metadata' requires both input string and a predicate (I guess, > for maximum flexibility of functional completion tables). Pass it an empty > string and a nil? Right. > And completion boundaries requires suffix as an input. The suffix is not a problem. But the prefix is, because with an empty string, the boundary will always be zero. And we can't disallow tables that return an explicit 0 boundary. >> or not at all. > Sounds good to me. Yup, sounds pretty good. >> Sounds like a bug in lisp-completion-at-point. > See http://debbugs.gnu.org/16646. Thanks. > Sure, thanks for catching this. Please install, thank you, Stefan From unknown Mon Jun 23 16:47:21 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Dmitry Gutov Subject: bug#16604: closed (Re: bug#16604: 24.3.50; False negatives in lisp-completion-at-point) Message-ID: References: <52F2E78E.1010904@yandex.ru> <87d2j8yd12.fsf@yandex.ru> X-Gnu-PR-Message: they-closed 16604 X-Gnu-PR-Package: emacs Reply-To: 16604@debbugs.gnu.org Date: Thu, 06 Feb 2014 01:39:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1391650742-8831-1" This is a multi-part message in MIME format... ------------=_1391650742-8831-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #16604: 24.3.50; False negatives in lisp-completion-at-point which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 16604@debbugs.gnu.org. --=20 16604: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D16604 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1391650742-8831-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 16604-done) by debbugs.gnu.org; 6 Feb 2014 01:38:29 +0000 Received: from localhost ([127.0.0.1]:51720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WBDvA-0002HH-Qk for submit@debbugs.gnu.org; Wed, 05 Feb 2014 20:38:29 -0500 Received: from mail-ea0-f177.google.com ([209.85.215.177]:57264) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WBDv8-0002H8-0E for 16604-done@debbugs.gnu.org; Wed, 05 Feb 2014 20:38:26 -0500 Received: by mail-ea0-f177.google.com with SMTP id n15so588826ead.36 for <16604-done@debbugs.gnu.org>; Wed, 05 Feb 2014 17:38:25 -0800 (PST) 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=FimqUTUYuU9aUgo+WwjaAx6OfcdgLX1+hUldDTOEvSg=; b=Ijw8BkJ7lZUHLuBubzhu0IJDWAoYBcbTne28t7Gd0dOuD6ASvsIFxTYzzhfI9D87Ho gWMjDQFXQJ0viKY5bPeGXbW9I5lbwqkP4m2F3RyMFFiDoE5uK1MMGHcJoDUZhOAIBTxd qRm6MJV3ZY6E71Yny7GtbOl1iP8tR9Tmc3wM3MnQC1u5uoNHnn6Md+bp/crcJyznCrAL zXPaGHv7fECAqYzCzsut0BAhDC+5oGOHzEhk0I2oiYEfHOWffqL3H4PpXA9ZO9MJZAhx xy8YRRhpISiDj7iSEn7qSCG9CLOZlznUcf06Zf/bGxSY4TIb9N7KZchNJZQT73SVQOCT HMpQ== X-Received: by 10.14.127.200 with SMTP id d48mr5447894eei.9.1391650705094; Wed, 05 Feb 2014 17:38:25 -0800 (PST) Received: from [192.168.10.2] (62-36-157.netrun.cytanet.com.cy. [62.228.36.157]) by mx.google.com with ESMTPSA id m1sm108234659een.7.2014.02.05.17.38.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Feb 2014 17:38:24 -0800 (PST) Message-ID: <52F2E78E.1010904@yandex.ru> Date: Thu, 06 Feb 2014 03:38:22 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#16604: 24.3.50; False negatives in lisp-completion-at-point References: <87d2j8yd12.fsf@yandex.ru> <52EDA4DE.8050904@yandex.ru> <52EDB4B9.9000901@yandex.ru> <52F07C82.4080707@yandex.ru> <52F1C0EA.9090406@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 16604-done Cc: 16604-done@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 (/) Version: 24.4 On 05.02.2014 15:53, Stefan Monnier wrote: > The suffix is not a problem. But the prefix is, because with an empty > string, the boundary will always be zero. And we can't disallow tables > that return an explicit 0 boundary. True. > Please install, thank you, Revision 116279. ------------=_1391650742-8831-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 31 Jan 2014 04:46:32 +0000 Received: from localhost ([127.0.0.1]:42146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W95zs-0002Ef-A3 for submit@debbugs.gnu.org; Thu, 30 Jan 2014 23:46:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56008) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W95zq-0002EY-Nv for submit@debbugs.gnu.org; Thu, 30 Jan 2014 23:46:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W95zk-0001lq-4f for submit@debbugs.gnu.org; Thu, 30 Jan 2014 23:46:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W95zk-0001ll-1a for submit@debbugs.gnu.org; Thu, 30 Jan 2014 23:46:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W95ze-0007Xj-3W for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2014 23:46:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W95zY-0001kX-8o for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2014 23:46:18 -0500 Received: from mail-ea0-x22f.google.com ([2a00:1450:4013:c01::22f]:42346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W95zY-0001kP-1g for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2014 23:46:12 -0500 Received: by mail-ea0-f175.google.com with SMTP id z10so2042868ead.20 for ; Thu, 30 Jan 2014 20:46:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=3TIG62LjCusbE5sHEVBb1PI+LQo8rH7eN5kJ+bWBEvY=; b=JrvaJhankTF9eG/+1SYPS7LtVB9jJS/MnhMWRmah3NH0t80nJRHBP4sDNfwpoW6NLi vPxOgd6ulY3XbSFW++yMHvo4PuZPaTHg2hpJg1o9hb3aCIO0eSr5aKl9/QWeMm8BJfSo sPxwsOX37gGEdBWx2vxC3oQi8xN0yTG8QL1Q5EovcQ6eZZvi9WSiX/7vQDhgS9CtwSrW uzfco+8Vg+ItRI2VSnDUohVSFbmbnOhlMlklLEXxvCt4frUHVCnjQ+ChB0khsqarxppe DHJ3Q+vb6v1pJaR5tGlf2cjR4vrrv2fJqfo+8tggUJdUN7mhwQXz1rzUbJOQOAtVBIf5 6fiA== X-Received: by 10.15.56.132 with SMTP id y4mr15413813eew.61.1391143570875; Thu, 30 Jan 2014 20:46:10 -0800 (PST) Received: from axl (62-151-136.netrun.cytanet.com.cy. [62.228.151.136]) by mx.google.com with ESMTPSA id m9sm17930246eeh.3.2014.01.30.20.46.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 Jan 2014 20:46:10 -0800 (PST) From: Dmitry Gutov To: bug-gnu-emacs@gnu.org Subject: 24.3.50; False negatives in lisp-completion-at-point Date: Fri, 31 Jan 2014 06:46:01 +0200 Message-ID: <87d2j8yd12.fsf@yandex.ru> 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 (----) Example: (defmacro fizzle (&rest body) (declare (indent defun)) `(let ((coooooooon 0)) ,@body)) (defun fozzle () (fizzle (foo co))) 1. Evaluate the macro. 2. Put point after "co" in fozzle, press C-M-i. 3. See it get automatically completed to "coooooooon", even though there are many dynamic variables that start with "co". In GNU Emacs 24.3.50.4 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.6) of 2014-01-23 on axl Repository revision: 116128 dmantipov@yandex.ru-20140123121808-f1qhuudj4oy3bxbi Windowing system distributor `The X.Org Foundation', version 11.0.11405000 System Description: Ubuntu 13.10 ------------=_1391650742-8831-1--