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

14 views
Skip to first unread message

LanX

unread,
Oct 1, 2009, 3:00:28 PM10/1/09
to emacs-perl-intersection
Hi guys

Does one of you already use emacs23 and does mode-compile parse and  highlight errorlines in the compilation buffer after M-x mode-compile from a perl-buffer?

I discribed a little testcase in the following to isolate the problem. It's a crosspost from gnu.emacs.help.

Cheers
  Rolf

---------- Forwarded message ----------
From: LanX <lanx...@googlemail.com>
Date: 2009/10/1
Subject: Re: In emacs 23 compile-mode doesn't recognize (c)perl error messages
To: help-gn...@gnu.org


(This is a fwd to the mailinglist)


Well,did you try it out?

I've spend hours to isolate the problem without any success!

Starting emacs23 with

> emacs-snapshot -debug-init -no-site-file  tst.pl &

doesn't work, while taking emacs22 instead, does highlight the bugs after calling "M-x mode-compile"!

The config .emacs links to debug.el which only (auto)loads the newest versions of mode-compile and cperl-mode.

--------------------------------
lanx@nc10-ubuntu:~$ ll .emacs
lrwxrwxrwx 1 lanx lanx 23 2009-10-01 15:28 .emacs -> .emacs.d/debug/debug.el
lanx@nc10-ubuntu:~$ cat .emacs


(message "loading debug.el")

;--------------------
;        load-path
;--------------------
(normal-top-level-add-to-load-path
 '("~/.emacs.d/debug"))


;--------------------
;    cperl-mode
;--------------------

(load "~/.emacs.d/debug/cperl-mode.el")


;--------------------
;    mode-compile
;--------------------

(autoload 'mode-compile "mode-compile"
  "Command to compile current buffer file based on the major mode" t)

(add-to-list 'auto-mode-alist '("\\.pl\\'" . cperl-mode))




(message "leaving debug.el")lanx@nc10-ubuntu:~$
lanx@nc10-ubuntu:~$ ll .emacs.d/debug/
insgesamt 588
-r-------- 1 lanx lanx 402932 2009-10-01 15:16 cperl-mode.el
-rw-r--r-- 1 lanx lanx    520 2009-10-01 15:22 debug.el
-rw-r--r-- 1 lanx lanx 101476 2009-06-04 14:46 mode-compile.el
-rw-r--r-- 1 lanx lanx  74288 2009-10-01 13:58 mode-compile.elc
lanx@nc10-ubuntu:~$
--------------------------------


mode-compiling a bash file works without problems.





BTW: deleting .emacs and starting with

> emacs-snapshot -debug-init -no-site-file  tst.pl &

leads to a buffer *Local Variables* with the Message
--------------------------------
The local variables list in mode-compile.el
contains values that may not be safe (*).

Do you want to apply it?  You can type
y  -- to apply the local variables list.
n  -- to ignore the local variables list.
!  -- to apply the local variables list, and permanently mark these
      values (*) as safe (in the future, they will be set automatically.)

    outline-regexp : ";; @+"
  * eval : (outline-minor-mode 1)
------------------------------------

But no matter which option I chose the problem remains!



So what am I supposed to try now???


Please note: This is specific to cperl-mode and perl-mode. Bash and python-files compile as expected.



2009/10/1 Peter Dyballa <Peter_...@web.de>


Am 01.10.2009 um 02:21 schrieb LanX:

The emacs 23 is a snapshot installation  parallel to my "normal" emacs
22, does this lead to conflicts?


No. Check load-path. Maybe re-organise the init files.

--
Greetings

 Pete

Indentation?! I will show you how to indent when I indent your skull!




Joe Brenner

unread,
Oct 1, 2009, 4:33:12 PM10/1/09
to LanX, emacs-perl-intersection

Myself, I never got into using mode-compile.el. (The perlnow.el
libary that I wrote handles this kind of thing, and covers a few more
perl-specific things than mode-compile does).

Is your question specifically about some kind of color highlighting
in the compilation buffer, or is it about just getting a listing of
errors?

If you don't get a listing of errors, what *does* appear in the
compilation buffer? Do you get any output at all?

LanX

unread,
Oct 1, 2009, 4:51:25 PM10/1/09
to emacs-perl-intersection
will I ever learn to hit the reply-all button? ;-)

---------- Forwarded message ----------

you never used it?

I get the normal output of running perl in an extra buffer.

Cperl-mode passes regexes to compile-mode  to prperly parse error and warning messages. They are highlighted. You can click on them to jump to the sourceline causing the error or you can jump by keybinding from error to error.

No problem with gnu 22 but gnu 23 only shows the output and claims there are no errors.

actually it's the same problem with proper perl-mode, but sh and python don't have this problem.

Just need an independent confirmation before sending a bug-report.

Crossposts:
http://perlmonks.org/?node_id=798725
http://groups.google.de/group/gnu.emacs.help/browse_thread/thread/c1a62e304177fefe#

I think I could patch that manually by reconfiguring the parsing-regexes but I think  good bug report is always valuable.


2009/10/1 Joe Brenner <do...@kzsu.stanford.edu>

Joe Brenner

unread,
Oct 1, 2009, 7:37:40 PM10/1/09
to emacs-perl-...@googlegroups.com, LanX

LanX <lanx...@googlemail.com> wrote:

> you never used it?

Not much, though I have it installed. I don't need it for perl stuff,
and haven't yet gotten into the habit of using it for non-perl stuff.

This Works For Me:

emacs -Q -l /usr/local/share/emacs/site-lisp/mode-compile.el ~/bin/some_perl_script
ESC-x mode-compile <RET>
<RET>

But then, just running "ESC-x compile" also Works For Me (after manually
changing the run string from that idiotic "make -k" guess to
"perl /home/doom/bin/some_perl_script").

I'm running a cvs build of emacs from july 8th, 2009 (and it's about
time I pulled another...):

GNU Emacs 23.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.1) of 2009-07-08 on fineline

The version of mode-compile.el I have is "2.28".

> I get the normal output of running perl in an extra buffer.

Right, exactly.

> Cperl-mode passes regexes to compile-mode to properly parse error and


> warning messages. They are highlighted. You can click on them to jump to the
> sourceline causing the error or you can jump by keybinding from error to
> error.

Yes, got it. I would call them "active" myself. Talking about
"highlighting" makes it sound like a complaint about the display,
not whether you can use the "next-error" command.

> No problem with gnu 22 but gnu 23 only shows the output and claims there are
> no errors.

Um... do you mean "no warnings"? (If there were errors, you wouldn't
get any output, right?)

If you don't see the warnings at all, then it's not a problem with
whether mode-compile or compile can parse them.


LanX <lanx...@googlemail.com> wrote:

> you never used it?
>
> I get the normal output of running perl in an extra buffer.
>
> Cperl-mode passes regexes to compile-mode to prperly parse error and
> warning messages. They are highlighted. You can click on them to jump to the
> sourceline causing the error or you can jump by keybinding from error to
> error.
>
> No problem with gnu 22 but gnu 23 only shows the output and claims there are
> no errors.
>
> actually it's the same problem with proper perl-mode, but sh and python
> don't have this problem.
>
> Just need an independent confirmation before sending a bug-report.
>
> Crossposts:
> http://perlmonks.org/?node_id=798725
> http://groups.google.de/group/gnu.emacs.help/browse_thread/thread/c1a62e304177fefe#
>
> I think I could patch that manually by reconfiguring the parsing-regexes but
> I think good bug report is always valuable.
>
>
> 2009/10/1 Joe Brenner <do...@kzsu.stanford.edu>
>
> >

