[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to make next-error work on non-grep non-compilation
From: |
Ted Zlatanov |
Subject: |
Re: how to make next-error work on non-grep non-compilation |
Date: |
Fri, 20 May 2011 10:39:13 -0500 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) |
On Fri, 20 May 2011 04:41:54 -0700 (PDT) jimka <jimka.velizy@googlemail.com>
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
Re: how to make next-error work on non-grep non-compilation,
Ted Zlatanov <=