help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: In emacs 23 compile-mode doesn't recognize (c)perl error messages


From: LanX
Subject: Re: In emacs 23 compile-mode doesn't recognize (c)perl error messages
Date: Tue, 13 Oct 2009 12:18:37 -0700 (PDT)
User-agent: G2/1.0

Hi

The problem has been fixed in 23.1.50.1 from the CVS trunk. The ticket
was closed and I just checked it.

http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3928

Apparently the problem was that '^ *' has been prefixed to all
regexes, but now this change was reverted.

Anyway my patches were not useless, because there is obviously another
new ...ehm .. "effect" I found.

cperl-mode tries to adjust "compilation-error-regexp-alist" (a
variable defined in `compile.el') to it's needs... but without
success, only the original regex-pattern from compile.el or mode-
compile are active.

AFAI can see this already didn't work in emacs22!

putting these lines into .emacs reactivates it:

(defvar cperl-compilation-error-regexp-alist-lanx-patch
  ;; This look like a paranoiac regexp: could anybody find a better
one? (which WORKS).
  '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\
\., \n]"
     2 3)
   )
  "Alist that specifies how to match errors in perl output.")

(if (fboundp 'eval-after-load)
    (eval-after-load
        "mode-compile"
      '(setq perl-compilation-error-regexp-alist
             cperl-compilation-error-regexp-alist-lanx-patch)))

Looking into the source of the bundled cperl-mode reveals that it must
have been changed in this respect.

Oddly it has the same revision number like the newest release from
Ilya - 6.2!

Please note that the regex from cperl-mode shouldn't be effected by
the now fixed bug, since it already starts at the beginning of the
line.


@Ilya: I changed the regex slightly, since the errorline can get
broken into two lines when "use diagnostics" is enabled in perl.

Cheers
  Rolf





On 1 Okt., 01:36, LanX <lanx.p...@googlemail.com> wrote:
> Hi
>
> I did a fresh install of gnu emacs 23 on my ubuntu box and everything
> seems to work fine, but when running mode-compile from cperl-mode the
> error messages are not recognized.
>
> That means the errors are not highlighted, clicking has no effect
> ("there is no error") and
> M-x next-error only produces "Moved past last error".
>
> Any idea?
>
> Cheers
>   Rolf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]