unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults
@ 2013-01-02  4:55 Drew Adams
  2013-01-03  0:27 ` Juri Linkov
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Drew Adams @ 2013-01-02  4:55 UTC (permalink / raw)
  To: 13334

This is an enhancement request.
 
Not long ago we introduced the possibility of having more than one
default value for minibuffer input.  Users can cycle among these using
`M-n' (when the end of the history is reached, including before using
`M-p').
 
These default values are sometimes ordered in a way that we think might
be useful (more useful values closer to the last input, i.e., to the end
of the past inputs).  Sometimes there is no special order.
 
In any case, today a user must cycle `M-n' repeatedly to get to a
default value that is far from the last input.  S?he can use a prefix
argument to skip over some values.
 
A zero prefix arg has no effect whatsoever: no feedback, nada.
 
The enhancement would be to let a zero prefix arg (e.g. `C-0') reverse
the list of available default values and then go to the first one
(previously the last one).  So you could cycle among the defaults in the
opposite order.
 
If there are 10 default values, the first `C-0 M-n' would move to the
10th value, which would become the 1st value.  The 9th would become the
2nd, and so on.  So the next `M-n' would move to what was previously
the 9th etc.
 
In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
 of 2012-12-31 on ODIEONE
Bzr revision: 111388 rudalics@gmx.at-20121231113513-subz2dazg6yjukzh
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -IC:/Devel/emacs/build/include --ldflags -LC:/Devel/emacs/build/lib'
 






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

* bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults
  2013-01-02  4:55 bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults Drew Adams
@ 2013-01-03  0:27 ` Juri Linkov
  2013-01-03  0:49   ` Drew Adams
  2016-04-28 19:18 ` Lars Ingebrigtsen
  2016-04-29 22:04 ` Michael Heerdegen
  2 siblings, 1 reply; 11+ messages in thread
From: Juri Linkov @ 2013-01-03  0:27 UTC (permalink / raw)
  To: Drew Adams; +Cc: 13334

> The enhancement would be to let a zero prefix arg (e.g. `C-0') reverse
> the list of available default values and then go to the first one
> (previously the last one).  So you could cycle among the defaults in the
> opposite order.

Much more useful would be to display a complete list of suggestions,
so the users would be able to select the necessary element easily.

This is how it works in web browsers: a drop-down list with suggestions
is displayed where you can use up/down-arrow keys to select the suggestion.
Web browsers combine two types of lists into one suggestion box:
previously entered elements from the history and new suggestions
(often based on popular searches).

In Emacs the keybinding that works like this is <prior> or M-v
(`switch-to-completions').  But currently it doesn't display suggestions.
It could be enhanced to sort completions and put suggestions on the top
of the *Completions* list.





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

* bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults
  2013-01-03  0:27 ` Juri Linkov
@ 2013-01-03  0:49   ` Drew Adams
  2013-01-03 23:51     ` Juri Linkov
  0 siblings, 1 reply; 11+ messages in thread
From: Drew Adams @ 2013-01-03  0:49 UTC (permalink / raw)
  To: 'Juri Linkov'; +Cc: 13334

> > The enhancement would be to let a zero prefix arg (e.g. 
> > `C-0') reverse the list of available default values and
> > then go to the first one (previously the last one).
> > So you could cycle among the defaults in the opposite order.
> 
> Much more useful would be to display a complete list of suggestions,
> so the users would be able to select the necessary element easily.
> 
> This is how it works in web browsers: a drop-down list with 
> suggestions is displayed where you can use up/down-arrow keys to select 
> the suggestion.
> Web browsers combine two types of lists into one suggestion box:
> previously entered elements from the history and new suggestions
> (often based on popular searches).
> 
> In Emacs the keybinding that works like this is <prior> or M-v
> (`switch-to-completions').  But currently it doesn't display 
> suggestions.  It could be enhanced to sort completions and put
> suggestions on the top of the *Completions* list.

No, please do not do any such thing.  Please keep *Completions* separate.  Do
not mix such "suggestions" or past inputs with completion candidates.

Simply adding the default value(s) to the history is enough, provided you also
do what is done in Icicles: provide a minibuffer key (available always, not just
during completion) that lets you complete against the history list.  I use `M-o'
for this (by default).

You can pull any number of history elements into the same minibuffer input you
are composing, any number of times.  And you can use completion to access the
history elements.  (And they are kept separate from the completion candidates of
the parent minibuffer - you are completing only against history elements.)

http://www.emacswiki.org/emacs/Icicles_-_History_Enhancements#InsertPreviousInpu
ts

If you want to move beyond the existing M-n, M-p, M-s, M-r for vanilla Emacs,
then please consider using an enhancement like the Icicles M-o.






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

* bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults
  2013-01-03  0:49   ` Drew Adams
@ 2013-01-03 23:51     ` Juri Linkov
  2013-01-04  0:40       ` Drew Adams
  0 siblings, 1 reply; 11+ messages in thread
From: Juri Linkov @ 2013-01-03 23:51 UTC (permalink / raw)
  To: Drew Adams; +Cc: 13334

> Simply adding the default value(s) to the history is enough, provided
> you also do what is done in Icicles: provide a minibuffer key
> (available always, not just during completion) that lets you complete
> against the history list.  I use `M-o' for this (by default).

Web browsers use `M-down', so we could provide the same.
I don't expect much controversy in regard to this key ;-)





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

* bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults
  2013-01-03 23:51     ` Juri Linkov
@ 2013-01-04  0:40       ` Drew Adams
  0 siblings, 0 replies; 11+ messages in thread
From: Drew Adams @ 2013-01-04  0:40 UTC (permalink / raw)
  To: 'Juri Linkov'; +Cc: 13334

> > Simply adding the default value(s) to the history is 
> > enough, provided you also do what is done in Icicles:
> > provide a minibuffer key (available always, not just
> > during completion) that lets you complete
> > against the history list.  I use `M-o' for this (by default).
> 
> Web browsers use `M-down', so we could provide the same.
> I don't expect much controversy in regard to this key ;-)

FWIW -

1. I use `M-down' for incremental frame movements (down).  Cursor keys should
generally be used for directional actions, if possible.  (FWIW, M-down does
nothing in my web browser.  And basing Emacs keys on what some web browsers
might use them for is not a strong argument, IMO.)

2. I chose `M-o' for history element completion & insertion because it is bound
globally to a command that is not particularly useful in the minibuffer.






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

* bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults
  2013-01-02  4:55 bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults Drew Adams
  2013-01-03  0:27 ` Juri Linkov
@ 2016-04-28 19:18 ` Lars Ingebrigtsen
  2016-04-29 14:36   ` Drew Adams
  2016-04-29 22:04 ` Michael Heerdegen
  2 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-28 19:18 UTC (permalink / raw)
  To: Drew Adams; +Cc: 13334

"Drew Adams" <drew.adams@oracle.com> writes:

> The enhancement would be to let a zero prefix arg (e.g. `C-0') reverse
> the list of available default values and then go to the first one
> (previously the last one).  So you could cycle among the defaults in the
> opposite order.

I think that sounds very awkward.  I don't expect users to remember what
they had in the oldest part of the history.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults
  2016-04-28 19:18 ` Lars Ingebrigtsen
@ 2016-04-29 14:36   ` Drew Adams
  0 siblings, 0 replies; 11+ messages in thread
From: Drew Adams @ 2016-04-29 14:36 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 13334

> > The enhancement would be to let a zero prefix arg (e.g. `C-0') reverse
> > the list of available default values and then go to the first one
> > (previously the last one).  So you could cycle among the defaults in the
> > opposite order.
> 
> I think that sounds very awkward.  I don't expect users to remember what
> they had in the oldest part of the history.

Perhaps you did not understand the request.
This is NOT about remembering anything.
This is NOT even about the input history.  At all.

This is about the set (list) of _default values_ a user can
choose from using `M-n'.

You don't need to remember anything or know what's in that list.
In fact that's the point: you generally do not know what is in
the list (all of it).  Giving you the ability to reverse the
order at any time lets you get to any of its elements easier,
and even to more easily discover what is in the list.

Juri proposed (in this thread) an alternative approach, which
also tries to solve the same problem: give users easier access
to elements in the (possibly long) list of defaults.  The
problem is real (if minor).  This ticket should be left open
so that the best solution can be found and implemented.





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

* bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults
  2013-01-02  4:55 bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults Drew Adams
  2013-01-03  0:27 ` Juri Linkov
  2016-04-28 19:18 ` Lars Ingebrigtsen
@ 2016-04-29 22:04 ` Michael Heerdegen
  2016-04-29 22:47   ` Drew Adams
  2 siblings, 1 reply; 11+ messages in thread
From: Michael Heerdegen @ 2016-04-29 22:04 UTC (permalink / raw)
  To: Drew Adams; +Cc: 13334

"Drew Adams" <drew.adams@oracle.com> writes:

> The enhancement would be to let a zero prefix arg (e.g. `C-0') reverse
> the list of available default values and then go to the first one
> (previously the last one).  So you could cycle among the defaults in the
> opposite order.

A slightly different approach would be to make it just go to the end of
the history, without changing the order.  Then you could just use M-p to
go backwards.  I guess that would not be hard to do (see
`goto-history-element').


Michael.





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

* bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults
  2016-04-29 22:04 ` Michael Heerdegen
@ 2016-04-29 22:47   ` Drew Adams
  2016-04-30 10:35     ` Michael Heerdegen
  0 siblings, 1 reply; 11+ messages in thread
From: Drew Adams @ 2016-04-29 22:47 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 13334

> > The enhancement would be to let a zero prefix arg (e.g. `C-0') reverse
> > the list of available default values and then go to the first one
> > (previously the last one).  So you could cycle among the defaults in the
> > opposite order.
> 
> A slightly different approach would be to make it just go to the end of
> the history, without changing the order.  Then you could just use M-p to
> go backwards.  I guess that would not be hard to do (see
> `goto-history-element').

Agreed.  That is about as good.  (But again, it's not about the input
_history_.  It's about a set of possible default values.)

The only reason what I suggested might be considered slightly better
is that `C-p' is generally thought of as accessing the input history
(see the above confusion), not the defaults.

That's the case at the outset, but of course once you've used one of
`C-n' or `C-p' the other just reverses within the list (inputs or
defaults) that you started cycling, until you get back to the starting
point (origin, dividing the two lists).





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

* bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults
  2016-04-29 22:47   ` Drew Adams
@ 2016-04-30 10:35     ` Michael Heerdegen
  2016-04-30 15:22       ` Drew Adams
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Heerdegen @ 2016-04-30 10:35 UTC (permalink / raw)
  To: Drew Adams; +Cc: 13334

Drew Adams <drew.adams@oracle.com> writes:

> > A slightly different approach would be to make it just go to the end of
> > the history, without changing the order.  Then you could just use M-p to
> > go backwards.  I guess that would not be hard to do (see
> > `goto-history-element').
>
> Agreed.  That is about as good.  (But again, it's not about the input
> _history_.  It's about a set of possible default values.)

I had realized that.

> The only reason what I suggested might be considered slightly better
> is that `C-p' is generally thought of as accessing the input history
> (see the above confusion), not the defaults.
>
> That's the case at the outset, but of course once you've used one of
> `C-n' or `C-p' the other just reverses within the list (inputs or
> defaults) that you started cycling, until you get back to the starting
> point (origin, dividing the two lists).


(Do you mean M-n, M-p?)

Internally it's just one list AFAIK (with the starting point somewhere
in the middle after defaults have been added, so to say).  M-n and M-p
move through the complete list without distinguishing in which "part" we
are - history or defaults.  So I don't think just going to the end of
the defaults would be confusing.


Michael.





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

* bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults
  2016-04-30 10:35     ` Michael Heerdegen
@ 2016-04-30 15:22       ` Drew Adams
  0 siblings, 0 replies; 11+ messages in thread
From: Drew Adams @ 2016-04-30 15:22 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 13334

> > The only reason what I suggested might be considered slightly better
> > is that `C-p' is generally thought of as accessing the input history
> > (see the above confusion), not the defaults.
> >
> > That's the case at the outset, but of course once you've used one of
> > `C-n' or `C-p' the other just reverses within the list (inputs or
> > defaults) that you started cycling, until you get back to the starting
> > point (origin, dividing the two lists).
> 
> (Do you mean M-n, M-p?)

Yes, sorry.

> Internally it's just one list AFAIK (with the starting point somewhere
> in the middle after defaults have been added, so to say).  M-n and M-p
> move through the complete list without distinguishing in which "part" we
> are - history or defaults.  So I don't think just going to the end of
> the defaults would be confusing.

As I say, it would be fine by me.

And yes it is one list, and no, there is no distinguishing
the parts (perhaps there should be).  Still the two parts
are different.





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

end of thread, other threads:[~2016-04-30 15:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-02  4:55 bug#13334: 24.3.50; enhancement request: `C-0 M-n' reverses order of defaults Drew Adams
2013-01-03  0:27 ` Juri Linkov
2013-01-03  0:49   ` Drew Adams
2013-01-03 23:51     ` Juri Linkov
2013-01-04  0:40       ` Drew Adams
2016-04-28 19:18 ` Lars Ingebrigtsen
2016-04-29 14:36   ` Drew Adams
2016-04-29 22:04 ` Michael Heerdegen
2016-04-29 22:47   ` Drew Adams
2016-04-30 10:35     ` Michael Heerdegen
2016-04-30 15:22       ` Drew Adams

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