emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Support "\n" in icomplete-separator


From: Ergus
Subject: Re: [PATCH] Support "\n" in icomplete-separator
Date: Sun, 15 Nov 2020 03:39:34 +0100

On Sat, Nov 14, 2020 at 10:36:06PM +0200, Andrii Kolomoiets wrote:
Ergus <spacibba@aol.com> writes:

Pressing TAB seems to be against the philosophy of icomplete, ivy, and
similar features, at least AFAIU: they display the candidates without
any prior request by the user.

Among icomplete, ivy and ido modes only ivy is overriding TAB key.  With
icomplete and ido the overlay text is not the _only_ way of knowing what
inputs are acceptable.  Seems like they has nothing against using TAB to
complete text.

Ivy has ivy-partial-or-done bind to tab by default. Which completes
common part or open on single alternative with the default action
(find-file for file; dired for directories...).

But it is possible to bind tab to ivy-partial in ivy-minibuffer-map
instead. Then you have only completion on tab which is probably more
familiar for shell users, and a more predictable behavior. Actually the
most opposed completion system to use tabs is helm not ivy ;p

In emacs -Q:
1. M-: (set-frame-height nil 1)
2. M-x
3. TAB
Completion buffer is opened and from now each pressing of TAB will
scroll completions.
4. ivy-mode RET
5. M-x
6. TAB
No completions are visible
7. TAB
No completions so far but the 'enable-theme' command is invoked.

With TAB rebinded to 'ivy-partial', the command in step 7 is not
invoked, but still no completions are showed.

Something is wrong in this setup or I don't understand what do you mean,
sorry.

If you do:

Git clone git@github.com:abo-abo/swiper.git
cd swiper
make plain
M-x

Don't you get a completion list in minibuffer (without needing a tab)?

Pressing <Tab> does nothing in this case... because it is not needed.

But If you type something like: defi<Tab>

don't you get: defin (completing the n)

and a list with completion candidates starting with "defin"? (6 in my
case)

then if you do: e<Tab>
you get: define- (completing the -)

and a new shorter list with less candidates?

Ivy doesn't need the tab to show completion candidates, but it completes
with tab and shows the candidates in the minibuffer (like icomplete
does, remember ivy is a fork of icomplete).

Or when you say "completion" are you referring to the *Completions*
buffer only?  Is the *Completions* buffer useful somehow when you
already have the same candidates in the ivy minibuffer with all the
functionalities?  without needing to use the mouse (ivy candidates are
clickable) or change window to select a candidate?



reply via email to

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