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: how to make next-error work on non-grep non-compilation Date: Fri, 20 May 2011 10:39:13 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87r57tqt3y.fsf@lifelogs.com> References: <488618d5-7787-4c18-876d-622852f33350@k3g2000prl.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1306269192 21852 80.91.229.12 (24 May 2011 20:33:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 May 2011 20:33:12 +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 May 24 22:33:08 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QOyHr-0005D0-MT for geh-help-gnu-emacs@m.gmane.org; Tue, 24 May 2011 22:33:07 +0200 Original-Received: from localhost ([::1]:35444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOyHr-0004ny-7A for geh-help-gnu-emacs@m.gmane.org; Tue, 24 May 2011 16:33:07 -0400 Original-Path: usenet.stanford.edu!news-transit.tcx.org.uk!news.albasani.net!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-X-Trace: news.albasani.net VbgaCdUVBXddlbPKHnLSu9bwAvSJ/wWebau66PyPwW0cY36j2HN5kuFYjVlJhKbr1h/dyk9mOduW/ZbID3ATuw== Original-NNTP-Posting-Date: Fri, 20 May 2011 15:39:13 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="W4K8MsZjkg39yWNJnAwfb4Why0bLYEUdw5151DvFIYjfDTmayxLhRLsWL3jhUTdQ3yUTcVculg7t7pQKX+ZhJZz7n0FfkcNWbxr4Dq/BVM/k0JyjkVojsKyBVYTp3qq/"; mail-complaints-to="abuse@albasani.net" User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) 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:R8DlbNr8FVhYw1c7BvQUEiu6GY0= sha1:aS0rnZTbPOc3Q9/A9341BJdgFys= Original-Xref: usenet.stanford.edu gnu.emacs.help:186877 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:81190 Archived-At: On Fri, 20 May 2011 04:41:54 -0700 (PDT) jimka wrote: j> Hi elisp experts, I have a file which contains grep/compilation style j> output. I'd like to insert that into an emacs buffer and provide the j> next- error capability to the user. I can't seem to make it work, j> but I feel like I'm almost there. You can make any buffer support `next-error' by binding `next-error-function'. See simple.el: (defvar next-error-function nil "Function to use to find the next error in the current buffer. The function is called with 2 parameters: ARG is an integer specifying by how many errors to move. RESET is a boolean which, if non-nil, says to go back to the beginning of the errors before moving. Major modes providing compile-like functionality should set this variable to indicate to `next-error' that this is a candidate buffer and how to navigate in it.") (make-variable-buffer-local 'next-error-function) The buffer doesn't have to be in any particular mode. Ted