From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: What's your favourite *under_publicized* editing feature of Emacs? Date: Tue, 08 Feb 2011 23:37:20 -0500 Organization: A noiseless patient Spider Message-ID: References: <4D4F0063.10708@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297269640 12784 80.91.229.12 (9 Feb 2011 16:40:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Feb 2011 16:40:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 09 17:40:35 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 1PnD5n-00021M-2v for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Feb 2011 17:40:35 +0100 Original-Received: from localhost ([127.0.0.1]:42953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnD5m-0000Am-JZ for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Feb 2011 11:40:34 -0500 Original-Path: usenet.stanford.edu!newsserver.news.garr.it!kanaga.switch.ch!switch.ch!feeder.news-service.com!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Injection-Info: mx02.eternal-september.org; posting-host="enU2Qv5J1rXa8d9EqGZG5w"; logging-data="12549"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19i1OpUx7K9n/UHRZR/E3J8" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:/Gt1+eDNGFP2GMP9dhbYa98KFK0= sha1:eeEAdcKtwX1WjxpRTpZ1ntFqps0= Original-Xref: usenet.stanford.edu gnu.emacs.help:184882 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:79049 Archived-At: >> I set 'grep-mode' on my log file (which follow GNU >> error coding convention). On 50-100 KiB logs it take >> 10 sec to highlight matches. On larger files I type >> C-g to stop matching for highlighting. You may want to try the Emacs trunk's version of compile.el (I think it'll work with Emacs-23 as well). It should help out by being more lazy (e.g. it'll still takes 10s to parse the file when you jump to the end of it, but it should open instantaneously because it'll only need to parse the first page for that). > And I realize that compilation-mode is dumb as it try > set on all matched file/line pairs text properties to > allow move to another file by RET. compilation-mode indeed does more work than I'd like at the "highlight" time, and some of that work could indeed be delayed to the moment the user hits RET on a line. But my impression is that most of the time is spent regexp-matching (i.e. looking for matches) anyway, so moving this work won't make much difference if any. IOW my impression is that if your code is faster it's because it uses either more efficient regexps, or fewer regexps. > ("^\\([^:]+\\):\\([[:digit:]]+\\):[^ E.g. this regexp is more efficient than the one used by grep.el, by disallowing : in file names (resulting in a backtrack-free regexp). Stefan