* Adding support for previous/next-error
@ 2009-11-30 8:54 Nordlöw
2009-11-30 11:53 ` Pascal J. Bourguignon
0 siblings, 1 reply; 3+ messages in thread
From: Nordlöw @ 2009-11-30 8:54 UTC (permalink / raw)
To: help-gnu-emacs
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?
Thanks,
Nordlöw
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Adding support for previous/next-error
2009-11-30 8:54 Adding support for previous/next-error Nordlöw
@ 2009-11-30 11:53 ` Pascal J. Bourguignon
2009-12-01 15:31 ` Ted Zlatanov
0 siblings, 1 reply; 3+ messages in thread
From: Pascal J. Bourguignon @ 2009-11-30 11:53 UTC (permalink / raw)
To: help-gnu-emacs
Nordlöw <per.nordlow@gmail.com> 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?
Customize the variable: compilation-error-regexp-alist
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Adding support for previous/next-error
2009-11-30 11:53 ` Pascal J. Bourguignon
@ 2009-12-01 15:31 ` Ted Zlatanov
0 siblings, 0 replies; 3+ messages in thread
From: Ted Zlatanov @ 2009-12-01 15:31 UTC (permalink / raw)
To: help-gnu-emacs
On Mon, 30 Nov 2009 12:53:35 +0100 pjb@informatimago.com (Pascal J. Bourguignon) wrote:
PJB> Nordlöw <per.nordlow@gmail.com> 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 <f5>, 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-01 15:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-30 8:54 Adding support for previous/next-error Nordlöw
2009-11-30 11:53 ` Pascal J. Bourguignon
2009-12-01 15:31 ` Ted Zlatanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).