emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improvement proposals for `completing-read'


From: Stefan Monnier
Subject: Re: Improvement proposals for `completing-read'
Date: Thu, 08 Apr 2021 14:13:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> This is similar to what I am doing in my `consult-line` command, which is
> a Swiper equivalent. There I encode the line number in Unicode characters of
> some private plane and hide them with 'invisible or 'display.

I can understand the `invisible` but I would have used plain `%s` or
`number-to-string` rather than funny unicode chars.

> If I could mark that part of the string as 'unmatchable I would be happy to!

Fun fact: I use a locally-hacked isearch.el that lets me do `C-s NNNN`
to go to line NNNN.

> Maybe that's the cleaner solution? The nice advantage is that it would be
> backward compatible. I could just start to mark my prefixes as 'unmatchable

Why put it in the prefix rather than the suffix?

> and the basic completion style would suddenly start to work. On older Emacs
> versions everything would continue to work as is; the user is required to
> use a completion style which matches substrings,

If you put the line numbers in the suffix, then they won't bother
anyone, even with the most basic completion scheme.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]