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#74420: 31.0.50; PCM completion for ~/src/emacs/trunk/*/minibuf breaks Date: Mon, 18 Nov 2024 18:58:47 -0500 Message-ID: References: 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="24571"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74420@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 19 00:59:24 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 1tDBeN-0006GY-JQ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Nov 2024 00:59:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDBe6-0006AJ-FP; Mon, 18 Nov 2024 18:59:06 -0500 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 1tDBe3-00069z-Fi for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 18:59:03 -0500 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 1tDBe3-0002sR-2r for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 18:59:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=cawY+m2toOdhFeqcN3WE80dchBM4L8QBQ7rD9K6lB/0=; b=Nx4jg7lz+BDKxc+s1j+Rom5gIEVF/yb3F1fKIMtzOhTTuStvIAmwOfhtbWTDjYYV3nEN9nu7Mxrb5vgmQ1wfYhV+NYtiWY3J5+Gd22DDyJFDWokeDEhDo+H4AiYgJgy/YxZzzcbbhMtN0zuc1x6Xr/cWauPypSk51Kf/D5c+ClhDMAvrXmh4TIEvQ0dwNop7zw34iJzVwUjTrJOz/scTbsJjIIar33l9X/H+liNAC7QPHZx2MvH77wLtcmgAFN0pDSym4kA0UAHeFEZsYnLWhyKdKLQdnOEFO5s4/lRZ/ea+vKlTSQQoIsC8+qz5LBIA2nvBgmjZBqTDwLkTzxcnbw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDBe2-0002Cn-FR for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 18:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Nov 2024 23:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74420 X-GNU-PR-Package: emacs Original-Received: via spool by 74420-submit@debbugs.gnu.org id=B74420.17319743388467 (code B ref 74420); Mon, 18 Nov 2024 23:59:02 +0000 Original-Received: (at 74420) by debbugs.gnu.org; 18 Nov 2024 23:58:58 +0000 Original-Received: from localhost ([127.0.0.1]:39749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDBdy-0002CV-8M for submit@debbugs.gnu.org; Mon, 18 Nov 2024 18:58:58 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDBdv-0002CF-1L for 74420@debbugs.gnu.org; Mon, 18 Nov 2024 18:58:57 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F2BC1444F2D; Mon, 18 Nov 2024 18:58:48 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731974327; bh=aw+/rvVDTHcznBtvEY6HNmFafaGpuftlGFMp69ZIJ1M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=OCulqIZnFkwT878kk33vJjx8N11WQqEeVr1d79L6+pX9Kqa+HpDWMAvILhpEpXIsd Fv00Has0PMK4F9UCMDtjmbq9urUWlfOyuao+OhIEe/rjMvybQVd6FUajsOP9qn/bpt Bu8aJ4VPbWFqbLb40a7vt1dRmysDhywywlcViAVnQlNlrqZ+F12RcPAiBWyiibVptr +q+jBjGps58LUP1HTg/ipfmheqgg+yqn08+7WjLK0Kbm9lJcbaxLiGiON6NtBZx0eu I9BpYm5WXKXsii4Zsq2vCpFsLUg43bBJLxBfvciaglUZDmgOc5hsmn+hcsa2wjSyV7 Bsuf4mx1awaiA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D3B50444EF4; Mon, 18 Nov 2024 18:58:47 -0500 (EST) Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BE73D120618; Mon, 18 Nov 2024 18:58:47 -0500 (EST) In-Reply-To: (Spencer Baugh's message of "Mon, 18 Nov 2024 17:17:06 -0500") 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:295619 Archived-At: > Actually... I just realized this misses some cases, namely when we have > "star point" or "point star". FWIW, my local patches have included for years optimizations like the ones you suggested *and* they replaced `star point` and `point star` with just `star`. Do you think it's important to preserve `point` in those cases? >> BTW, maybe we should go with something like >> >> (`(,(and (pred symbolp) s1) ,(and (pred symbolp) s2) . ,rest) >> (cond ((completion-pcm---p s1 s2) (setq p (cons s1 re= st))) >> ((completion-pcm---p s2 s1) (setq p (cons s2 re= st))) >> (t (push (pop p) n)))) >> >> Where `completion-pcm---p` is some kind of partial ordering? > > Interesting thought. Maybe it would make sense to have something like > - completion-pcm--wildcard-grows-on-left-p > (non-nil for star, point, any, any-delim) > - completion-pcm--wildcard-grows-on-right-p > (non-nil for star, point, prefix) > - completion-pcm--wildcard-in-text-p > (non-nil for star and point) > Then this case would be something like "if grows-left/right-p is the > same, and at most one of the symbols is in-text-p, delete the > non-in-text-p one". But I guess your `completion-pcm--merge-completions` is still needed as long as we can't optimize all sequences of symbols to a single symbol. =F0=9F=99=81 Stefan