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: igrep mode incovenient compilation of results Date: Thu, 01 Aug 2013 21:11:29 -0600 Message-ID: References: <39e8981d-dc7b-456a-980e-ecc26a3e1bbb@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1375413128 24180 80.91.229.3 (2 Aug 2013 03:12:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Aug 2013 03:12:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 02 05:12:09 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V55mj-0001h6-OW for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Aug 2013 05:12:09 +0200 Original-Received: from localhost ([::1]:55008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V55mj-0005W8-79 for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Aug 2013 23:12:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V55mS-0005Ut-Nf for help-gnu-emacs@gnu.org; Thu, 01 Aug 2013 23:12:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V55mL-00071t-Cc for help-gnu-emacs@gnu.org; Thu, 01 Aug 2013 23:11:52 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:46278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V55mL-00071p-4C for help-gnu-emacs@gnu.org; Thu, 01 Aug 2013 23:11:45 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V55mJ-0000jq-Pz for help-gnu-emacs@gnu.org; Fri, 02 Aug 2013 05:11:43 +0200 Original-Received: from 71-215-81-77.hlrn.qwest.net ([71.215.81.77]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Aug 2013 05:11:43 +0200 Original-Received: from kevin.d.rodgers by 71-215-81-77.hlrn.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Aug 2013 05:11:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 71-215-81-77.hlrn.qwest.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 In-Reply-To: <39e8981d-dc7b-456a-980e-ecc26a3e1bbb@googlegroups.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92653 Archived-At: On 8/1/13 4:22 PM, Rami A wrote: > I am using igrep.el package and liking it. There is one thing that > bothers me though. In the igrep results page, the first and last lines > are highlighted as part of the compilation and so cycling through the > results using next-error will eventually hit these two lines with no > corresponding files of course. > > These are the format of these first and last files: > > Igrep started at Thu Aug 1 15:15:23 > > finished (matches found) at Thu Aug 1 15:15:27 Does `M-x grep' generate those lines in the *grep* buffer? Are they highlighted and do they impact `M-x next-error' in the same way? (BTW, Kenneth Goldman reported the same problem back in 2010. Perhaps he knows a solution.) > I believe that this is the code responsible for these lines to show up > all together. How to disable these lines from showing in the grep > results or at least not having them highlighted as part of the > results: This code simply attempts to emulate `M-x grep', on the Emacs versions that were popular when igrep was actively maintained (by me). That emulation probably needs to be updated to account for developments in grep.el and compile.el since then. > (if igrep-find > (setq command > (igrep-format-find-command command files))) > (cond ((eq igrep-save-buffers t) (save-some-buffers t)) > (igrep-save-buffers (save-some-buffers))) > (if (fboundp 'compilation-start) ; Emacs 22 > (let ((compilation-process-setup-function 'grep-process-setup)) > (or (fboundp 'igrep-mode) > (define-derived-mode igrep-mode grep-mode "Igrep")) > (compilation-start command > 'igrep-mode > nil > (cond ((eq compilation-highlight-regexp t)) > (compilation-highlight-regexp > (if (eq program "fgrep") > (regexp-quote regex) > regex))))) > (compile-internal command (format "No more %s matches" program) > "Igrep" nil grep-regexp-alist)))) -- Kevin Rodgers Denver, Colorado, USA