unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#34622: Find file prompt should indicate sole completion by appending a blank
@ 2019-02-22 21:40 積丹尼 Dan Jacobson
  2019-02-23  7:36 ` Eli Zaretskii
  2019-09-16  3:13 ` Stefan Kangas
  0 siblings, 2 replies; 7+ messages in thread
From: 積丹尼 Dan Jacobson @ 2019-02-22 21:40 UTC (permalink / raw)
  To: 34622

With emacs, one can never be sure if the expansion
Find file or URL: ~/bin/wwzz
is the sole completion or not, without needing a second TAB press to get
"[Sole completion]" shown.

With bash, there is always a space added at end,
"$ wc ~/bin/wwzz "
so we know right away.

I propose that emacs do the same:
"Find file or URL: ~/bin/wwzz "
and if they really want to enter a file with a " " at the end, well they
could use C-q (quoted-insert).

See also https://www.gnu.org/software/emacs/manual/html_node/elisp/Minibuffer-Completion.html
but I am specifically talking about C-x C-f (find-file) and C-x d
(dired). Sorry we did discuss this before...





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#34622: Find file prompt should indicate sole completion by appending a blank
  2019-02-22 21:40 bug#34622: Find file prompt should indicate sole completion by appending a blank 積丹尼 Dan Jacobson
@ 2019-02-23  7:36 ` Eli Zaretskii
  2019-02-24  4:36   ` 積丹尼 Dan Jacobson
  2019-09-16  3:13 ` Stefan Kangas
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2019-02-23  7:36 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 34622

tags 34622 notabug
thanks

> From: 積丹尼 Dan Jacobson
> 	<jidanni@jidanni.org>
> Date: Sat, 23 Feb 2019 05:40:07 +0800
> 
> With emacs, one can never be sure if the expansion
> Find file or URL: ~/bin/wwzz
> is the sole completion or not, without needing a second TAB press to get
> "[Sole completion]" shown.

Which command did that?  "C-x C-f" shows just the directory, so
there's no question of completions with the initial prompt.  The
situation you describe is thus not entirely clear.

But in general, this default behavior is on purpose (there are add-on
packages which give you immediate feedback about candidates).
File-name completion is special, by design.

> With bash, there is always a space added at end,
> "$ wc ~/bin/wwzz "
> so we know right away.

Bash is not an editor, so the considerations are different.  For
example, Bash doesn't need to consider the possibility that the user
would like to create a new file.

> I propose that emacs do the same:
> "Find file or URL: ~/bin/wwzz "
> and if they really want to enter a file with a " " at the end, well they
> could use C-q (quoted-insert).

Asking users to use C-q for whitespace embedded in a file name is a
non-starter.  We did the opposite change several Emacs versions ago.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#34622: Find file prompt should indicate sole completion by appending a blank
  2019-02-23  7:36 ` Eli Zaretskii
@ 2019-02-24  4:36   ` 積丹尼 Dan Jacobson
  2019-02-24 16:05     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: 積丹尼 Dan Jacobson @ 2019-02-24  4:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34622

>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
EZ> Which command did that?  "C-x C-f" shows just the directory, so
EZ> there's no question of completions with the initial prompt.  The
EZ> situation you describe is thus not entirely clear.

$ touch /tmp/zzz #new plain file
C-x C-f /tmp/zzz

EZ> Asking users to use C-q for whitespace embedded in a file name is a
EZ> non-starter.  We did the opposite change several Emacs versions ago.

I'm only talking about trailing whitespace...
In fact it could expand that too. OK never mind.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#34622: Find file prompt should indicate sole completion by appending a blank
  2019-02-24  4:36   ` 積丹尼 Dan Jacobson
@ 2019-02-24 16:05     ` Eli Zaretskii
  2019-02-27  5:20       ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2019-02-24 16:05 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 34622

> From: 積丹尼 Dan Jacobson <jidanni@jidanni.org>
> Cc: 34622@debbugs.gnu.org
> Date: Sun, 24 Feb 2019 12:36:54 +0800
> 
> >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
> EZ> Which command did that?  "C-x C-f" shows just the directory, so
> EZ> there's no question of completions with the initial prompt.  The
> EZ> situation you describe is thus not entirely clear.
> 
> $ touch /tmp/zzz #new plain file
> C-x C-f /tmp/zzz

But in this case, the first TAB already says "Sole completion", as you
wanted...





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#34622: Find file prompt should indicate sole completion by appending a blank
  2019-02-24 16:05     ` Eli Zaretskii
