unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kevin Ryde <user42@zip.com.au>
To: emacs-devel@gnu.org
Subject: perl compilation error regexp [patch]
Date: Sat, 29 Dec 2007 11:09:40 +1100	[thread overview]
Message-ID: <87zlvufjjv.fsf@blah.blah> (raw)

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]

Perl can add a "during global destruction" to its error message output
in certain circumstances, eg. foo.pl below

	(in cleanup) something bad at foo.pl line 3 during global destruction.

It'd be nice for compilation-mode to recognise that:

2007-12-28  Kevin Ryde  <user42@zip.com.au>

	* progmodes/compile.el (compilation-error-regexp-alist-alist): For
	perl, allow "during global destruction" at end.  This comes out under
	"use warnings" in recent perl when breaking circular references during
	program or thread exit.

	* compilation.txt (perl): Add a "during global destruction" sample.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: foo.pl --]
[-- Type: text/x-perl, Size: 111 bytes --]

#!/usr/bin/perl
use warnings;
sub DESTROY { die "something bad"; }
my $x; $x = bless {x=>\$x}, 'main';
exit 0;

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: compile.el.perl-glob.diff --]
[-- Type: text/x-diff, Size: 532 bytes --]

*** compile.el	29 Dec 2007 10:35:49 +1100	1.448
--- compile.el	29 Dec 2007 10:36:06 +1100	
***************
*** 281,287 ****
       3 1 2)
  
      (perl
!      " at \\([^ \n]+\\) line \\([0-9]+\\)\\(?:[,.]\\|$\\)" 1 2)
  
      (rxp
       "^\\(?:Error\\|Warnin\\(g\\)\\):.*\n.* line \\([0-9]+\\) char\
--- 281,287 ----
       3 1 2)
  
      (perl
!      " at \\([^ \n]+\\) line \\([0-9]+\\)\\(?:[,.]\\|$\\| during global destruction\\.$\\)" 1 2)
  
      (rxp
       "^\\(?:Error\\|Warnin\\(g\\)\\):.*\n.* line \\([0-9]+\\) char\

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: compilation.txt.perl-glob.diff --]
[-- Type: text/x-diff, Size: 374 bytes --]

*** compilation.txt	29 Dec 2007 10:41:30 +1100	1.17
--- compilation.txt	29 Dec 2007 10:49:59 +1100	
***************
*** 287,292 ****
--- 287,293 ----
  syntax error at automake line 922, near "':'"
  Died at test.pl line 27.
  store::odrecall('File_A', 'x2') called at store.pm line 90
+ 	(in cleanup) something bad at foo.pl line 3 during global destruction.
  
  
  * RXP

[-- Attachment #5: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

             reply	other threads:[~2007-12-29  0:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-29  0:09 Kevin Ryde [this message]
2007-12-29 17:47 ` perl compilation error regexp [patch] Richard Stallman
2008-01-08  7:54   ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zlvufjjv.fsf@blah.blah \
    --to=user42@zip.com.au \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).