* How do I use compilation mode?
@ 2012-02-05 15:07 Alan Mackenzie
2012-02-05 15:20 ` Óscar Fuentes
2012-02-06 14:34 ` Stefan Monnier
0 siblings, 2 replies; 4+ messages in thread
From: Alan Mackenzie @ 2012-02-05 15:07 UTC (permalink / raw
To: emacs-devel
Hi, Emacs.
I'd like to use compilation mode. In particular, I have a log file and
extracted lines like this into a separate buffer from it with grep:
cc-mode.acm 47446:[^2012-01-26: mackenzie]: Enable ">>" as double template ender.
I'd like to go to line 47446 in the log file by pressing CR on that line.
The instructions on how to do this are not optimal. I've basically
tried pushing elements onto the documented variables
compilation-error-regexp-alist\\(-alist\\)? in the form that they're in
those lists for other modes.
In particular, I pushed 'acm onto compilation-error-regexp-alist and
((acm "\\(cc-mode.acm\\) \\([0-9]+\\):\\[\\^[0-9]+-[0-9]+-[0-9?]+:[^]]*\\]:"
1 2 nil))
onto compilation-error-regexp-alist. On typing CR in the pertinent
buffer, I get the ironic error message "No error here".
I've tried edebugging through compile.el, and just got lost in the
complexity.
Would somebody please help me out here.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How do I use compilation mode?
2012-02-05 15:07 How do I use compilation mode? Alan Mackenzie
@ 2012-02-05 15:20 ` Óscar Fuentes
2012-02-05 17:53 ` Alan Mackenzie
2012-02-06 14:34 ` Stefan Monnier
1 sibling, 1 reply; 4+ messages in thread
From: Óscar Fuentes @ 2012-02-05 15:20 UTC (permalink / raw
To: Alan Mackenzie; +Cc: emacs-devel
Hello Alan.
Alan Mackenzie <acm@muc.de> writes:
> In particular, I pushed 'acm onto compilation-error-regexp-alist and
>
> ((acm "\\(cc-mode.acm\\) \\([0-9]+\\):\\[\\^[0-9]+-[0-9]+-[0-9?]+:[^]]*\\]:"
> 1 2 nil))
>
> onto compilation-error-regexp-alist.
That symbol `acm' there is wrong. The solution is simpler. For instance,
this is what I use for matching the diagnostics reported by my compiler:
(add-to-list 'compilation-error-regexp-alist
'("^\\(?:..\\[[ 0-9]+\\]+ \\)*\\([a-zA-Z0-9:\\/\\.-]+\.lp0\\)\(\\([0-9]+\\)\)"
1 2 nil))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How do I use compilation mode?
2012-02-05 15:20 ` Óscar Fuentes
@ 2012-02-05 17:53 ` Alan Mackenzie
0 siblings, 0 replies; 4+ messages in thread
From: Alan Mackenzie @ 2012-02-05 17:53 UTC (permalink / raw
To: Óscar Fuentes; +Cc: emacs-devel
Hello, Óscar/
On Sun, Feb 05, 2012 at 04:20:30PM +0100, Óscar Fuentes wrote:
> Hello Alan.
> Alan Mackenzie <acm@muc.de> writes:
> > In particular, I pushed 'acm onto compilation-error-regexp-alist and
> > ((acm "\\(cc-mode.acm\\) \\([0-9]+\\):\\[\\^[0-9]+-[0-9]+-[0-9?]+:[^]]*\\]:"
> > 1 2 nil))
> > onto compilation-error-regexp-alist.
> That symbol `acm' there is wrong. The solution is simpler. For instance,
> this is what I use for matching the diagnostics reported by my compiler:
> (add-to-list 'compilation-error-regexp-alist
> '("^\\(?:..\\[[ 0-9]+\\]+ \\)*\\([a-zA-Z0-9:\\/\\.-]+\.lp0\\)\(\\([0-9]+\\)\)"
> 1 2 nil))
That worked like a dream. Thanks!
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How do I use compilation mode?
2012-02-05 15:07 How do I use compilation mode? Alan Mackenzie
2012-02-05 15:20 ` Óscar Fuentes
@ 2012-02-06 14:34 ` Stefan Monnier
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2012-02-06 14:34 UTC (permalink / raw
To: Alan Mackenzie; +Cc: emacs-devel
> I'd like to use compilation mode. In particular, I have a log file and
> extracted lines like this into a separate buffer from it with grep:
> cc-mode.acm 47446:[^2012-01-26: mackenzie]: Enable ">>" as double template ender.
BTW, a simpler solution: add a colon between "cc-mode.acm" and "47446"
and you'll be using a standard format recognized by compilation-mode
without any extra work.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-06 14:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-05 15:07 How do I use compilation mode? Alan Mackenzie
2012-02-05 15:20 ` Óscar Fuentes
2012-02-05 17:53 ` Alan Mackenzie
2012-02-06 14:34 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.