From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73330: 31.0.50; Incorrect completions for 'cond' clauses Date: Thu, 19 Sep 2024 16:33:03 +0200 Message-ID: References: <86wmj87y9a.fsf@gnu.org> <86r09f9437.fsf@gnu.org> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17850"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73330@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 19 16:34:15 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1srIEY-0004KX-5Z for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Sep 2024 16:34:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srIE6-0003Li-Bp; Thu, 19 Sep 2024 10:33:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srIE5-0003LS-4M for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 10:33:45 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1srIE4-00036F-RD for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 10:33:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=+9A9+BVeVbRTN1AkkMu/MMup4/oIBxtlzwYSkimMFco=; b=se5KfBn2blRExzp8BxPaCy8c3B4U9HW0TZA4SmKH7mWPNEc/kwn/vXv1n8k8n/9P4M/0DRmriUqQI+iTDPEj7GNTHKKVK5X8H7OXQNx2dF1kBSfL0bNE45iwjSXOu1f9aODdXf+WfasKODSnfCMGbCxX+DkJ9m4yQHyHfqlB5Ukb0E6kn8ncN7p0lltgOKjjvmy45BYbmPgoCIb+1sQkhNdDViwrtJRYOrIQ8dxgSpMspuXi6HqIlyTBU6RiIECNIr12ZOUIogNeJ17NkRqlDKmei61xWjzssk2nbqoNO6QoMBC6fTjbzywAQ8vw0kAeA3yAlGl58M98fpEsurCERw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srIEL-0002la-Ua for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 10:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2024 14:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73330 X-GNU-PR-Package: emacs Original-Received: via spool by 73330-submit@debbugs.gnu.org id=B73330.172675640510566 (code B ref 73330); Thu, 19 Sep 2024 14:34:01 +0000 Original-Received: (at 73330) by debbugs.gnu.org; 19 Sep 2024 14:33:25 +0000 Original-Received: from localhost ([127.0.0.1]:33218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srIDl-0002kL-FH for submit@debbugs.gnu.org; Thu, 19 Sep 2024 10:33:25 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16]:38360 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srIDj-0002kB-4j for 73330@debbugs.gnu.org; Thu, 19 Sep 2024 10:33:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1726756385; bh=k8T1oJl1Pm/wRhH3k8bcaIvGizhVKK6m53d/2V5cWe0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=NAvsBFB29VR7ayAuZvZHpASiKLkNj3PqD/KCvQvQyAdMFxQZHNYG33jmPOnAk+QF6 yA4ECnyi6w6ac08W0gQwrL9UClZCrFCAchT28N1ZPYGF+ZDcR4UvrvZZH981yRJgxf qByHAjRPAJctUxovtlnC4Tx/FlVTaqwmT8e6/0RH21z9fw5pU2bsiLnEUEJSaBeUt8 ccxCqshl9wZRSymu2JEks8pZnfhlAg8q+GTQJR0EI9+818fNL0WZ4HNhBeltuQpE5m HZlZ5Dl8F1Xyc7NJZAiDqfXyVmXmGosofDNlz85fTT6LNOlzElxQYxYLUxiEolxJYv XQImncFKrk1kA== In-Reply-To: <86r09f9437.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Sep 2024 16:15:56 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292056 Archived-At: Eli Zaretskii writes: >> From: Eshel Yaron >> Cc: 73330@debbugs.gnu.org >> Date: Thu, 19 Sep 2024 14:25:13 +0200 >> >> Eli Zaretskii writes: >> >> >> Date: Wed, 18 Sep 2024 14:36:18 +0200 >> >> From: Eshel Yaron via "Bug reports for GNU Emacs, >> >> the Swiss army knife of text editors" >> >> >> >> 1. emacs -Q >> >> 2. Insert "(cond (current-p >> >> 3. Hit M-TAB to complete >> >> >> >> We're completing a symbol in the condition of a cond clause, so it is >> >> expected to be completed as a variable, to current-prefix-argument. >> >> However, Emacs mistakenly thinks that we're completing a function name, >> >> and completes to current-bidi-paragraph-direction. >> > >> > Thanks. Does the patch below give good results? >> >> It helps > > Does "helps" mean the original scenario is fixed? or are there any > leftovers in that scenario? Yes, it fixed the original scenario. >> but also seems to cause a regression. With this change I get: >> >> 1. emacs -Q >> 2. Insert "(cond ((current-p" >> ^note the additional parenthesis >> 3. Hit M-TAB to complete >> >> This shows an opposite bug: Emacs should complete function names (and >> without the change, it does), but with the change we now get variable >> name completion. > > How about the patch below? That works well in both the original scenario and the modified one. Thank! Eshel