all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Who uses "complete word" (aka SPC) in the minibuffer and how/why
@ 2008-03-11 21:13 Stefan Monnier
  2008-03-11 22:59 ` Magnus Henoch
  2008-03-12 11:34 ` Bastien
  0 siblings, 2 replies; 13+ messages in thread
From: Stefan Monnier @ 2008-03-11 21:13 UTC (permalink / raw)
  To: emacs-devel

The subject says it all.

As I'm looking at ways to improve the default completion mechanism, I'm
trying to understand how "complete word" would fit in.  In order to know
how best to adapt it to some of the situations, I'd like to know how
it's used.  I personally never use it and always find TAB to be a much
better choice.

Of course, ideally nobody uses it (except some people who happen to
like to hit SPC but would be just as well served by minibuffer-complete
if it were bound to SPC) and we can get rid of it, but I expect life
isn't that simple.


        Stefan




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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-03-11 21:13 Who uses "complete word" (aka SPC) in the minibuffer and how/why Stefan Monnier
@ 2008-03-11 22:59 ` Magnus Henoch
  2008-03-12  1:37   ` Stefan Monnier
                     ` (3 more replies)
  2008-03-12 11:34 ` Bastien
  1 sibling, 4 replies; 13+ messages in thread
From: Magnus Henoch @ 2008-03-11 22:59 UTC (permalink / raw)
  To: emacs-devel

I use it with M-x, especially when I want to run a command that is
shadowed by a shorter one, e.g. customize-variable (shadowed by
customize) and mail-add-payment-async (shadowed by mail-add-payment).
At the end of the common part I hit SPC to get completion of the longer
command.

I could do this with the sequence TAB and '-' too, but that would be one
extra keypress.

Magnus





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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-03-11 22:59 ` Magnus Henoch
@ 2008-03-12  1:37   ` Stefan Monnier
  2008-03-12 18:12     ` Magnus Henoch
  2008-03-12 11:29   ` Bastien
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2008-03-12  1:37 UTC (permalink / raw)
  To: emacs-devel

> I use it with M-x, especially when I want to run a command that is
> shadowed by a shorter one, e.g. customize-variable (shadowed by
> customize) and mail-add-payment-async (shadowed by mail-add-payment).
> At the end of the common part I hit SPC to get completion of the longer
> command.

> I could do this with the sequence TAB and '-' too, but that would be one
> extra keypress.

Do you ever use it elsewhere than with M-x ?


        Stefan





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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-03-11 22:59 ` Magnus Henoch
  2008-03-12  1:37   ` Stefan Monnier
@ 2008-03-12 11:29   ` Bastien
  2008-03-21 18:39   ` Stefan Monnier
  2008-03-21 18:58   ` paul r
  3 siblings, 0 replies; 13+ messages in thread
From: Bastien @ 2008-03-12 11:29 UTC (permalink / raw)
  To: emacs-devel; +Cc: Magnus Henoch

Magnus Henoch <mange@freemail.hu> writes:

> I use it with M-x, especially when I want to run a command that is
> shadowed by a shorter one, e.g. customize-variable (shadowed by
> customize) and mail-add-payment-async (shadowed by mail-add-payment).
> At the end of the common part I hit SPC to get completion of the longer
> command.
>
> I could do this with the sequence TAB and '-' too, but that would be one
> extra keypress.

A reasonable behavior for minibuffer-complete could be:

(0) try to complete
(1) if (0) fails, present the list of possible completions
(2) if the previous TAB was (1), complete by selecting the 
    string which will reduce the number of completions to 
    the larger subset of the list presented in (1)

In the case Magnus describes it would lead to:

M-x cust TAB    [complete => custom]
M-x custom TAB  [display the list of possible completions]
M-x custom TAB  [complete => customize]
M-x custom TAB  [display the list of possible completions]
M-x custom- TAB [display the list of remaining completions]

... 

-- 
Bastien




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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-03-11 21:13 Who uses "complete word" (aka SPC) in the minibuffer and how/why Stefan Monnier
  2008-03-11 22:59 ` Magnus Henoch
@ 2008-03-12 11:34 ` Bastien
  1 sibling, 0 replies; 13+ messages in thread
From: Bastien @ 2008-03-12 11:34 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> As I'm looking at ways to improve the default completion mechanism, I'm
> trying to understand how "complete word" would fit in.  In order to know
> how best to adapt it to some of the situations, I'd like to know how
> it's used.  I personally never use it and always find TAB to be a much
> better choice.

I hardly use it.  

My only use is this one: in org-mode, when trying to refile a headline
under another one, `minibuffer-completion' offers a list displaying all
headlines, with a slash to indicate the hierarchy:

