From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#48356: 28.0.50; choose-completion discards the suffix after the completion boundary Date: Thu, 11 Apr 2024 04:00:35 +0300 Message-ID: <5f353cfe-b2d7-43ab-bc65-37a0d306c042@gutov.dev> References: <18593691-8b7a-facf-68e1-e9d0c106897b@daniel-mendler.de> <868rtcjqk4.fsf@mail.linkov.net> <949a6c3a-9a59-89dd-bdee-c0ec6ee0baa7@daniel-mendler.de> <86r173odnm.fsf@mail.linkov.net> <868rt42wiz.fsf@mail.linkov.net> <39326c56-094c-4074-95d7-8f92f7f927a5@gutov.dev> <82196eff-85e6-44da-89e4-4ead4d72e657@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39173"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 48356@debbugs.gnu.org, Daniel Mendler , JD Smith , Juri Linkov To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 11 03:02:30 2024 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 1ruiph-0009xA-6J for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Apr 2024 03:02:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruipH-0006F0-I2; Wed, 10 Apr 2024 21:02:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ruip8-0006Dj-25 for bug-gnu-emacs@gnu.org; Wed, 10 Apr 2024 21:01:56 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ruip7-0004si-N1 for bug-gnu-emacs@gnu.org; Wed, 10 Apr 2024 21:01:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ruipG-0008FS-JL for bug-gnu-emacs@gnu.org; Wed, 10 Apr 2024 21:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Apr 2024 01:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48356 X-GNU-PR-Package: emacs Original-Received: via spool by 48356-submit@debbugs.gnu.org id=B48356.171279726331142 (code B ref 48356); Thu, 11 Apr 2024 01:02:02 +0000 Original-Received: (at 48356) by debbugs.gnu.org; 11 Apr 2024 01:01:03 +0000 Original-Received: from localhost ([127.0.0.1]:54627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruioH-00085n-IM for submit@debbugs.gnu.org; Wed, 10 Apr 2024 21:01:02 -0400 Original-Received: from fout8-smtp.messagingengine.com ([103.168.172.151]:56257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruioB-00083b-1r for 48356@debbugs.gnu.org; Wed, 10 Apr 2024 21:00:59 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 849701380170; Wed, 10 Apr 2024 21:00:40 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 10 Apr 2024 21:00:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1712797240; x=1712883640; bh=wMbE6pjliRsmUy84njODn1Yrn5oIOTCS3Kb7WiFY3Oo=; b= JLOw8UsIJ4wTpybCO4bb+6Mu23MrP6TNDbLuXDUaqsxXmJBq5CykdglfK/9z4X40 wCAKXhKBPYjCcnX40bn6yeprkzByjsheLbt7sQrnoVQOmg3YZ4+2Ndg0Em7T/6uT XI+unYwD4GW+glVkETsniAXh6Unl4eJX74BcHwwvb3QcHUshbL2GalqEUXSZoLTz dZ4xnZDV+SisOnqjswjxpxIzp6lPBKtM5wA5YXFthVh+4aZAU1fX9obfwL0LiIpt VXoaULCdZjdjaN8N6MLtCD6oTc9wq8V996ewOvS7ZpO1hY9A5AGrzgIpdi+Bj9tF 4QTbTXo1iImBV4rL06u/NA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1712797240; x= 1712883640; bh=wMbE6pjliRsmUy84njODn1Yrn5oIOTCS3Kb7WiFY3Oo=; b=S B6qViLfPCtCCTlShgOC/7ck5WZotbq3HJfeMwMvx/b0IT2Hi4RP2MVNtmNmLwBW9 OEQ1SFz+kyJDOCuG5Na3I8T9GGMG7aLqLeAxzGAXgVkj+eSBXYQqkfSf7OBQn2Yb iTivZzY60oYA1YDyF8toD0/YRheNegJu0KaZv5qI26KYutLNi1X0B0lt4Dlv+clg rp/HPM8tGOg9xF3mS/z+D6SUdtxbB0WJ/5zAGI9vkP9h4OSEYcwxOZTgGSaH6A9x YwF13SakjowVqfcw9cckW6J9DSF7IOrfH50AZYJ0E41fOGStJSoKLtfFUCD+z4V8 IUycwll/Cf7cxhqbFr4XA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudehjedggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeetveegtedthefhudekteehffeu keeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Apr 2024 21:00:38 -0400 (EDT) Content-Language: en-US In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283072 Archived-At: On 10/04/2024 05:38, Stefan Monnier wrote: >>>> ...which translates to "/" because of the double slash -- the filesystem >>>> root directory (*). But that's the same data which would be used by any >>>> other proposed solution, too. >>> More or less, tho the "ideal" solution is to do that in the >>> completion-style code, which has a bit more knowledge about it. >> Doing it in completion-style, though, would either require a relatively >> awkward change in most/all styles (e.g. the "new dynamic variable" route), >> or a more straightforward change in styles together with an incompatible >> change in completion-all-completions. > > Yup, hence the quotes around "ideal". > >> So on balance, would you say it's a good idea to a) use this approach in >> minibuffer-completion-help, b) create a named function for it, for other >> callers to take advantage of it as well? > > Yes, while waiting for a new API it seems like a good stop gap. > >> Looks like completion--merge-suffix is the helper to use. > > Yup. > >>> In theory this approach can "do the wrong thing" with some completion >>> styles, but AFAIK they haven't been written yet. 🙂 >> So you figure that such theoretical style would return adjusted base-suffix >> in -all-completions method, not just in -try-completion? > > A completion style could make use of (and list) things after the > boundary. E.g. completing a file name like > > foo/ba<|>ar/baz > > could decide to list all the files that match > > *f*o*o*/*b*a*a*r*/*b*a*z* > > in which case the "end boundary" of the `completion-all-completions` > output should not be the `cdr` of the `completion-boundaries`. > > I wouldn't worry about it, tho. All right, please see the new function completion-base-suffix added in 0288bc6c949. Any docstring improvements (and others) are welcome. I guess we should also mention it in NEWS...