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:11 +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="17589"; 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:14 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 1srIEX-0004K1-Tm 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 1srIE8-0003M9-SQ; Thu, 19 Sep 2024 10:33:48 -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-0003LT-7I 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-00036I-Ud 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=LQ3ZjTD4p49GIir/5oA5giLi+w72WKsnFJ1uHEQq458=; b=aQW2tpyXXE0VlPP365wSQ/vrmTuSMDKr/S6Bl5B9VZjBzq+oPz0tMVRPm+vIbMN38NidCMYkSrcs8UfNNAdLYuZq3EEOPZd+9Wq8V9xpL4vDWBqSnEY6oM8N7NWfnsS/ZvlsnVQJlVV4a9SSm0iQmM5T3pJDnesHsLNZmQZDfsIKJWFZoYlB1/xpAzDgi4oH3DgcSl4dlWNRkNCV0m79RFlp+1ga5ndv11/KAMsile9tKJs75YhY27RHPNEukRrNGqBdlfR/fjdLf1G7/tjgaqZAVe9XqrG4cLzXzxwPT0fksb3uavEpJI2d55Q3fNJZGd0Wy8DHIgBxfYHV0setbA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srIEM-0002li-E5 for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 10:34:02 -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:02 +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.172675641410587 (code B ref 73330); Thu, 19 Sep 2024 14:34:02 +0000 Original-Received: (at 73330) by debbugs.gnu.org; 19 Sep 2024 14:33:34 +0000 Original-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 Original-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== 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:292055 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. Thanks! Eshel