From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.help Subject: Re: Adding support for previous/next-error Date: Tue, 01 Dec 2009 09:31:50 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87skbuogm1.fsf@lifelogs.com> References: <58df342e-119c-4981-979a-7e18812877ec@m26g2000yqb.googlegroups.com> <878wdo44ao.fsf@galatea.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1259682243 9808 80.91.229.12 (1 Dec 2009 15:44:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Dec 2009 15:44:03 +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 Dec 01 16:43:57 2009 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.50) id 1NFUrP-0005q2-9G for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Dec 2009 16:41:51 +0100 Original-Received: from localhost ([127.0.0.1]:51513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFUrP-00017F-0Y for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Dec 2009 10:41:51 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!newsfeed.esat.net!feeder.news.heanet.ie!feeder.erje.net!news2.arglkargh.de!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-X-Trace: news.albasani.net jTAPGYdtraQLygnhglD2z73uqUtryNFdfVyrBpH07p7o0OaTGIU8Q8CkIxYReMb8HVYzrixB4Gj5D7eTl1DAJNf5Fc2AXbMuBogW70k/MIXlqZxl0bhZUjfwGkMxyCA9 Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Tue, 1 Dec 2009 15:31:51 +0000 (UTC) X-User-ID: pm49k02t1CuO2Qm18Zfs1ZOXbuJ9+z2ZzkC+caAbVlw= X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:SuMwzo/Lv073zaSJ7LzO7XcKink= sha1:tCghJ1yOo29KPcZlxMWggf6GoLI= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) X-NNTP-Posting-Host: 9Vh9asfoV2EhhS+zu7bHq655sgq5uXJHy0PaSIgZuOQ= Original-Xref: news.stanford.edu gnu.emacs.help:175207 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:70281 Archived-At: On Mon, 30 Nov 2009 12:53:35 +0100 pjb@informatimago.com (Pascal J. Bourguignon) wrote: PJB> Nordlöw writes: >> How do I add "support" for previous-error and next-error in my hits- >> buffer showing output of from my grep-like scanning code implemented >> in Emacs Lisp? PJB> Customize the variable: compilation-error-regexp-alist This will work iff that buffer derives from compilation-mode. Otherwise, Nordlow needs to bind next-error-function in the buffer. See C-h v next-error: "C-x ` normally uses the most recently started compilation, grep, or occur buffer. It can also operate on any buffer with output from the , M-x grep commands, or, more generally, on any buffer in Compilation mode or with Compilation Minor mode enabled, or any buffer in which `next-error-function' is bound to an appropriate function. To specify use of a particular buffer for error messages, type C-x ` in that buffer when it is the only one displayed in the current frame. Once C-x ` has chosen the buffer for error messages, it runs `next-error-hook' with `run-hooks', and stays with that buffer until you use it in some other buffer which uses Compilation mode or Compilation Minor mode." Note that next-error-function has very specific semantics so it can move backwards with previous-error, etc. So basically any buffer can serve as a next-error buffer. Occur, grep, and compilation implement that mechanism but it's intended to be general and easy to support. Ted