From unknown Wed Jun 18 23:08:02 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#14061 <14061@debbugs.gnu.org> To: bug#14061 <14061@debbugs.gnu.org> Subject: Status: 24.3.50; Globbing in completion not working correctly Reply-To: bug#14061 <14061@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:08:02 +0000 retitle 14061 24.3.50; Globbing in completion not working correctly reassign 14061 emacs submitter 14061 Michael Heerdegen severity 14061 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 26 18:40:08 2013 Received: (at submit) by debbugs.gnu.org; 26 Mar 2013 22:40:08 +0000 Received: from localhost ([127.0.0.1]:46483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UKcXF-0000cz-FJ for submit@debbugs.gnu.org; Tue, 26 Mar 2013 18:40:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37858) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UKcXB-0000cf-Pk for submit@debbugs.gnu.org; Tue, 26 Mar 2013 18:40:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKcUt-0000lH-PX for submit@debbugs.gnu.org; Tue, 26 Mar 2013 18:37:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-103.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:52749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKcUt-0000lD-MB for submit@debbugs.gnu.org; Tue, 26 Mar 2013 18:37:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKcUs-0008H3-Ry for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2013 18:37:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKcUr-0000kd-PJ for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2013 18:37:38 -0400 Received: from mout.web.de ([212.227.17.11]:49578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKcUr-0000k6-F8 for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2013 18:37:37 -0400 Received: from drachen.dragon ([89.204.135.66]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0LnSGg-1UsKkn2EEI-00h72M; Tue, 26 Mar 2013 23:37:35 +0100 From: Michael Heerdegen To: bug-gnu-emacs@gnu.org Subject: 24.3.50; Globbing in completion not working correctly Date: Tue, 26 Mar 2013 23:37:29 +0100 Message-ID: <87ip4dg53q.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V02:K0:Y6EKu+OSP9wNW/hu6NsXAoh+mu4DKJRuK/c6i0XeHOB 2JOz9FxbdgzLDMkSJ6gq+cQsrtt1QiU2ATyo336PeSF1Rke9JW MDQV6ubIi1C8mWmkpNw9YYoaRiUXY1+dAYBjmq31jrDw1T9oEL 07J9QifLLU+64bwHtY4jg9xNsXXnE7SXW8wEx/+IXkJLH3d432 KPQohQakw6eLqb4nc3oqnumLZfN/Zi8KfZZzP9LO98= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hi, In emacs -Q, eval (require 'bytecomp) ; just for the defvar Now C-h v *compil*warn* TAB TAB "byte-compile-warnings" should be among the matches, but that's not the case. Thanks, Michael. In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-03-17 on dex, modified by Debian (emacs-snapshot package, version 2:20130317-1) Windowing system distributor `The X.Org Foundation', version 11.0.10707000 System Description: Debian GNU/Linux 7.0 (wheezy) From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 26 20:47:43 2013 Received: (at 14061) by debbugs.gnu.org; 27 Mar 2013 00:47:43 +0000 Received: from localhost ([127.0.0.1]:46554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UKeWl-0003k5-3B for submit@debbugs.gnu.org; Tue, 26 Mar 2013 20:47:43 -0400 Received: from mout.web.de ([212.227.15.3]:51368) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UKeWh-0003jv-GP for 14061@debbugs.gnu.org; Tue, 26 Mar 2013 20:47:40 -0400 Received: from drachen.dragon ([89.204.135.66]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MQ6H9-1UFzmr0Ulv-0053hz; Wed, 27 Mar 2013 01:45:16 +0100 From: Michael Heerdegen To: 14061@debbugs.gnu.org Subject: Re: bug#14061: 24.3.50; Globbing in completion not working correctly References: <87ip4dg53q.fsf@web.de> Date: Wed, 27 Mar 2013 01:44:39 +0100 In-Reply-To: <87ip4dg53q.fsf@web.de> (Michael Heerdegen's message of "Tue, 26 Mar 2013 23:37:29 +0100") Message-ID: <87ip4disco.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V02:K0:bGdIHvRauzAZH8TZVJpSRNw8vrljQHjVwGHLTf3pvY0 GyGo+O87SvDocDy4jEmcyGIaOIFh8aL8N6Q3MJQZK+f/QUW8t5 4hKjV0aWHJEuTeKMhLCghHxRisY9OXkM4lB8cKqjhl6PN06LIH 0sr2VGJSO5M+PDprWMvFHAD4ppdyHqoU6ql4Dg10u4aDZg8a2Y ruCQ4PzKYgS4YoGvDc6uIMOAFx6rRTNc4mnQ9kRBXA= X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 14061 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.2 (---) Michael Heerdegen writes: > C-h v *compil*warn* TAB TAB > > "byte-compile-warnings" should be among the matches, but that's not > the case. Looks like `completion-pcm--merge-completions' is introducing the error: (completion-pcm--merge-completions '("byte-compile-error-on-warn" "byte-compile-warning-types" "byte-compile-warnings" "byte-compile-last-warned-form") '(star "compil" star "warn")) ==> (any "warn" "-" star "compile-" "byte-") ^ ^ Note the two hyphens. Regards, Michael From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 26 22:52:19 2013 Received: (at 14061) by debbugs.gnu.org; 27 Mar 2013 02:52:19 +0000 Received: from localhost ([127.0.0.1]:46639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UKgTK-0006kw-UX for submit@debbugs.gnu.org; Tue, 26 Mar 2013 22:52:19 -0400 Received: from mout.web.de ([212.227.15.3]:53286) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UKgTH-0006kn-5r for 14061@debbugs.gnu.org; Tue, 26 Mar 2013 22:52:16 -0400 Received: from drachen.dragon ([89.204.135.66]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0M6mPA-1UZ1vM41zg-00wawh; Wed, 27 Mar 2013 03:49:52 +0100 From: Michael Heerdegen To: 14061@debbugs.gnu.org Subject: Re: bug#14061: 24.3.50; Globbing in completion not working correctly References: <87ip4dg53q.fsf@web.de> <87ip4disco.fsf@web.de> Date: Wed, 27 Mar 2013 03:49:38 +0100 In-Reply-To: <87ip4disco.fsf@web.de> (Michael Heerdegen's message of "Wed, 27 Mar 2013 01:44:39 +0100") Message-ID: <87ehf1imkd.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V02:K0:eEwnkoRll8ylilOi8gRunNf0LxFXkuNmybnElzOKbLi ezzrCM2imuILVBNFBF3l4Xk70fqNbY+EDtnaexdt/DEoT5dRyz DDjKQbdwG59B36jlbgW5whIM8mdJtcBPMuRhUBq1W1TTwkF8kF 8tfmGkMRBkgQhvB63GEVxugl/nAF+FvPS+Pvjo3zbiTUEBaNjw VJRV6/jUq68bcUjqRfaB7lcc1zquUglmloK+rrtups= X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 14061 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.2 (---) Michael Heerdegen writes: > > C-h v *compil*warn* TAB TAB > > > > "byte-compile-warnings" should be among the matches, but that's not > > the case. > > Looks like `completion-pcm--merge-completions' is introducing the error: > > (completion-pcm--merge-completions > '("byte-compile-error-on-warn" > "byte-compile-warning-types" > "byte-compile-warnings" > "byte-compile-last-warned-form") > '(star "compil" star "warn")) > > ==> > > (any "warn" "-" star "compile-" "byte-") Some more thoughts: In the definition of `completion-pcm--merge-completions', we have (when (memq elem '(star point prefix)) ;; Extract common suffix additionally to common prefix. ;; Only do it for `point', `star', and `prefix' since for ;; `any' it could lead to a merged completion that ;; doesn't itself match the candidates. (let ((suffix (completion--common-suffix comps))) (cl-assert (stringp suffix)) (unless (equal suffix "") (push suffix res)))) In the pathological cases, the `suffix' includes a hyphen that is already included in the prefix: (completion-pcm--merge-completions '("byte-compile-error-on-warn" "byte-compile-warning-types" "byte-compile-warnings" "byte-compile-last-warned-form") '(star "compil" star "warn")) ;; suffix == "-" (completion-pcm--merge-completions '("byte-compile-a-warning-types" "byte-compile-a-test-warning-types") '(star "compile" star "types")) ;; suffix == "-warning-" but not all cases where `suffix' starts with "-" are problematic: (completion-pcm--merge-completions '("byte-compile-a-c-b-warning-types" "byte-compile-a-test-b-warning-types") '(star "compile" star "types")) so it would be wrong to remove a leading "-" from `suffix' unconditionally. Dunno what a good fix would look like. It tried (let* ((pre-length (length prefix)) (suffix (completion--common-suffix (mapcar (lambda (comp) (substring comp pre-length)) comps)))) (cl-assert (stringp suffix)) (unless (equal suffix "") (push suffix res))) which seems to work, but my insight in this code is limited. HTH, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 27 10:43:50 2013 Received: (at 14061-done) by debbugs.gnu.org; 27 Mar 2013 14:43:50 +0000 Received: from localhost ([127.0.0.1]:47637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UKrZt-0008FX-E0 for submit@debbugs.gnu.org; Wed, 27 Mar 2013 10:43:49 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:43837) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UKrZs-0008FO-0h for 14061-done@debbugs.gnu.org; Wed, 27 Mar 2013 10:43:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLY0Zg3EDpHqBXoMTgUo X-IPAS-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLY0Zg3EDpHqBXoMTgUo X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="5905054" Received: from 69-196-180-174.dsl.teksavvy.com (HELO ceviche.home) ([69.196.180.174]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 27 Mar 2013 10:41:19 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 623EA66152; Wed, 27 Mar 2013 10:41:21 -0400 (EDT) From: Stefan Monnier To: Michael Heerdegen Subject: Re: bug#14061: 24.3.50; Globbing in completion not working correctly Message-ID: References: <87ip4dg53q.fsf@web.de> <87ip4disco.fsf@web.de> <87ehf1imkd.fsf@web.de> Date: Wed, 27 Mar 2013 10:41:21 -0400 In-Reply-To: <87ehf1imkd.fsf@web.de> (Michael Heerdegen's message of "Wed, 27 Mar 2013 03:49:38 +0100") 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.5 (/) X-Debbugs-Envelope-To: 14061-done Cc: 14061-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Dunno what a good fix would look like. It tried > (let* ((pre-length (length prefix)) > (suffix (completion--common-suffix > (mapcar (lambda (comp) (substring comp pre-length)) > comps)))) > (cl-assert (stringp suffix)) > (unless (equal suffix "") > (push suffix res))) > which seems to work, but my insight in this code is limited. You were right on the money. I installed a slightly refined fix, which tries to optimize away a few cases. Thank you, Stefan From unknown Wed Jun 18 23:08:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 25 Apr 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator