unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#380: previous-matching-history-element beef up
@ 2008-06-09 18:07 jidanni
  2008-06-09 19:27 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: jidanni @ 2008-06-09 18:07 UTC (permalink / raw)
  To: bug-gnu-emacs

Let's examine today the docstring for

   M-r (translated from <escape> r) runs the command previous-matching-history-element
     which is an interactive compiled Lisp function in `simple.el'.
   It is bound to M-r.
   (previous-matching-history-element REGEXP N)

   Find the previous history element that matches REGEXP.
   (Previous history elements refer to earlier actions.)
   With prefix argument N, search for Nth previous match.
   If N is negative, find the next or Nth next match.
   Normally, history elements are matched case-insensitively if
   `case-fold-search' is non-nil, but an uppercase letter in REGEXP
   makes the search case-sensitive.
   See also `minibuffer-history-case-insensitive-variables'.

OK, but what about when you want to search further back again: mention that you
just hit a second M-r RET...

And when one does hit that second M-r, it would be nice if the prompt
would show what the current default search string is. All it ever says is
"Previous element matching (regexp): " though indeed it remembers a
default all the time at least after first use.

Indeed it might even also say "found on history item 432" or "found at
18% of history" upon finding something, but maybe that's too verbose.

Also some of us would like C-r to "bust through" into previous lines,
so we don't have to use the less familiar M-r (ESC r for us old dogs
who never learned new ALT tricks). Maybe make a variable to allow
that.

All the above also applies to M-s.







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

* bug#380: previous-matching-history-element beef up
  2008-06-09 18:07 bug#380: previous-matching-history-element beef up jidanni
@ 2008-06-09 19:27 ` Stefan Monnier
  2019-10-13  5:15   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2008-06-09 19:27 UTC (permalink / raw)
  To: 380

tag 380 +wishlist
thanks

> And when one does hit that second M-r, it would be nice if the prompt
> would show what the current default search string is. All it ever says is
> "Previous element matching (regexp): " though indeed it remembers a
> default all the time at least after first use.

Indeed, it should probably use the " (default <foo>)" convention.
But maybe that would be impractical because the prompt would then be
too long.

> Also some of us would like C-r to "bust through" into previous lines,
> so we don't have to use the less familiar M-r (ESC r for us old dogs
> who never learned new ALT tricks). Maybe make a variable to allow
> that.

I don't know what you mean by "bust through", but in Emacs-23, C-s and
C-r (i.e. isearch) will automatically jump through the history to find
the next match.  Maybe that's what you meant.


        Stefan






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

* bug#380: previous-matching-history-element beef up
  2008-06-09 19:27 ` Stefan Monnier
@ 2019-10-13  5:15   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-13  5:15 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 380

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

>> And when one does hit that second M-r, it would be nice if the prompt
>> would show what the current default search string is. All it ever says is
>> "Previous element matching (regexp): " though indeed it remembers a
>> default all the time at least after first use.
>
> Indeed, it should probably use the " (default <foo>)" convention.
> But maybe that would be impractical because the prompt would then be
> too long.

It's a bit on the long side, but I think it helps usability a lot, so
I've made this change on the trunk now.

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





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

end of thread, other threads:[~2019-10-13  5:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-09 18:07 bug#380: previous-matching-history-element beef up jidanni
2008-06-09 19:27 ` Stefan Monnier
2019-10-13  5:15   ` Lars Ingebrigtsen

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