> --00504502cc18fc60e30474e5c9b2
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
>
> you never used it?<br><br>
> I get the normal output of running perl in an extra buffer. <br>
> <br>Cperl-mode passes regexes to compile-mode=A0 to prperly parse error and=
> warning messages. They are highlighted. You can click on them to jump to t=
> he sourceline causing the error or you can jump by keybinding from error to=
> error.<br>
> <br>No problem with gnu 22 but gnu 23 only shows the output and claims ther=
> e are no errors.<br><br>actually it&#39;s the same problem with proper perl=
> -mode, but sh and python don&#39;t have this problem.<br><br>Just need an i=
> ndependent confirmation before sending a bug-report.<br>
> <br>Crossposts:<br><a href=3D"http://perlmonks.org/?node_id=3D798725">http:=
> //perlmonks.org/?node_id=3D798725</a><br><a href=3D"http://groups.google.de=
> /group/gnu.emacs.help/browse_thread/thread/c1a62e304177fefe#">http://groups=
> .google.de/group/gnu.emacs.help/browse_thread/thread/c1a62e304177fefe#</a><=
> br>
> <br>I think I could patch that manually by reconfiguring the parsing-regexe=
> s but I think=A0 good bug report is always valuable. <br><br><br><div class=
> =3D"gmail_quote">2009/10/1 Joe Brenner <span dir=3D"ltr">&lt;<a href=3D"mai=
> lto:do...@kzsu.stanford.edu">do...@kzsu.stanford.edu</a>&gt;</span><br>
> <blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
> 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
> Myself, I never got into using mode-compile.el. =A0(The perlnow.el<br>
> libary that I wrote handles this kind of thing, and covers a few more<br>
> perl-specific things than mode-compile does).<br>
> <br>
> Is your question specifically about some kind of color highlighting<br>
> in the compilation buffer, or is it about just getting a listing of<br>
> errors?<br>
> <br>
> If you don&#39;t get a listing of errors, what *does* appear in the<br>
> compilation buffer? =A0Do you get any output at all?<br>
> <div><div></div><div class=3D"h5"><br>
> <br>
> LanX &lt;<a href=3D"mailto:lanx...@googlemail.com">lanx.perl@googlemail.c=
> om</a>&gt; wrote:<br>
> <br>
> &gt; Hi guys<br>
> &gt;<br>
> &gt; Does one of you already use emacs23 and does mode-compile parse and<br=
> >
> &gt; highlight errorlines in the compilation buffer after M-x mode-compile =
> from a<br>
> &gt; perl-buffer?<br>
> &gt;<br>
> &gt; I discribed a little testcase in the following to isolate the problem.=
> It&#39;s<br>
> &gt; a crosspost from gnu.emacs.help.<br>
> &gt;<br>
> &gt; Cheers<br>
> &gt; =A0 Rolf<br>
> &gt;<br>
> &gt; ---------- Forwarded message ----------<br>
> &gt; From: LanX &lt;<a href=3D"mailto:lanx...@googlemail.com">lanx.perl@g=
> ooglemail.com</a>&gt;<br>
> &gt; Date: 2009/10/1<br>
> &gt; Subject: Re: In emacs 23 compile-mode doesn&#39;t recognize (c)perl er=
> ror<br>
> &gt; messages<br>
> &gt; To: <a href=3D"mailto:help-gn...@gnu.org">help-gn...@gnu.org</=
> a><br>
> &gt;<br>
> &gt;<br>
> &gt; (This is a fwd to the mailinglist)<br>
> &gt;<br>
> &gt;<br>
> &gt; Well,did you try it out?<br>
> &gt;<br>
> &gt; I&#39;ve spend hours to isolate the problem without any success!<br>
> &gt;<br>
> &gt; Starting emacs23 with<br>
> &gt;<br>
> &gt; &gt; emacs-snapshot -debug-init -no-site-file =A0tst.pl &amp;<br>
> &gt;<br>
> &gt; doesn&#39;t work, while taking emacs22 instead, does highlight the bug=
> s after<br>
> &gt; calling &quot;M-x mode-compile&quot;!<br>
> &gt;<br>
> &gt; The config .emacs links to debug.el which only (auto)loads the newest<=
> br>
> &gt; versions of mode-compile and cperl-mode.<br>
> &gt;<br>
> &gt; --------------------------------<br>
> &gt; lanx@nc10-ubuntu:~$ ll .emacs<br>
> &gt; lrwxrwxrwx 1 lanx lanx 23 2009-10-01 15:28 .emacs -&gt; .emacs.d/debug=
> /debug.el<br>
> &gt; lanx@nc10-ubuntu:~$ cat .emacs<br>
> &gt;<br>
> &gt;<br>
> &gt; (message &quot;loading debug.el&quot;)<br>
> &gt;<br>
> &gt; ;--------------------<br>
> &gt; ; =A0 =A0 =A0 =A0load-path<br>
> &gt; ;--------------------<br>
> &gt; (normal-top-level-add-to-load-path<br>
> &gt; =A0&#39;(&quot;~/.emacs.d/debug&quot;))<br>
> &gt;<br>
> &gt;<br>
> &gt; ;--------------------<br>
> &gt; ; =A0 =A0cperl-mode<br>
> &gt; ;--------------------<br>
> &gt;<br>
> &gt; (load &quot;~/.emacs.d/debug/cperl-mode.el&quot;)<br>
> &gt;<br>
> &gt;<br>
> &gt; ;--------------------<br>
> &gt; ; =A0 =A0mode-compile<br>
> &gt; ;--------------------<br>
> &gt;<br>
> &gt; (autoload &#39;mode-compile &quot;mode-compile&quot;<br>
> &gt; =A0 &quot;Command to compile current buffer file based on the major mo=
> de&quot; t)<br>
> &gt;<br>
> &gt; (add-to-list &#39;auto-mode-alist &#39;(&quot;\\.pl\\&#39;&quot; . cpe=
> rl-mode))<br>
> &gt;<br>
> &gt;<br>
> &gt;<br>
> &gt;<br>
> &gt; (message &quot;leaving debug.el&quot;)lanx@nc10-ubuntu:~$<br>
> &gt; lanx@nc10-ubuntu:~$ ll .emacs.d/debug/<br>
> &gt; insgesamt 588<br>
> &gt; -r-------- 1 lanx lanx 402932 2009-10-01 15:16 cperl-mode.el<br>
> &gt; -rw-r--r-- 1 lanx lanx =A0 =A0520 2009-10-01 15:22 debug.el<br>
> &gt; -rw-r--r-- 1 lanx lanx 101476 2009-06-04 14:46 mode-compile.el<br>
> &gt; -rw-r--r-- 1 lanx lanx =A074288 2009-10-01 13:58 mode-compile.elc<br>
> &gt; lanx@nc10-ubuntu:~$<br>
> &gt; --------------------------------<br>
> &gt;<br>
> &gt;<br>
> &gt; mode-compiling a bash file works without problems.<br>
> &gt;<br>
> &gt;<br>
> &gt;<br>
> &gt;<br>
> &gt;<br>
> &gt; BTW: deleting .emacs and starting with<br>
> &gt;<br>
> &gt; &gt; emacs-snapshot -debug-init -no-site-file =A0tst.pl &amp;<br>
> &gt;<br>
> &gt; leads to a buffer *Local Variables* with the Message<br>
> &gt; --------------------------------<br>
> &gt; The local variables list in mode-compile.el<br>
> &gt; contains values that may not be safe (*).<br>
> &gt;<br>
> &gt; Do you want to apply it? =A0You can type<br>
> &gt; y =A0-- to apply the local variables list.<br>
> &gt; n =A0-- to ignore the local variables list.<br>
> &gt; ! =A0-- to apply the local variables list, and permanently mark these<=
> br>
> &gt; =A0 =A0 =A0 values (*) as safe (in the future, they will be set automa=
> tically.)<br>
> &gt;<br>
> &gt; =A0 =A0 outline-regexp : &quot;;; @+&quot;<br>
> &gt; =A0 * eval : (outline-minor-mode 1)<br>
> &gt; ------------------------------------<br>
> &gt;<br>
> &gt; But no matter which option I chose the problem remains!<br>
> &gt;<br>
> &gt;<br>
> &gt;<br>
> &gt; So what am I supposed to try now???<br>
> &gt;<br>
> &gt;<br>
> &gt; Please note: This is specific to cperl-mode and perl-mode. Bash and<br=
> >
> &gt; python-files compile as expected.<br>
> &gt;<br>
> &gt;<br>
> &gt; 2009/10/1 Peter Dyballa &lt;<a href=3D"mailto:Peter_...@web.de">Pe=
> ter_D...@web.de</a>&gt;<br>
> &gt;<br>
> &gt;<br>
> &gt; &gt; Am 01.10.2009 um 02:21 schrieb LanX:<br>
> &gt; &gt;<br>
> &gt; &gt; =A0The emacs 23 is a snapshot installation =A0parallel to my &quo=
> t;normal&quot; emacs<br>
> &gt; &gt;&gt; 22, does this lead to conflicts?<br>
> &gt; &gt;<br>
> &gt; &gt; No. Check load-path. Maybe re-organise the init files.<br>
> </div></div></blockquote></div><br>
>
> --00504502cc18fc60e30474e5c9b2--