@ 2019-02-27  5:20       ` 積丹尼 Dan Jacobson
  2019-02-27 15:50         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: 積丹尼 Dan Jacobson @ 2019-02-27  5:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34622

EZ> Which command did that?  "C-x C-f" shows just the directory, so
EZ> there's no question of completions with the initial prompt.  The
EZ> situation you describe is thus not entirely clear.
>> 
>> $ touch /tmp/zzz #new plain file
>> C-x C-f /tmp/zzz

EZ> But in this case, the first TAB already says "Sole completion", as you
EZ> wanted...

Nope: See, needed two tabs!:

 C-x C-f [find-file]
 / [self-insert-command]
 t [self-insert-command]
 m [self-insert-command]
 <tab> [minibuffer-complete]
 z [self-insert-command]
 z [self-insert-command]
 <tab> [minibuffer-complete]
 <tab> [minibuffer-complete]
 C-h l [view-lossage]





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#34622: Find file prompt should indicate sole completion by appending a blank
  2019-02-27  5:20       ` 積丹尼 Dan Jacobson
@ 2019-02-27 15:50         ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2019-02-27 15:50 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 34622

> From: 積丹尼 Dan Jacobson <jidanni@jidanni.org>
> Cc: 34622@debbugs.gnu.org
> Date: Wed, 27 Feb 2019 13:20:30 +0800
> 
> >> $ touch /tmp/zzz #new plain file
> >> C-x C-f /tmp/zzz
> 
> EZ> But in this case, the first TAB already says "Sole completion", as you
> EZ> wanted...
> 
> Nope: See, needed two tabs!:
> 
>  C-x C-f [find-file]
>  / [self-insert-command]
>  t [self-insert-command]
>  m [self-insert-command]
>  <tab> [minibuffer-complete]
>  z [self-insert-command]
>  z [self-insert-command]
>  <tab> [minibuffer-complete]
>  <tab> [minibuffer-complete]
>  C-h l [view-lossage]

In the original example you typed 3 z's, not 2.  In that case, a
single TAB is enough.

Anyway, like I said: Emacs being an editor has different design
decisions in these cases.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#34622: Find file prompt should indicate sole completion by appending a blank
  2019-02-22 21:40 bug#34622: Find file prompt should indicate sole completion by appending a blank 積丹尼 Dan Jacobson
  2019-02-23  7:36 ` Eli Zaretskii
@ 2019-09-16  3:13 ` Stefan Kangas
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Kangas @ 2019-09-16  3:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34622-done, 積丹尼 Dan Jacobson

Eli Zaretskii <eliz@gnu.org> writes:

> tags 34622 notabug
> thanks
>
>> From: 積丹尼 Dan Jacobson
>>     <jidanni@jidanni.org>
>> Date: Sat, 23 Feb 2019 05:40:07 +0800
>>
>> With emacs, one can never be sure if the expansion
>> Find file or URL: ~/bin/wwzz
>> is the sole completion or not, without needing a second TAB press to get
>> "[Sole completion]" shown.
>
> Which command did that?  "C-x C-f" shows just the directory, so
> there's no question of completions with the initial prompt.  The
> situation you describe is thus not entirely clear.
>
> But in general, this default behavior is on purpose (there are add-on
> packages which give you immediate feedback about candidates).
> File-name completion is special, by design.
>
>> With bash, there is always a space added at end,
>> "$ wc ~/bin/wwzz "
>> so we know right away.
>
> Bash is not an editor, so the considerations are different.  For
> example, Bash doesn't need to consider the possibility that the user
> would like to create a new file.
>
>> I propose that emacs do the same:
>> "Find file or URL: ~/bin/wwzz "
>> and if they really want to enter a file with a " " at the end, well they
>> could use C-q (quoted-insert).
>
> Asking users to use C-q for whitespace embedded in a file name is a
> non-starter.  We did the opposite change several Emacs versions ago.

Since this is notabug, I'm also closing it now.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-09-16  3:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-22 21:40 bug#34622: Find file prompt should indicate sole completion by appending a blank 積丹尼 Dan Jacobson
2019-02-23  7:36 ` Eli Zaretskii
2019-02-24  4:36   ` 積丹尼 Dan Jacobson
2019-02-24 16:05     ` Eli Zaretskii
2019-02-27  5:20       ` 積丹尼 Dan Jacobson
2019-02-27 15:50         ` Eli Zaretskii
2019-09-16  3:13 ` Stefan Kangas

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).