bug#28714: Shouldn't minibuffer-complete add a space after sole completions?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#28714: Shouldn't minibuffer-complete add a space after sole completions?

積丹尼 Dan Jacobson
X-Debbugs-Cc: [hidden email]

Shouldn't minibuffer-complete add a space after sole completions?

That is how bash does it.

Then the user wouldn't be worrying that there is more than one
completion and need to press TAB again to finally see "[Sole completion]".



Reply | Threaded
Open this post in threaded view
|

bug#28714: Shouldn't minibuffer-complete add a space after sole completions?

Stefan Monnier
> Shouldn't minibuffer-complete add a space after sole completions?

Depends in which context: for example when completing for `M-x` or `C-x
C-f`, adding a space at the end would be an error since with the space
it would not correspond to an existing command or file name any more.

> That is how bash does it.

So does Emacs too during completion of shell commands, AFAIK.


        Stefan



Reply | Threaded
Open this post in threaded view
|

bug#28714: Shouldn't minibuffer-complete add a space after sole completions?

積丹尼 Dan Jacobson
In reply to this post by 積丹尼 Dan Jacobson
$ touch /tmp/abbbbb /tmp/abbbbbbbbbbbbbb
Find file or URL:
 / [self-insert-command]
 t [self-insert-command]
 m [self-insert-command]
 p [self-insert-command]
 / [self-insert-command]
 a [self-insert-command]
 b [self-insert-command]
 <tab> [minibuffer-complete]
 <tab> [minibuffer-complete]
 b b [self-insert-command]
 <tab> [minibuffer-complete]
 <tab> [minibuffer-complete]

Now try the same thing in bash outside of emacs.

The user at every moment is aware how many completions there are, and it
only takes a total of two tabs vs. four in emacs.

>>>>> "SM" == Stefan Monnier <[hidden email]> writes:

SM> Depends in which context: for example when completing for `M-x` or `C-x
SM> C-f`, adding a space at the end would be an error since with the space
SM> it would not correspond to an existing command or file name any more.

How about perhaps just adding the space for the user's visual pleasure,
but not using it when processing the command / filename?

Another idea might be not requiring a second TAB before telling the user
[Sole completion] etc. but that would seem too chatty.

Anyway if he really wants a space he could use "\ ".



Reply | Threaded
Open this post in threaded view
|

bug#28714: Shouldn't minibuffer-complete add a space after sole completions?

Eli Zaretskii
> From: 積丹尼 Dan Jacobson
> <[hidden email]>
> Date: Sat, 07 Oct 2017 05:54:44 +0800
> Cc: [hidden email]
>
> $ touch /tmp/abbbbb /tmp/abbbbbbbbbbbbbb
> Find file or URL:
>  / [self-insert-command]
>  t [self-insert-command]
>  m [self-insert-command]
>  p [self-insert-command]
>  / [self-insert-command]
>  a [self-insert-command]
>  b [self-insert-command]
>  <tab> [minibuffer-complete]
>  <tab> [minibuffer-complete]
>  b b [self-insert-command]
>  <tab> [minibuffer-complete]
>  <tab> [minibuffer-complete]
>
> Now try the same thing in bash outside of emacs.
>
> The user at every moment is aware how many completions there are, and it
> only takes a total of two tabs vs. four in emacs.

"M-x icomplete-mode RET", then repeat your experiment.  Which is
better now, Emacs or Bash?

And if icomplete is still not good enough, there's a plethora of
fancier completion packages out there, both bundled and unbundled.



Reply | Threaded
Open this post in threaded view
|

bug#28714: Shouldn't minibuffer-complete add a space after sole completions?

Stefan Monnier
In reply to this post by 積丹尼 Dan Jacobson
> Another idea might be not requiring a second TAB before telling the user
> [Sole completion] etc. but that would seem too chatty.

I'd welcome a patch which adds that to minibuffer.el (optionnally, as
usual in Emacs).


        Stefan



Reply | Threaded
Open this post in threaded view
|

bug#28714: Shouldn't minibuffer-complete add a space after sole completions?

積丹尼 Dan Jacobson
In reply to this post by 積丹尼 Dan Jacobson
>>>>> "EZ" == Eli Zaretskii <[hidden email]> writes:

EZ> "M-x icomplete-mode RET", then repeat your experiment.  Which is
EZ> better now, Emacs or Bash?

Waaa... icomplete-mode is way too chatty.