LanX

unread,
Oct 1, 2009, 9:29:15 PM10/1/09
to emacs-perl-...@googlegroups.com
Hi


> > No problem with gnu 22 but gnu 23 only shows the output and claims there are
> > no errors.

> Um... do you mean "no warnings"?  (If there were errors, you wouldn't
> get any output, right?)

> If you don't see the warnings at all, then it's not a problem with
> whether mode-compile or compile can parse them.

Sorry my English. What I meant was that *perl* error-lines get
"activated". Jumping to "next-error" isn't possible because emacs says
there are no errors.

(of course I ran a pseudo perl file to provoke errors)

So you say it works for you? Strange! I'm really only loading
mode-compile.el and nothing more.

I have GNU Emacs 23.1.50.1 and  mode-compile.el Version: 2.29.
(no wait the header says 2.29 but the variable mode-compile-version is 2.28 ?!?)

Which cperl-mode-version are you running?

Thanks for the help

Cheers
  Rolf

Joe Brenner

unread,
Oct 2, 2009, 12:12:44 AM10/2/09
to LanX, emacs-perl-...@googlegroups.com

LanX <lanx...@googlemail.com> wrote:

> So you say it works for you? Strange! I'm really only loading
> mode-compile.el and nothing more.

Same with me, as I showed you. I started a new emacs without any of my
usual customizations.

