From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#48356: 28.0.50; choose-completion discards the suffix after the completion boundary Date: Mon, 14 Mar 2022 20:53:15 +0200 Organization: LINKOV.NET Message-ID: <868rtcjqk4.fsf@mail.linkov.net> References: <18593691-8b7a-facf-68e1-e9d0c106897b@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15585"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: mail@daniel-mendler.de, monnier@iro.umontreal.ca, jdtsmith@gmail.com To: 48356@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 14 20:17:30 2022 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 1nTqC9-0003sS-W8 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Mar 2022 20:17:29 +0100 Original-Received: from localhost ([::1]:41650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTqC8-0007ZR-Ff for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Mar 2022 15:17:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTqBt-0007YB-IV for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2022 15:17:14 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTqBi-0006sW-7h for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2022 15:17:13 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nTqBi-00074o-3k for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2022 15:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Mar 2022 19:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48356 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: Daniel Mendler , Stefan Monnier , JD Smith , 48356@debbugs.gnu.org Original-Received: via spool by 48356-submit@debbugs.gnu.org id=B48356.164728541227176 (code B ref 48356); Mon, 14 Mar 2022 19:17:02 +0000 Original-Received: (at 48356) by debbugs.gnu.org; 14 Mar 2022 19:16:52 +0000 Original-Received: from localhost ([127.0.0.1]:46322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTqBY-00074G-HF for submit@debbugs.gnu.org; Mon, 14 Mar 2022 15:16:52 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:42377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTqBW-00073o-TA for 48356@debbugs.gnu.org; Mon, 14 Mar 2022 15:16:51 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 60589240006; Mon, 14 Mar 2022 19:16:42 +0000 (UTC) In-Reply-To: (Stefan Monnier via's message of "Sun, 13 Mar 2022 23:10:11 -0400") 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" Xref: news.gmane.io gmane.emacs.bugs:228389 Archived-At: >> For example when completing a file path "~/emacs/master/li|/calc", where >> "|" is the cursor, and then the candidate "lisp" is selected in the >> *Completions* buffer, the result is "~/emacs/master/lisp/". The prefix >> "~/emacs/master/" is prepended to the selected candidate, but the suffix >> "/calc" is discarded. > > Yup. That's listed under "bugs" at the beginning of minibuffer.el: > > ;; - choose-completion can't automatically figure out the boundaries > ;; corresponding to the displayed completions because we only > ;; provide the start info but not the end info in > ;; completion-base-position. > >> ... and the suffix is preserved. > > Of course, the suffix should *not* be preserved when the minibuffer was > "r|e-buf". IMHO, the root of the problem is in completion-all-completions that returns in the last `cdr' only the start of completions, but not the end of completions.