unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Eshel Yaron <me@eshelyaron.com>, emacs-devel@gnu.org
Subject: Re: master 6b7ff60a5e7: Highlight the suffix in *Completions* buffer in 'basic' style too
Date: Thu, 13 Jun 2024 17:11:00 +0300	[thread overview]
Message-ID: <c5904b47-e0c4-4398-b341-d8775960ba8b@gutov.dev> (raw)
In-Reply-To: <m15xud8d99.fsf@dazzs-mbp.kpn>

Hi!

On 13/06/2024 11:20, Eshel Yaron wrote:
> Note that unlike completion-hilit-commonality,
> completion-pcm--hilit-commonality does not add the base size to the last
> cdr of the result.  So this breaks e.g. file name completion:
> 
> 1. emacs -Q in emacs.git checkout root directory
> 2. C-x C-f lisp/fo TAB
> 3.*Completions*  pops up with some completion candidates
> 4. M-<down>
> 
> The minibuffer should now contain something like
> ~/checkouts/emacs/lisp/foldout.el but after this commit it instead
> contains just foldout.el.

Thanks for your vigilance. ;)

> Something like the following should fix this issue:
> 
> diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
> index 144cda8cfdc..0a0b17b3850 100644
> --- a/lisp/minibuffer.el
> +++ b/lisp/minibuffer.el
> @@ -3816,7 +3816,9 @@ completion-basic-all-completions
>                               'point
>                               (substring afterpoint 0 (cdr bounds)))))
>            (all (completion-pcm--all-completions prefix pattern table pred)))
> -    (completion-pcm--hilit-commonality pattern all)))
> +    (when all
> +      (nconc (completion-pcm--hilit-commonality pattern all)
> +             (car bounds)))))
>   
>   ;;; Partial-completion-mode style completion.

Please install, if you have access.



  reply	other threads:[~2024-06-13 14:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <171823002031.28307.18221225159709452537@vcs2.savannah.gnu.org>
     [not found] ` <20240612220700.A0F4DC1FB4C@vcs2.savannah.gnu.org>
2024-06-13  8:20   ` master 6b7ff60a5e7: Highlight the suffix in *Completions* buffer in 'basic' style too Eshel Yaron
2024-06-13 14:11     ` Dmitry Gutov [this message]
2024-06-13 14:51       ` Eshel Yaron
2024-06-14  6:10     ` Juri Linkov
2024-06-14  7:35       ` Eshel Yaron
2024-06-14 16:41         ` Juri Linkov
2024-06-14 18:04           ` Eshel Yaron
2024-06-14 22:44             ` Dmitry Gutov
2024-06-30 16:29           ` Juri Linkov
2024-06-30 18:14             ` Eshel Yaron
2024-07-01  6:57               ` Juri Linkov
2024-07-01  8:58                 ` Eshel Yaron
2024-07-01 16:29                   ` Juri Linkov
2024-07-02 11:12                     ` Eli Zaretskii
2024-07-02 12:17                       ` Eshel Yaron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c5904b47-e0c4-4398-b341-d8775960ba8b@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=emacs-devel@gnu.org \
    --cc=me@eshelyaron.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).