From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: grep options Date: Mon, 31 Jan 2011 19:50:04 -0700 Message-ID: References: <878vymbpqy.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1296528631 29954 80.91.229.12 (1 Feb 2011 02:50:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 1 Feb 2011 02:50:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 01 03:50:27 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pk6K1-0002Ys-98 for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Feb 2011 03:50:25 +0100 Original-Received: from localhost ([127.0.0.1]:50130 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pk6K0-0002Qo-LE for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Jan 2011 21:50:24 -0500 Original-Received: from [140.186.70.92] (port=52268 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pk6Je-0002Qe-O9 for help-gnu-emacs@gnu.org; Mon, 31 Jan 2011 21:50:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pk6Jb-0001Av-Fw for help-gnu-emacs@gnu.org; Mon, 31 Jan 2011 21:50:02 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:54204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pk6Jb-0001An-2d for help-gnu-emacs@gnu.org; Mon, 31 Jan 2011 21:49:59 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Pk6JZ-0002IX-Kx for help-gnu-emacs@gnu.org; Tue, 01 Feb 2011 03:49:57 +0100 Original-Received: from c-24-8-96-241.hsd1.co.comcast.net ([24.8.96.241]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Feb 2011 03:49:57 +0100 Original-Received: from kevin.d.rodgers by c-24-8-96-241.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Feb 2011 03:49:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-24-8-96-241.hsd1.co.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:78894 Archived-At: On 1/24/11 11:28 AM, Ken Goldman wrote: > On 01/23/2011 10:58 PM, Stefan Monnier wrote: >>> That sounds like an awful ui. Do you mind submitting a bug report by M-x >>> report-emacs-bug so that it may be fixed upstream? thanks. >> >> I don't like that UI either, but I can't understand what you consider as >> a bug: that UI is lgrep's raison d'être. >> If you don't like it, you can use (C-u?) M-x grep. > > grep seems even worse than lgrep. At least lgrep fills in the word under the > point as the search string. > > I'm looking for an equivalent to the old igrep - default to the word under the > point, the files with the same mode, and the current directory --- with no > prompting. Hi Ken, Good to hear from you again! Perhaps you can do something like this: (require 'igrep) (defadvice lgrep (before interactive-igrep first activate) "Read REGEXP, FILES, and DIR using `igrep-read-args'." (interactive (progn (grep-compute-defaults) (let ((igrep-args (igrep-read-args))) ;; convert (PROGRAM REGEX FILES OPTIONS) to (REGEXP FILES DIR CONFIRM): (list (nth 1 igrep-args) (mapconcat 'file-name-nondirectory (nth 2 igrep-args) " ") (mapconcat 'file-name-directory (nth 2 igrep-args) " ") nil))))) -- Kevin Rodgers Denver, Colorado, USA