Headline with a title
Headline/Subheadline1
Headline/Subheadline2
Headline/Subheadline3
Headline2/Subheadline2.1
Headline2/Subheadline2.2
Headline2/Subheadline2.3

TAB  after Headline will always offer the complete list, whereas SPC
will jump to the heading "Heading with a title".

-- 
Bastien




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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-03-12  1:37   ` Stefan Monnier
@ 2008-03-12 18:12     ` Magnus Henoch
  0 siblings, 0 replies; 13+ messages in thread
From: Magnus Henoch @ 2008-03-12 18:12 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Do you ever use it elsewhere than with M-x ?

Not that I can think of.

Magnus





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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-03-11 22:59 ` Magnus Henoch
  2008-03-12  1:37   ` Stefan Monnier
  2008-03-12 11:29   ` Bastien
@ 2008-03-21 18:39   ` Stefan Monnier
  2008-03-21 18:58   ` paul r
  3 siblings, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2008-03-21 18:39 UTC (permalink / raw)
  To: emacs-devel

>>>>> "Magnus" == Magnus Henoch <mange@freemail.hu> writes:

> I use it with M-x, especially when I want to run a command that is
> shadowed by a shorter one, e.g. customize-variable (shadowed by
> customize) and mail-add-payment-async (shadowed by mail-add-payment).
> At the end of the common part I hit SPC to get completion of the longer
> command.

> I could do this with the sequence TAB and '-' too, but that would be one
> extra keypress.

>>>>> "Bastien" == Bastien  <bzg@altern.org> writes:

> I hardly use it.  

> My only use is this one: in org-mode, when trying to refile a headline
> under another one, `minibuffer-completion' offers a list displaying all
> headlines, with a slash to indicate the hierarchy:

> Headline with a title
> Headline/Subheadline1
> Headline/Subheadline2
> Headline/Subheadline3
> Headline2/Subheadline2.1
> Headline2/Subheadline2.2
> Headline2/Subheadline2.3

> TAB  after Headline will always offer the complete list, whereas SPC
> will jump to the heading "Heading with a title".

I notice that both uses are in "must-match" completions.
Maybe we should remove the SPC binding from
minibuffer-local-completion-map to minibuffer-local-must-match-map.

In any case, it does help me understand the intention behind
the command.


        Stefan




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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-03-11 22:59 ` Magnus Henoch
                     ` (2 preceding siblings ...)
  2008-03-21 18:39   ` Stefan Monnier
@ 2008-03-21 18:58   ` paul r
  2008-04-11 20:18     ` Stefan Monnier
  3 siblings, 1 reply; 13+ messages in thread
From: paul r @ 2008-03-21 18:58 UTC (permalink / raw)
  To: emacs-devel

> I use it with M-x, especially when I want to run a command that is
>  shadowed by a shorter one, e.g. customize-variable (shadowed by
>  customize) and mail-add-payment-async (shadowed by mail-add-payment).
>  At the end of the common part I hit SPC to get completion of the longer
>  command.
>
>  I could do this with the sequence TAB and '-' too, but that would be one
>  extra keypress.

Same here, and I like it. I find it smart to use for completion a key
that is unlikely to make sens as self-insert. And to be honest, - is a
pain to hit on my keyboard.

-- Paul

PS : Attentive reader may have seen a parallel with Tab for completion
in M-:  ...  :)




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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-03-21 18:58   ` paul r
@ 2008-04-11 20:18     ` Stefan Monnier
  2008-04-11 23:20       ` Paul Rivier
  2008-04-13 22:23       ` Juri Linkov
  0 siblings, 2 replies; 13+ messages in thread
From: Stefan Monnier @ 2008-04-11 20:18 UTC (permalink / raw)
  To: paul r, Magnus Henoch; +Cc: emacs-devel

>> I use it with M-x, especially when I want to run a command that is
>> shadowed by a shorter one, e.g. customize-variable (shadowed by
>> customize) and mail-add-payment-async (shadowed by mail-add-payment).
>> At the end of the common part I hit SPC to get completion of the longer
>> command.
>> 
>> I could do this with the sequence TAB and '-' too, but that would be one
>> extra keypress.

> Same here, and I like it. I find it smart to use for completion a key
> that is unlikely to make sens as self-insert. And to be honest, - is a
> pain to hit on my keyboard.

So, in any case the "word" part of the completion behavior is not
something which you use?

To make it clear: minibuffer-complete-word has 2 main differences with
minibuffer-complete:
1 - if there's no completion, it tries to add a " " or a "-".
2 - it only completes a single word at a time.  E.g.

  M-x fill-region- TAB   => fill-region-as-paragraph
  M-x fill-region- SPC   => fill-region-as-

So you like 1 but you don't seem to be using 2.  Does anyone care about
the part 2 of the behavior of minibuffer-complete-word?

If not, that's great: it's the part that's nasty to implement and I'd be
happy to scrap it (or at least let it fail when it's too difficult to
make it work).


        Stefan




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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-04-11 20:18     ` Stefan Monnier
@ 2008-04-11 23:20       ` Paul Rivier
  2008-04-12  5:26         ` Stefan Monnier
  2008-04-13 22:23       ` Juri Linkov
  1 sibling, 1 reply; 13+ messages in thread
From: Paul Rivier @ 2008-04-11 23:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: paul r, Magnus Henoch, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> If not, that's great: it's the part that's nasty to implement and I'd be
> happy to scrap it (or at least let it fail when it's too difficult to
> make it work).

I use it, although I admit it is no necessary, so I invite you to
carry any change that can suit better your plans.

-- 
Paul




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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-04-11 23:20       ` Paul Rivier
@ 2008-04-12  5:26         ` Stefan Monnier
  2008-04-12 11:23           ` Paul Rivier
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2008-04-12  5:26 UTC (permalink / raw)
  To: Paul Rivier; +Cc: paul r, Magnus Henoch, emacs-devel

