LanX has asked for the wisdom of the Perl Monks concerning the following question:

Hi

I'm experiencing problems while upgrading to the new emacs 23. After compilation the perl error lines are not parsed in the compilation buffer.

I already asked at gnu.emacs.help ...

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

... but I need to know if others have the same problem before I try to report a bug.

Could anyone please try and tell me?

Cheers Rolf

UPDATE: doom just gave me the confirmation that it works form him...
  • Comment on [emacs23] Upgrading with cperl-mode and mode-compile

Replies are listed 'Best First'.
Re: [emacs23] Upgrading with cperl-mode and mode-compile (Workaround +Ticket)
by LanX (Saint) on Oct 09, 2009 at 14:31 UTC
    Hi

    I've sent a bugreport:

    4689: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4689 Emacs Bug Tracking System

    Here a workaround patch I found to make the regex match again:

    Changing in mode-compile.el from

    ------------------------------------------------

    (defvar perl-compilation-error-regexp-alist ;; Contributed by Martin Jost '( ;; PERL 4 ("in file \\([^ ]+\\) at line \\([0-9]+\\).*" 1 2) ;; PERL 5 Blubber at FILE line XY, <XY> line ab. ("at \\([^ ]+\\) line \\([0-9]+\\)," 1 2) ;; PERL 5 Blubber at FILE line XY. ("at \\([^ ]+\\) line \\([0-9]+\\)." 1 2) ) ;; This look like a paranoiac regexp: could anybody find a better one? (which WORK). ;;'(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\ +) [\\.,]" 2 3)) "Alist that specifies how to match errors in perl output. See variable compilation-error-regexp-alist for more details.")

    ------------------------------------------------

    to

    ------------------------------------------------

    (defvar perl-compilation-error-regexp-alist ;; Contributed by Martin Jost '( ;; PERL 4 ("^[^\n]* in file \\([^ ]+\\) at line \\([0-9]+\\).*" 1 2) ;; PERL 5 Blubber at FILE line XY, <XY> line ab. ("^[^\n]* at \\([^ ]+\\) line \\([0-9]+\\)," 1 2) ;; PERL 5 Blubber at FILE line XY. ("^[^\n]* at \\([^ ]+\\) line \\([0-9]+\\)." 1 2) ) ;; This look like a paranoiac regexp: could anybody find a better one? (which WORK). ;;'(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\ +) [\\.,]" 2 3)) "Alist that specifies how to match errors in perl output. See variable compilation-error-regexp-alist for more details.")
    ------------------------------------------------

    fixes the problem in emacs 23! 8)

    (Plz note: the WHOLE error line gets underlined now)

    Cheers Rolf

    UPDATE: The former patch only works for perl-mode. This is a patch for cperl-mode.el Version 6.2

    (defvar cperl-compilation-error-regexp-alist-lanx-patch '( ;; PERL 4 ("^[^\n]* in file \\([^ ]+\\) at line \\([0-9]+\\).*" 1 2) ;; PERL 5 Blubber at FILE line XY, <XY> line ab. ("^[^\n]* at \\([^ ]+\\) line \\([0-9]+\\)," 1 2) ;; PERL 5 Blubber at FILE line XY. ("^[^\n]* at \\([^ ]+\\) line \\([0-9]+\\)." 1 2) ) "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)))