From unknown Mon Aug 18 09:05:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73330: 31.0.50; Incorrect completions for 'cond' clauses Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Sep 2024 12:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73330 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 73330@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17266630084386 (code B ref -1); Wed, 18 Sep 2024 12:37:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Sep 2024 12:36:48 +0000 Received: from localhost ([127.0.0.1]:57194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqtvL-00018e-RD for submit@debbugs.gnu.org; Wed, 18 Sep 2024 08:36:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:58180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqtvI-00018U-Jq for submit@debbugs.gnu.org; Wed, 18 Sep 2024 08:36:45 -0400 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 1sqtv1-00016K-KQ for bug-gnu-emacs@gnu.org; Wed, 18 Sep 2024 08:36:28 -0400 Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqtuw-0000cG-Uv for bug-gnu-emacs@gnu.org; Wed, 18 Sep 2024 08:36:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1726662981; bh=clkC8WTpPm5faeZURhNc1hfxgwwKtG1/xMCvkLi6ixU=; h=From:To:Subject:Date:From; b=tM7819oQ/8c/VyfLPsJZFMRwGre76NiUOiUsWFfXNLLVHnixFhqs5CC21gwIWe9QF 3DVcuB96dJ9qsNprN2H33m0iYojcLjC4yAoLCFRUMxnBEwAMpmd879cvfnxpA543Vv ToxHSzjOCjfFcPSZWLg7Imv8GwM2e54YXT8K6RF3nVqDRmZiYPrM6aoksqdB/oC71X rMHyzs87HThWtw04svujiw2sWqEdNx1p3rH7UN48W1IYCakTyMJJkBP/Ney7ivYUjS hgKcumcqTK0O3+8yzIGvR51x0fpyJR5iEHZ0NBwk9yfBm+ubwoTfC1TaEKoP8M5Or+ Hy9kOh8G/zUUA== From: Eshel Yaron Date: Wed, 18 Sep 2024 14:36:18 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) 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: -2.4 (--) Hi, 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, Eshel From unknown Mon Aug 18 09:05:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73330: 31.0.50; Incorrect completions for 'cond' clauses Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2024 10:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73330 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eshel Yaron Cc: 73330@debbugs.gnu.org Received: via spool by 73330-submit@debbugs.gnu.org id=B73330.172674046218165 (code B ref 73330); Thu, 19 Sep 2024 10:08:01 +0000 Received: (at 73330) by debbugs.gnu.org; 19 Sep 2024 10:07:42 +0000 Received: from localhost ([127.0.0.1]:59866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srE4b-0004iv-Qj for submit@debbugs.gnu.org; Thu, 19 Sep 2024 06:07:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srE4a-0004ig-82 for 73330@debbugs.gnu.org; Thu, 19 Sep 2024 06:07:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srE4D-0002fb-Dz; Thu, 19 Sep 2024 06:07:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8+RygcT3GXjxfUXdaUlOCfsXRKhbMB5cF9Ph4pEL0DQ=; b=GlEjBBy/vJRM qreRX0lOyhAN9aPjcyOVxp/BY/EBr+uwXeY1bey7CuyFTetVyfWaWhWZKFsZ4VVnpn184EIdO64/B dMlWjR7lMS7VxA/bPIImbRlDWxXxeDUb3LAxhIrURsDAauebrTZiWaugjrHhBzfvoP0/j7zIIVWlQ fPM7pUlULsrrixaRnlUo7UaPvnspyLoR5ZfvV67jzgcFDhwTqwcxy8G/HI0EC+vUDmhWkU/shB1WE c+yI5q5CUXwBQVPcPn0V7xJLwo27MBebpCaXgnr9tON1vlIc+pt3Qb1ursefiTZsh2ZvDph/m2YwL TmvfucntDdNGJEMdDi1G6A==; Date: Thu, 19 Sep 2024 13:07:13 +0300 Message-Id: <86wmj87y9a.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (bug-gnu-emacs@gnu.org) References: X-Spam-Score: -2.3 (--) 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 (---) > 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? diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 9bf6f92..2471296 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -784,13 +784,14 @@ elisp-completion-at-point (list t (elisp--completion-local-symbols) :predicate (lambda (sym) (get sym 'error-conditions)))) - ((and (or ?\( 'let 'let*) + ((and (or ?\( 'let 'let* 'cond 'cond* 'bind*) (guard (save-excursion (goto-char (1- beg)) (when (eq parent ?\() (up-list -1)) (forward-symbol -1) - (looking-at "\\_")))) + (looking-at + "\\_<\\(let\\|cond\\|bind\\*\\)\\*?\\_>")))) (list t (elisp--completion-local-symbols) :predicate #'elisp--shorthand-aware-boundp :company-kind (lambda (_) 'variable) From unknown Mon Aug 18 09:05:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73330: 31.0.50; Incorrect completions for 'cond' clauses Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2024 12:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73330 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 73330@debbugs.gnu.org Received: via spool by 73330-submit@debbugs.gnu.org id=B73330.172674875314302 (code B ref 73330); Thu, 19 Sep 2024 12:26:01 +0000 Received: (at 73330) by debbugs.gnu.org; 19 Sep 2024 12:25:53 +0000 Received: from localhost ([127.0.0.1]:59958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srGEJ-0003ib-9A for submit@debbugs.gnu.org; Thu, 19 Sep 2024 08:25:52 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:50510 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srGE2-0003i4-An for 73330@debbugs.gnu.org; Thu, 19 Sep 2024 08:25:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1726748716; bh=8+o4dKnonz6hnylt6QsAuhTaMtyj/FsIWv3FmxbQV78=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=TO2wXF3o2Z9kI5DquS7/RcUQC3Mim+luRu5q9rOEFDI0P2lm5NwHmpIVCWbUyeHGy P40kpexOg93S2f1ra1cTkS1N5qjjtJ2FY/cHeDSxJIUZMxAzkQ5PcPkOPZkNNjGFYY XWiF9Kh397JGSfb09OFAqg3yntVoG9Eukx6RfBilWwEK9a4krUXNUnI5CkplTX9XL3 2/Q948mevtTp4RsStLgmfEx3iDDkSqfe47DmGDmIjhSJFEaihsmnghljc37zHaXIWZ fI3F61JTKIwzMatGrhz7lpgRqsPspwFneBZq2HlU0b3JOFmHhngmaQRCzcwMjThKP8 XGdqdEn24LR3A== From: Eshel Yaron In-Reply-To: <86wmj87y9a.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Sep 2024 13:07:13 +0300") References: <86wmj87y9a.fsf@gnu.org> Date: Thu, 19 Sep 2024 14:25:13 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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 (-) 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, 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. Thanks, Eshel From unknown Mon Aug 18 09:05:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73330: 31.0.50; Incorrect completions for 'cond' clauses Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2024 13:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73330 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eshel Yaron Cc: 73330@debbugs.gnu.org Received: via spool by 73330-submit@debbugs.gnu.org id=B73330.172675178525062 (code B ref 73330); Thu, 19 Sep 2024 13:17:02 +0000 Received: (at 73330) by debbugs.gnu.org; 19 Sep 2024 13:16:25 +0000 Received: from localhost ([127.0.0.1]:60047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srH1F-0006W9-0j for submit@debbugs.gnu.org; Thu, 19 Sep 2024 09:16:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srH1C-0006Vx-VD for 73330@debbugs.gnu.org; Thu, 19 Sep 2024 09:16:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srH0q-0001b4-1m; Thu, 19 Sep 2024 09:16:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=WAqSXWGITn5z98RZ25MCztPQTBEbPv+eNPApS6J+p4M=; b=L3LgZSYPNq3z 0+0I465YKnllhDNx2iIH/Gi+OkTHG814V8EBsUqlzzB4FWvCTgTPezMaBrzJEb9nJH2/0ZB80RiCz XtaeTCnbRJg/Uxnh7HG9gk6HJouOa1bzl0JBrc7GGPUv6bT1Wm/znyrbcXN5M6YXKgbQjclGDPSK3 q/EmKpgtkpFhivZdmXp/BDQQ3NAM/HX4MrckAwJWHwss7qduZVZ6s88ZHsB1xgUY6uV8Vu3O5KjCA BeJvMEPIuxWm3wDcCkCrKxYX+Gb6mpJtXcKR40nwWlllCUkGy5YqzGHvE/slqMUiriHkfUrYSzXTQ kp8JKIHpLIdcp8oIXokAUA==; Date: Thu, 19 Sep 2024 16:15:56 +0300 Message-Id: <86r09f9437.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Eshel Yaron on Thu, 19 Sep 2024 14:25:13 +0200) References: <86wmj87y9a.fsf@gnu.org> X-Spam-Score: -2.3 (--) 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 (---) > 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? > 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? diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 9bf6f92..63bd685 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -784,13 +784,18 @@ elisp-completion-at-point (list t (elisp--completion-local-symbols) :predicate (lambda (sym) (get sym 'error-conditions)))) - ((and (or ?\( 'let 'let*) + ((and (or ?\( 'let 'let* 'cond 'cond* 'bind*) (guard (save-excursion (goto-char (1- beg)) (when (eq parent ?\() (up-list -1)) (forward-symbol -1) - (looking-at "\\_")))) + (or + (looking-at + "\\_<\\(let\\*?\\|bind\\*\\)\\_>") + (and (not (eq parent ?\()) + (looking-at + "\\_")))))) (list t (elisp--completion-local-symbols) :predicate #'elisp--shorthand-aware-boundp :company-kind (lambda (_) 'variable) From unknown Mon Aug 18 09:05:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73330: 31.0.50; Incorrect completions for 'cond' clauses 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 X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 73330@debbugs.gnu.org Received: via spool by 73330-submit@debbugs.gnu.org id=B73330.172675640510566 (code B ref 73330); Thu, 19 Sep 2024 14:34:01 +0000 Received: (at 73330) by debbugs.gnu.org; 19 Sep 2024 14:33:25 +0000 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 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== From: Eshel Yaron In-Reply-To: <86r09f9437.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Sep 2024 16:15:56 +0300") References: <86wmj87y9a.fsf@gnu.org> <86r09f9437.fsf@gnu.org> Date: Thu, 19 Sep 2024 16:33:03 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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 (-) 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 From unknown Mon Aug 18 09:05:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73330: 31.0.50; Incorrect completions for 'cond' clauses Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2024 14:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73330 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 73330@debbugs.gnu.org Received: via spool by 73330-submit@debbugs.gnu.org id=B73330.172675641410587 (code B ref 73330); Thu, 19 Sep 2024 14:34:02 +0000 Received: (at 73330) by debbugs.gnu.org; 19 Sep 2024 14:33:34 +0000 Received: from localhost ([127.0.0.1]:33221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srIDt-0002kh-R9 for submit@debbugs.gnu.org; Thu, 19 Sep 2024 10:33:34 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:55926 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srIDr-0002kY-Gj for 73330@debbugs.gnu.org; Thu, 19 Sep 2024 10:33:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1726756393; bh=Y/3zdi7n6EmraMgz9s4BdYJ+uZUyaPpOJyrTGCZBh9g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WkL1ncdv4SJke+Sa5O2G9SPJE7E/K1slDkbkdTUOgF7kJUVULkDU9hsFTLT5iT8Hh kz9XtlKvh9BNnYGFFTcEBhB8s7mo2jXJgRWa6s/ntdZq/bHoi6Sr3QCvwbny5tZ6le hsFTu4jYSEnQDNJo+dSI0AtTc3nXJFVScYfCP6NDmu1/nqGrbUoxBksLLj/KJEIjGw YvBtK2C443O78EswxNTGBv9MTFQoywo3QietoJ9RCk0DgdhDyjSxyHdkU9g/w14Qkw +DYGfv4GVz8l9mV8gK0lYRxVOJ/J2bG+VDW4uixnBebJD4XruxxwfwPAWSh6uFLKS0 O3FTzYPJJiJYw== From: Eshel Yaron In-Reply-To: <86r09f9437.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Sep 2024 16:15:56 +0300") References: <86wmj87y9a.fsf@gnu.org> <86r09f9437.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 19 Sep 2024 16:33:11 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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 (-) 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. Thanks! Eshel From unknown Mon Aug 18 09:05:39 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Eshel Yaron Subject: bug#73330: closed (Re: bug#73330: 31.0.50; Incorrect completions for 'cond' clauses) Message-ID: References: <86frpv8uq3.fsf@gnu.org> X-Gnu-PR-Message: they-closed 73330 X-Gnu-PR-Package: emacs Reply-To: 73330@debbugs.gnu.org Date: Thu, 19 Sep 2024 16:39:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1726763943-5793-1" This is a multi-part message in MIME format... ------------=_1726763943-5793-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #73330: 31.0.50; Incorrect completions for 'cond' clauses 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 73330@debbugs.gnu.org. --=20 73330: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D73330 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1726763943-5793-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 73330-done) by debbugs.gnu.org; 19 Sep 2024 16:38:47 +0000 Received: from localhost ([127.0.0.1]:33413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srKB4-0001UJ-IR for submit@debbugs.gnu.org; Thu, 19 Sep 2024 12:38:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srKB2-0001U5-Os for 73330-done@debbugs.gnu.org; Thu, 19 Sep 2024 12:38:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srKAf-00016T-K6; Thu, 19 Sep 2024 12:38:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=N+ivW/+yk6kM+MSdiGxTUwITJ8rJtRYJs6lhIsN0glU=; b=rdsFu4pkZLGI cdMp9UTPTtDUInwYuTc3YZFGVUlccVlU6WfrY7QvB1KkZKQtH8jGBompDHldWnt+dp4ug7wzIMK1G B5BuUW9oYpGAKf61xzlER5vlC2wvQ1c7HRwZdeipVhs4TeLXtb62XP3mlfhDvUhq9JCY0sd6BIIXJ aKY1UjO+qm+qj+Rqb15IVKYgiU5bdCQ6ZRqocL+Ub2lP9a0qiW/1wW69fwEAgE/k/KSoi81ggNJtl /eFmFyf0byiE+FjF6KEuRqNv2gUaBqx1SOXg36Wp/zm6whfP/MBKVCKrEnIceLjEXF3qrnhC0TCIs cGpcxUKSCXXbUe9fOLRNrg==; Date: Thu, 19 Sep 2024 19:38:12 +0300 Message-Id: <86frpv8uq3.fsf@gnu.org> From: Eli Zaretskii To: Eshel Yaron In-Reply-To: (message from Eshel Yaron on Thu, 19 Sep 2024 16:33:11 +0200) Subject: Re: bug#73330: 31.0.50; Incorrect completions for 'cond' clauses References: <86wmj87y9a.fsf@gnu.org> <86r09f9437.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73330-done Cc: 73330-done@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 (---) > From: Eshel Yaron > Cc: 73330@debbugs.gnu.org > Date: Thu, 19 Sep 2024 16:33:11 +0200 > > Eli Zaretskii writes: > > > 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. Thanks, installed on master, and closing the bug. ------------=_1726763943-5793-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Sep 2024 12:36:48 +0000 Received: from localhost ([127.0.0.1]:57194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqtvL-00018e-RD for submit@debbugs.gnu.org; Wed, 18 Sep 2024 08:36:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:58180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqtvI-00018U-Jq for submit@debbugs.gnu.org; Wed, 18 Sep 2024 08:36:45 -0400 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 1sqtv1-00016K-KQ for bug-gnu-emacs@gnu.org; Wed, 18 Sep 2024 08:36:28 -0400 Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqtuw-0000cG-Uv for bug-gnu-emacs@gnu.org; Wed, 18 Sep 2024 08:36:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1726662981; bh=clkC8WTpPm5faeZURhNc1hfxgwwKtG1/xMCvkLi6ixU=; h=From:To:Subject:Date:From; b=tM7819oQ/8c/VyfLPsJZFMRwGre76NiUOiUsWFfXNLLVHnixFhqs5CC21gwIWe9QF 3DVcuB96dJ9qsNprN2H33m0iYojcLjC4yAoLCFRUMxnBEwAMpmd879cvfnxpA543Vv ToxHSzjOCjfFcPSZWLg7Imv8GwM2e54YXT8K6RF3nVqDRmZiYPrM6aoksqdB/oC71X rMHyzs87HThWtw04svujiw2sWqEdNx1p3rH7UN48W1IYCakTyMJJkBP/Ney7ivYUjS hgKcumcqTK0O3+8yzIGvR51x0fpyJR5iEHZ0NBwk9yfBm+ubwoTfC1TaEKoP8M5Or+ Hy9kOh8G/zUUA== From: Eshel Yaron To: bug-gnu-emacs@gnu.org Subject: 31.0.50; Incorrect completions for 'cond' clauses X-Debbugs-Cc: Date: Wed, 18 Sep 2024 14:36:18 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit 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: -2.4 (--) Hi, 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, Eshel ------------=_1726763943-5793-1--