> I have GNU Emacs 23.1.50.1 and mode-compile.el Version: 2.29.
> (no wait the header says 2.29 but the variable mode-compile-version is 2.28
> ?!?)

Could it be that you have more than one copy kicking around? You might
be running a different file than you think you are.

I only have one copy myself ("locate mode-compile.el" turns up just one
hit). I looked at the variable definition inside the source to
determine it was 2.28.

> Which cperl-mode-version are you running?

I'm just using what ships with Gnu emacs:

cperl-version is a variable defined in `cperl-mode.el'.
Its value is "5.23"

Documentation:
Version of IZ-supported CPerl package this file is based on.

LanX

unread,
Oct 8, 2009, 8:57:35 AM10/8/09
to Joe Brenner, emacs-perl-...@googlegroups.com
Hi Joe

Could it be that you have more than one copy kicking around?  You might
be running a different file than you think you are.

no, I moved all other copys of mode-compile far away and even added some debug messages into the copy to be loaded to be sure.

 
I only have one copy myself ("locate mode-compile.el" turns up just one
hit).  I looked at the variable definition inside the source to
determine it was 2.28.

Well in my copy  is from the official webpage but quite  schizophrenic:


lanx@nc10-ubuntu:~$ grep -i version .emacs.d/debug/mode-compile.el
;;   Version: 2.29
;; Software Foundation;    either version 2,   or (at  your option)  any later
;; version.
(defconst mode-compile-version "2.28"
  "Current version of mode-compile package.
(defconst mc--lucid-emacs-p (or (string-match "Lucid"  emacs-version)
                                (string-match "XEmacs" emacs-version)))
    (concat "mode-compile " mode-compile-version)


 cperl-version is a variable defined in `cperl-mode.el'.
 Its value is "5.23"

 Documentation:
 Version of IZ-supported CPerl package this file is based on.


I'm running the newest, anyway the same problem arises with perl-mode.

I did some new (de-)installation as described on gnu.emacs.help without success 8(

http://groups.google.de/group/gnu.emacs.help/browse_thread/thread/c1a62e304177fefe/0767c0080f1a3208#0767c0080f1a3208


Plz let's continue the discussion there, updating two boards is a lot of work.


Reply all
Reply to author
Forward
0 new messages