help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash and reverse-search-history


From: Baurzhan Ismagulov
Subject: Re: bash and reverse-search-history
Date: Sat, 22 Apr 2006 21:24:02 +0200
User-agent: Mutt/1.5.11+cvs20060403

Hello Drew,

On Fri, Apr 21, 2006 at 09:45:09AM -0700, Drew Adams wrote:
> I don't know if this helps you or not, but you might take a look. Icicles (a
> library for GNU Emacs) lets you search the entire history (your #2),
> updating matches as you type (your #1).

This looks interesting. I wanted to try it, however I couldn't find out
how to invoke it. I downloaded the *.el files mentioned, put them into
~/.elisp/load, and added the following lines to my ~/.emacs:

(add-to-list 'load-path (expand-file-name "~/.elisp/load"))
(load-library "icicles.el")

I start emacs, M-x shell RET, and get the shell prompt. I've read some
of the wiki pages, but it isn't clear for me how I can use Icicles. The
page about history doesn't mention shell at all, only minibuffer
completions. Any idea?


> I don't know what you mean by "have to modify regexp on the next run".

In bash, you can press C-r, and type, e.g., "dpkg". As you type each
character, bash shows the most recent command that matches the
expression you've typed up to that moment.

In emacs, I press M-r, it asks for a regexp, I type "dpkg". Nothing is
updated as I type, emacs waits for me to press RET to start searching. I
press RET, it finds the last dpkg command, which happens to be the 29th.
I see it isn't what I was looking for, and want to repeat the search. I
have to press M-r dpkg RET again (this is the "next run" I'd mentioned
in the first posting; "modifying" it is about the case you are not
satisfied with your initial regexp and want to enter a more specific one
instead of the one you typed at first). Or, I can press M-r M-r RET RET,
and emacs will search again. But only 32 commands back?!

So, what I'm looking for is more or less exactly bash's C-r
functionality. Can I perhaps just unbind emacs's C-r for shell buffers,
so that the character is passed to bash?


With kind regards,
Baurzhan.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]