>> If not, that's great: it's the part that's nasty to implement and I'd be
>> happy to scrap it (or at least let it fail when it's too difficult to
>> make it work).

> I use it, although I admit it is no necessary, so I invite you to
> carry any change that can suit better your plans.

Could you expand on how you make use of it?


        Stefan




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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-04-12  5:26         ` Stefan Monnier
@ 2008-04-12 11:23           ` Paul Rivier
  0 siblings, 0 replies; 13+ messages in thread
From: Paul Rivier @ 2008-04-12 11:23 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: paul r, Magnus Henoch, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Could you expand on how you make use of it?

After reading again, nothing incompatible with the change you plan to
make. But thank you for your interest. I really simply use space for
completion in M-x, I just keep hitting space and disambiguating letter
after letter, but actually you are right that the "word-by-word"
completion is of no use here. If you plan to leave regular completion,
and "- when relevant", on space, I think I will not even notice the
change. So, definitely, I do not rely on the "word-by-word" feature.
Thanks.

-- 
Paul R




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

* Re: Who uses "complete word" (aka SPC) in the minibuffer and how/why
  2008-04-11 20:18     ` Stefan Monnier
  2008-04-11 23:20       ` Paul Rivier
@ 2008-04-13 22:23       ` Juri Linkov
  1 sibling, 0 replies; 13+ messages in thread
From: Juri Linkov @ 2008-04-13 22:23 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: paul r, Magnus Henoch, emacs-devel

> If not, that's great: it's the part that's nasty to implement and I'd be
> happy to scrap it (or at least let it fail when it's too difficult to
> make it work).

I personally don't use word completion, but in Gtk the standard way of
completion is on word-by-word basis.  So it might be natural for Gnome users
to expect Emacs to complete the same way.  Though in Gtk word completion
is bound to TAB, and in Emacs it is bound to SPC, perhaps some users
might want to use SPC or rebind TAB to minibuffer-complete-word.

-- 
Juri Linkov
http://www.jurta.org/emacs/




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

end of thread, other threads:[~2008-04-13 22:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-11 21:13 Who uses "complete word" (aka SPC) in the minibuffer and how/why Stefan Monnier
2008-03-11 22:59 ` Magnus Henoch
2008-03-12  1:37   ` Stefan Monnier
2008-03-12 18:12     ` Magnus Henoch
2008-03-12 11:29   ` Bastien
2008-03-21 18:39   ` Stefan Monnier
2008-03-21 18:58   ` paul r
2008-04-11 20:18     ` Stefan Monnier
2008-04-11 23:20       ` Paul Rivier
2008-04-12  5:26         ` Stefan Monnier
2008-04-12 11:23           ` Paul Rivier
2008-04-13 22:23       ` Juri Linkov
2008-03-12 11:34 ` Bastien

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.