From unknown Fri Aug 15 20:27:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7211: 23.2; partial-completion-mode suffix and completions buffer Resent-From: Kevin Ryde Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Oct 2010 00:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7211 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 7211@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.128701611831946 (code B ref -1); Thu, 14 Oct 2010 00:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Oct 2010 00:28:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P6BgU-0008JD-I5 for submit@debbugs.gnu.org; Wed, 13 Oct 2010 20:28:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P6BgS-0008J5-IA for submit@debbugs.gnu.org; Wed, 13 Oct 2010 20:28:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6Bjq-00021T-7j for submit@debbugs.gnu.org; Wed, 13 Oct 2010 20:32:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:36102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6Bjq-00021N-5U for submit@debbugs.gnu.org; Wed, 13 Oct 2010 20:32:06 -0400 Received: from [140.186.70.92] (port=47077 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6Bjl-00017K-3U for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2010 20:32:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6BjB-0001wd-CU for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2010 20:32:01 -0400 Received: from mailout1-9.pacific.net.au ([125.255.80.128]:54726 helo=mailout1.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6BjB-0001w7-2Q for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2010 20:31:25 -0400 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 1C2645E0689 for ; Thu, 14 Oct 2010 11:31:19 +1100 (EST) Received: from blah.blah (ppp277E.dyn.pacific.net.au [61.8.39.126]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 1DFCB27416 for ; Thu, 14 Oct 2010 11:31:16 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1P6Bik-0002eH-HM for bug-gnu-emacs@gnu.org; Thu, 14 Oct 2010 11:30:58 +1100 From: Kevin Ryde Date: Thu, 14 Oct 2010 11:30:58 +1100 Message-ID: <87ocax39a5.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.5 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -5.5 (-----) In partial completion mode, if the choices have a common suffix, then selecting an entry from the *Completions* buffer returns a string which is not that choice. For example (completing-read "enter: " '(("xx-aa" . "") ("yy-aa" . ""))) type "-aa" press Tab M-v to go to *Completions* buffer Ret to choose "xx-aa" => return value "xx-aa-aa" where I hoped the return would be "xx-aa". In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-05-16 on raven, modified by Debian configured using `configure '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default enable-multibyte-characters: t From unknown Fri Aug 15 20:27:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7211: Acknowledgement (23.2; partial-completion-mode suffix and completions buffer) Resent-From: Kevin Ryde Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Oct 2010 00:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7211 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: control@debbugs.gnu.org Cc: 7211@debbugs.gnu.org Received: via spool by 7211-submit@debbugs.gnu.org id=B7211.1287017833407 (code B ref 7211); Thu, 14 Oct 2010 00:58:02 +0000 Received: (at 7211) by debbugs.gnu.org; 14 Oct 2010 00:57:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P6C87-00006W-M0 for submit@debbugs.gnu.org; Wed, 13 Oct 2010 20:57:11 -0400 Received: from mailout2-3.pacific.net.au ([61.8.2.226] helo=mailout2.pacific.net.au) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P6C84-00006M-RC; Wed, 13 Oct 2010 20:57:10 -0400 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id F22192A50A2; Thu, 14 Oct 2010 12:00:37 +1100 (EST) Received: from blah.blah (ppp277E.dyn.pacific.net.au [61.8.39.126]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id E967E8C0F; Thu, 14 Oct 2010 12:00:36 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1P6CBQ-0002xr-0F; Thu, 14 Oct 2010 12:00:36 +1100 From: Kevin Ryde References: <87ocax39a5.fsf@blah.blah> Date: Thu, 14 Oct 2010 12:00:35 +1100 In-Reply-To: (GNU bug Tracking System's message of "Thu, 14 Oct 2010 00:29:02 +0000") Message-ID: <87k4ll37ws.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.6 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.5 (---) retitle 7211 completion suffix and completions buffer thanks Oops, this is the partial completion thingie which is without partial-completion-mode enabled. The latter might be right already. From unknown Fri Aug 15 20:27:26 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Kevin Ryde Subject: bug#7211: closed (Re: bug#7211: 23.2; partial-completion-mode suffix and completions buffer) Message-ID: References: <87ocax39a5.fsf@blah.blah> X-Gnu-PR-Message: they-closed 7211 X-Gnu-PR-Package: emacs Reply-To: 7211@debbugs.gnu.org Date: Mon, 08 Nov 2010 20:55:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1289249702-32341-1" This is a multi-part message in MIME format... ------------=_1289249702-32341-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #7211: completion suffix and completions buffer 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 7211@debbugs.gnu.org. --=20 7211: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D7211 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1289249702-32341-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 7211-done) by debbugs.gnu.org; 8 Nov 2010 20:54:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PFYjH-0008PR-UJ for submit@debbugs.gnu.org; Mon, 08 Nov 2010 15:54:16 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PFYgJ-0008Ny-Lo for 7211-done@debbugs.gnu.org; Mon, 08 Nov 2010 15:51:12 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtEKADjy10xMCpqE/2dsb2JhbAChDoEDcrx6hUgEhFiNWg X-IronPort-AV: E=Sophos;i="4.59,170,1288584000"; d="scan'208";a="81961617" Received: from 76-10-154-132.dsl.teksavvy.com (HELO pastel.home) ([76.10.154.132]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 08 Nov 2010 15:55:50 -0500 Received: by pastel.home (Postfix, from userid 20848) id E05A5A86D8; Mon, 8 Nov 2010 15:55:49 -0500 (EST) From: Stefan Monnier To: Kevin Ryde Subject: Re: bug#7211: 23.2; partial-completion-mode suffix and completions buffer Message-ID: References: <87ocax39a5.fsf@blah.blah> Date: Mon, 08 Nov 2010 15:55:49 -0500 In-Reply-To: <87ocax39a5.fsf@blah.blah> (Kevin Ryde's message of "Thu, 14 Oct 2010 11:30:58 +1100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7211-done X-Mailman-Approved-At: Mon, 08 Nov 2010 15:54:15 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.1 (--) > In partial completion mode, if the choices have a common suffix, then > selecting an entry from the *Completions* buffer returns a string which > is not that choice. For example > (completing-read "enter: " '(("xx-aa" . "") > ("yy-aa" . ""))) > type "-aa" > press Tab > M-v to go to *Completions* buffer > Ret to choose "xx-aa" > => return value "xx-aa-aa" > where I hoped the return would be "xx-aa". Thanks. I've installed the patch below (in emacs-23) which should fix this problem. Stefan === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2010-10-17 17:30:22 +0000 +++ lisp/minibuffer.el 2010-11-08 20:52:12 +0000 @@ -41,7 +41,7 @@ ;; provide the start info but not the end info in ;; completion-base-position. ;; - quoting is problematic. E.g. the double-dollar quoting used in -;; substitie-in-file-name (and hence read-file-name-internal) bumps +;; substitute-in-file-name (and hence read-file-name-internal) bumps ;; into various bugs: ;; - choose-completion doesn't know how to quote the text it inserts. ;; E.g. it fails to double the dollars in file-name completion, or @@ -1075,6 +1075,7 @@ (interactive) (message "Making completion list...") (lexical-let* ((start (field-beginning)) + (end (field-end)) (string (field-string)) (completions (completion-all-completions string @@ -1106,10 +1107,12 @@ completions))) (with-current-buffer standard-output (set (make-local-variable 'completion-base-position) - ;; FIXME: We should provide the END part as well, but - ;; currently completion-all-completions does not give - ;; us the necessary information. - (list (+ start base-size) nil))) + (list (+ start base-size) + ;; FIXME: We should pay attention to completion + ;; boundaries here, but currently + ;; completion-all-completions does not give us the + ;; necessary information. + end))) (display-completion-list completions))) ;; If there are no completions, or if the current input is already the ------------=_1289249702-32341-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Oct 2010 00:28:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P6BgU-0008JD-I5 for submit@debbugs.gnu.org; Wed, 13 Oct 2010 20:28:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P6BgS-0008J5-IA for submit@debbugs.gnu.org; Wed, 13 Oct 2010 20:28:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6Bjq-00021T-7j for submit@debbugs.gnu.org; Wed, 13 Oct 2010 20:32:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:36102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6Bjq-00021N-5U for submit@debbugs.gnu.org; Wed, 13 Oct 2010 20:32:06 -0400 Received: from [140.186.70.92] (port=47077 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6Bjl-00017K-3U for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2010 20:32:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6BjB-0001wd-CU for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2010 20:32:01 -0400 Received: from mailout1-9.pacific.net.au ([125.255.80.128]:54726 helo=mailout1.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6BjB-0001w7-2Q for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2010 20:31:25 -0400 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 1C2645E0689 for ; Thu, 14 Oct 2010 11:31:19 +1100 (EST) Received: from blah.blah (ppp277E.dyn.pacific.net.au [61.8.39.126]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 1DFCB27416 for ; Thu, 14 Oct 2010 11:31:16 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1P6Bik-0002eH-HM for bug-gnu-emacs@gnu.org; Thu, 14 Oct 2010 11:30:58 +1100 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Subject: 23.2; partial-completion-mode suffix and completions buffer Date: Thu, 14 Oct 2010 11:30:58 +1100 Message-ID: <87ocax39a5.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -5.5 (-----) In partial completion mode, if the choices have a common suffix, then selecting an entry from the *Completions* buffer returns a string which is not that choice. For example (completing-read "enter: " '(("xx-aa" . "") ("yy-aa" . ""))) type "-aa" press Tab M-v to go to *Completions* buffer Ret to choose "xx-aa" => return value "xx-aa-aa" where I hoped the return would be "xx-aa". In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-05-16 on raven, modified by Debian configured using `configure '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default enable-multibyte-characters: t ------------=_1289249702-32341-1--