Article View: comp.text.tex
Article #12046Re: new style Emacs compile
From: Klaus Berndl
Date: Sun, 16 Nov 2003 12:41
Date: Sun, 16 Nov 2003 12:41
70 lines
3921 bytes
3921 bytes
On Sat, 15 Nov 2003, Daniel Pfeiffer wrote:
> This is for those who are sick of the haphazard handling of error locating
> in Emacs `compile'. Error locations only became mouse-sensitive rather
> late, and were often somehow forgotten again. Or when clicking on one, it
> would jump to a different file.
>
> The prehistoric output parser at the root of this evil has now been
> eliminated and replaced by font-lock. The two were already running
> redundantly (unless you inexcusably don't use font-lock, which parses very
> well).
>
> Warnings and plain messages now come in less intimidating colours, like
> green in grep, and orange for warnings. Only GNU style messages have been
> enhanced for this. There is now also a usual
> `compilation-mode-font-lock-keywords' and it nicely handles all the checks
> configure outputs and -o options so you see at a glance where you are.
>
> For those writing the regexps, there is a debug feature to see where some
> highlighting came from.
>
> To use this, install it as compile.el somewhere early in you load-path, and
> it'll get the stuff it needs from the original compile.el automatically.
>
> http://dapfy.bei.t-online.de/compile.el
>
> TODO (this is still a prototype, so bear with me):
OK, but please explain the following:
1. What should the following code do??
'(mapc (lambda (sym)
(makunbound sym)
(fmakunbound sym)
(setplist sym nil))
'(compilation-xyz))
2. You code is not byte-compile-able (at least not with GNU Emacs 21.3):
While compiling toplevel forms:
!! error (("Invalid escape character syntax"))
This comes from:
(defvar compilation-mode-font-lock-keywords
'(;; configure output lines.
("^[Cc]hecking \\(?:[Ff]or \\|[Ii]f \\|[Ww]hether \\(?:to \\)?\\)?\\(.+\\)\\.\\.\\. *\\(?:(cached) *\\)?\\(\\(yes\\(?: .+\\)?\\)\\|no\\|\\(.*\\)\\)"
(1 font-lock-variable-name-face)
(2 (compilation-face 4 3)))
;; Command output lines. Recognize `make[n]:' lines too.
("^\\([A-Za-z_0-9/\.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:"
(1 font-lock-function-name-face) (3 compilation-line-face nil t))
(" --?o\\(?:utfile\\|utput\\)?[= ]?\\(\\S +\\)" . 1)
;; Up arrow.
("^\s *-*\\(\\^+\\)$" 1 compilation-warning-face))
"Additional things to highlight in Compilation mode.
This gets tacked on the end of the generated expressions.")
Thanks for the code but it would be fine if it would work ;-)
Klaus
--
Klaus Berndl mailto: klaus.berndl@sdm.de
sd&m AG http://www.sdm.de
software design & management
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-392, Fax -220
Technical Details
Message-ID:
<uptfsh4ep.fsf@sdm.de>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.kabelfoon.nl!195.129.110.21.MISMATCH!bnewsfeed00.bru.ops.eu.uu.net!bnewsinpeer01.bru.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!emea.uu.net!news.sdm.de!not-for-mailReferences:
<20031115210513.39ef5bfa.occitan@esperanto.org>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9e16,b12f45b3c77e13f0 X-Google-Attributes: gidf9e16,public X-Google-Thread: 107729,b12f45b3c77e13f0 X-Google-Attributes: gid107729,public X-Google-ArrivalTime: 2003-11-16 04:45:06 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.kabelfoon.nl!195.129.110.21.MISMATCH!bnewsfeed00.bru.ops.eu.uu.net!bnewsinpeer01.bru.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!emea.uu.net!news.sdm.de!not-for-mail From: Klaus Berndl <klaus.berndl@sdm.de> Newsgroups: comp.text.tex,gnu.emacs.sources Subject: Re: new style Emacs compile Date: 16 Nov 2003 13:41:18 +0100 Organization: "sd&m AG, Muenchen, Germany" Lines: 70 Sender: berndl@SACHRANG Message-ID: <uptfsh4ep.fsf@sdm.de> References: <20031115210513.39ef5bfa.occitan@esperanto.org> NNTP-Posting-Host: callin26.muc.sdm.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.sdm.de 1068986480 29916 195.125.139.26 (16 Nov 2003 12:41:20 GMT) X-Complaints-To: usenet@news.sdm.de NNTP-Posting-Date: Sun, 16 Nov 2003 12:41:20 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3