From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.bugs Subject: bug#48356: 28.0.50; choose-completion discards the suffix after the completion boundary Date: Tue, 11 May 2021 19:23:13 +0200 Message-ID: <18593691-8b7a-facf-68e1-e9d0c106897b@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1491"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , JD Smith To: 48356@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 11 19:25:52 2021 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 1lgW8l-0000AQ-Ih for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 May 2021 19:25:51 +0200 Original-Received: from localhost ([::1]:44306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgW8k-0004hR-Kx for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 May 2021 13:25:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgW72-0002Cs-BM for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 13:24:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgW70-0002SY-BA for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 13:24:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgW70-0006yo-5J for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 13:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 May 2021 17:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48356 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162075380326779 (code B ref -1); Tue, 11 May 2021 17:24:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 May 2021 17:23:23 +0000 Original-Received: from localhost ([127.0.0.1]:37262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgW6M-0006xr-UU for submit@debbugs.gnu.org; Tue, 11 May 2021 13:23:23 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:40968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgW6L-0006xj-9f for submit@debbugs.gnu.org; Tue, 11 May 2021 13:23:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgW6L-0001DX-3U for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 13:23:21 -0400 Original-Received: from server.qxqx.de ([2a01:4f8:121:346::180]:54051 helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgW6H-0001wq-KR for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 13:23:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date: Message-ID:Subject:From:Cc:To:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=RRIuxG+AHTSaEjSDSTknE/BtjfH7ugj6Ju4onnmgL8o=; b=tCtoNsVCrlhWhVeqhWs9PKSzTq mR4CW6uu9QMjJdBayUc4vT+ooLwuctYZDiWZh5ZJRDSib1+9Oh6AAoa7IAJZysw/bHTDHtXn69u5p KwtAf2Zk2gODYIFVRY5zmkhvHIA7e8hKGCM9z8U3OpcRyqA9k9XQlxZeg4ceC3xAk6MU=; Content-Language: en-US Received-SPF: pass client-ip=2a01:4f8:121:346::180; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:206262 Archived-At: When selecting a candidate the suffix after the completion boundary is discarded by `choose-completion`/`choose-completion-string`. `choose-completion` is invoked when a candidate in the *Completions* buffer is selected with the mouse or RET. 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. `choose-completion-string` contains logic which checks if the resulting string equals the car of the completion boundary. In that case the minibuffer is not exited. I propose the following change to the existing logic: When selecting a candidate with `choose-completion` and a suffix is present, the minibuffer should not be exited (completion continues) and the suffix is preserved.