From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#48356: 28.0.50; choose-completion discards the suffix after the completion boundary Date: Tue, 09 Apr 2024 22:38:59 -0400 Message-ID: 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> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16650"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 48356@debbugs.gnu.org, Daniel Mendler , JD Smith , Juri Linkov To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 10 04:40:21 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 1ruNsr-00048B-GC for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Apr 2024 04:40:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruNsS-00042Z-1s; Tue, 09 Apr 2024 22:39:56 -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 1ruNsQ-000427-Jd for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 22:39:54 -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 1ruNsQ-0005u8-AP for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 22:39:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ruNsY-0000Ic-BT for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 22:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Apr 2024 02:40: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.17127167611089 (code B ref 48356); Wed, 10 Apr 2024 02:40:02 +0000 Original-Received: (at 48356) by debbugs.gnu.org; 10 Apr 2024 02:39:21 +0000 Original-Received: from localhost ([127.0.0.1]:51844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruNrs-0000HV-J7 for submit@debbugs.gnu.org; Tue, 09 Apr 2024 22:39:20 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:59070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruNrq-0000HG-8r for 48356@debbugs.gnu.org; Tue, 09 Apr 2024 22:39:19 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4F382442B68; Tue, 9 Apr 2024 22:39:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1712716740; bh=q73tWnNHm8IDR5UhIqGdkB2z8FyBk3drguu62kjqOFs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dCdHfAeOZOR+20klBoQV7M1D9YmFqLFQ7yQZgK8B2Fl8Tn8kcIjZPFPICuwMIHMYh mrQbE+7m0fvQVSDS0x5m+Dgjc8rlQg7WAXzsZa3q3NoWtdBqKy76DAo1EdUIzjwx/2 vMj0jbtnzLE2sR8yetuJ8xNERW/ZG+HFDMrK+IZp+AQg+OE9uvZmxsFNusKOaZRQpN aLq4H3dW/HiAlq8CsMmciRqYfdtrYZLQgIg5wFXyKE+jfknGVmgo9S05WVDvPX4zk2 9xwh0HEEvj60VdyjTO5v/E/7RuCf1TUuzmsLIoNY3FtNQuOJMy8Go2G9r35lkC1YGL 2ohbT1wZHBx/g== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 722A4442B5A; Tue, 9 Apr 2024 22:39:00 -0400 (EDT) Original-Received: from pastel (unknown [45.72.201.215]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3E6E2120588; Tue, 9 Apr 2024 22:39:00 -0400 (EDT) In-Reply-To: <82196eff-85e6-44da-89e4-4ead4d72e657@gutov.dev> (Dmitry Gutov's message of "Wed, 10 Apr 2024 04:33:44 +0300") 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:283023 Archived-At: >>> ...which translates to "/" because of the double slash -- the filesystem >>> root directory (*). But that's the same data which would be used by a= ny >>> 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. =F0=9F=99=82 > So you figure that such theoretical style would return adjusted base-suff= ix > 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. Stefan