emacs-devel
[Top][All Lists]
Advanced

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

Re: feature/completions-highlight-modifications e3c5b99 3/6: Add complet


From: Ergus
Subject: Re: feature/completions-highlight-modifications e3c5b99 3/6: Add completions-highlight-mode initial implementation.
Date: Tue, 17 Nov 2020 01:46:53 +0100

On Mon, Nov 16, 2020 at 10:23:47PM +0200, Juri Linkov wrote:
With the current implementation this is not supposed to change. Of
course there is space for improvement and there are bugs, but so far,
all navigation still works in *Completions* buffer as usual because I
just added some commands. If there is anything that breaks the normal
previous behavior somehow, please tell me; because I put special
attention to prevent that.

Sorry, I was not clear enough: I meant that the new feature doesn't
allow in the minibuffer using the same navigation keys that are
already available in the *Completions* buffer, e.g. <PgDown> and <PgUp>
typed in the *Completions* buffer scroll it up and down.

I didn't change any default current behavior because I tried to prevent
complains when proposing to enable this by default in a future (as I
said "A man can dream"). In the code there is a macro
`with-minibuffer-scroll-window' that execute any command in the
Completions buffer only when it is enabled but also the
completions-highlight-minibuffer-map is set in completion-setup-hook,
so, after the completions are visible only.

Basically we only need to add the command you propose like

(defun ...
    (with-minibuffer-scroll-window scroll-up-command))

And bind them... probably with a remap in
completions-highlight-minibuffer-map.

For example, while in the minibuffer type 'TAB' that displays a very
long list of completions, then type 'C-M-v', and see how it scrolls the
*Completions* buffer.

When the list is too long the highlight is not enabled now. This can be
seen as an issue or a feature, because it keeps the previous behavior
and requires minimal changes in the minibuffer.el side.

Better yet try typing <M-PgDown> and <M-PgUp>
in the minibuffer, and see how it scrolls the *Completions* buffer
up and down.  I meant that a new feature could allow such page scrolling
without the 'M-' modifier, by just using <PgDown> and <PgUp> in the minibuffer
(and C-v/M-v as well) to scroll the *Completions* buffer.


<PgUp> will break the current behavior... there will be complains if we
try that and we will waste precious time in this mailing list trying to
get an agreement to go nowhere (as usual). In any case all them are
trivial to implement and even simpler with a remap.

C-M-v only scrolls Completions in some conditions. If you move forth and
back from another buffer then that one will be the one scrolled instead
of Completions. IMO this is a confusing behavior, but try to change that
and for sure will be the end of the world for some users.... so we need
more customs :).

We could add a custom to disable the new bindings in the *Completions*
if you think is better; because IMO the most important thing is to
"navigate" with arrows the completions from the minibuffer without
leaving it; and the overlay.

Maybe a custom could provide some DWIM behavior by default,
e.g. to activate these keys only when the *Completions* buffer
is displayed.


This is also trivial to do... but I prefer to know if there is an
agreement in favor of the current unobtrusive changes before extending
it more.


reply via email to

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