From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Baurzhan Ismagulov Newsgroups: gmane.emacs.help Subject: Re: bash and reverse-search-history Date: Sat, 22 Apr 2006 21:24:02 +0200 Message-ID: <20060422192402.GC4759@radix50.net> References: <20060421154309.GK5280@radix50.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145733873 14862 80.91.229.2 (22 Apr 2006 19:24:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 22 Apr 2006 19:24:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 22 21:24:31 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FXNiX-0000a8-Pj for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Apr 2006 21:24:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FXNiX-0004Gb-1G for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Apr 2006 15:24:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FXNiL-0004GW-V9 for help-gnu-emacs@gnu.org; Sat, 22 Apr 2006 15:24:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FXNiJ-0004FG-WE for help-gnu-emacs@gnu.org; Sat, 22 Apr 2006 15:24:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FXNiJ-0004FB-R5 for help-gnu-emacs@gnu.org; Sat, 22 Apr 2006 15:24:15 -0400 Original-Received: from [151.189.21.43] (helo=mail-in-03.arcor-online.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FXNkA-00080d-2c for help-gnu-emacs@gnu.org; Sat, 22 Apr 2006 15:26:10 -0400 Original-Received: from mail-in-03-z2.arcor-online.net (mail-in-03-z2.arcor-online.net [151.189.8.15]) by mail-in-03.arcor-online.net (Postfix) with ESMTP id 4DD8C168EDE for ; Sat, 22 Apr 2006 21:24:13 +0200 (CEST) Original-Received: from mail-in-01.arcor-online.net (mail-in-01.arcor-online.net [151.189.21.41]) by mail-in-03-z2.arcor-online.net (Postfix) with ESMTP id 330FF278139 for ; Sat, 22 Apr 2006 21:24:13 +0200 (CEST) Original-Received: from alatau.radix50.net (dslb-088-064-000-179.pools.arcor-ip.net [88.64.0.179]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id D3F06D5611 for ; Sat, 22 Apr 2006 21:24:12 +0200 (CEST) Original-Received: from alatau.radix50.net (localhost [127.0.0.1]) by alatau.radix50.net (8.13.6/8.13.6/Debian-1) with ESMTP id k3MJO2PV012830 for ; Sat, 22 Apr 2006 21:24:02 +0200 Original-Received: (from ibr@localhost) by alatau.radix50.net (8.13.6/8.13.6/Submit) id k3MJO2Eb012829 for help-gnu-emacs@gnu.org; Sat, 22 Apr 2006 21:24:02 +0200 Original-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060403 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:34581 Archived-At: 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.