From unknown Sat Aug 09 20:51:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14061: 24.3.50; Globbing in completion not working correctly Resent-From: Michael Heerdegen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Mar 2013 22:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14061 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 14061@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13643376082438 (code B ref -1); Tue, 26 Mar 2013 22:41:02 +0000 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 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-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 unknown Sat Aug 09 20:51:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14061: 24.3.50; Globbing in completion not working correctly Resent-From: Michael Heerdegen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Mar 2013 00:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14061 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 14061@debbugs.gnu.org Received: via spool by 14061-submit@debbugs.gnu.org id=B14061.136434526314393 (code B ref 14061); Wed, 27 Mar 2013 00:48:02 +0000 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 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-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 unknown Sat Aug 09 20:51:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14061: 24.3.50; Globbing in completion not working correctly Resent-From: Michael Heerdegen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Mar 2013 02:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14061 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 14061@debbugs.gnu.org Received: via spool by 14061-submit@debbugs.gnu.org id=B14061.136435273925978 (code B ref 14061); Wed, 27 Mar 2013 02:53:02 +0000 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 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-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 unknown Sat Aug 09 20:51:05 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Michael Heerdegen Subject: bug#14061: closed (Re: bug#14061: 24.3.50; Globbing in completion not working correctly) Message-ID: References: <87ip4dg53q.fsf@web.de> X-Gnu-PR-Message: they-closed 14061 X-Gnu-PR-Package: emacs Reply-To: 14061@debbugs.gnu.org Date: Wed, 27 Mar 2013 14:44:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1364395442-31749-1" This is a multi-part message in MIME format... ------------=_1364395442-31749-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #14061: 24.3.50; Globbing in completion not working correctly 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 14061@debbugs.gnu.org. --=20 14061: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D14061 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1364395442-31749-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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 ------------=_1364395442-31749-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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) ------------=_1364395442-31749-1--