all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: LanX <lanx.perl@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: In emacs 23 compile-mode doesn't recognize (c)perl error messages
Date: Thu, 15 Oct 2009 07:44:25 -0700 (PDT)	[thread overview]
Message-ID: <07cda09c-bccd-4257-9162-c3c78a9daf75@m38g2000yqd.googlegroups.com> (raw)
In-Reply-To: slrnhddpm4.k80.nospam-abuse@chorin.math.berkeley.edu

Hi

> I tried to find a difference with what is incperl-mode.el, and
> failed.  Where is Waldo?

Oh...sorry!

 I'm very far from being a lisp expert and after 2 weeks of debugging
and quarreling with "emacs-experts" my system is cluttered with emacs
versions and config-files... and furthermore with all these
backslashes elisp-regexes are hard to read at a glance:

---------------
(defvar cperl-compilation-error-regexp-alist2
  ;; This look like a paranoiac regexp: could anybody find a better
one? (which WORKS).
  '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\)[ \n\t]+line \\([0-9]+\\)
[\\., \n]"
     2 3 nil 0)
   )
  "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-alist2)))
------------

"Waldo" is between "filename" and "at" because diagnostics tries to
fit the message into less then 80 characters.

And IMHO the variable needs to be renamed because of conflicts with
the patched version of cperl-mode which already uses the old variable
name.


My testsuite with  emacs22

---------------------------------
lanx@nc10-ubuntu:~$  emacs .emacs error.pl -f cperl-mode -l /home/
lanx/.emacs.d/debug/mode-compile.el -f mode-compile -eval "(describe-
variable 'compilation-error-regexp-alist)"

lanx@nc10-ubuntu:~$ emacs .emacs error.pl -f cperl-mode -l /home/
lanx/.emacs.d/debug/mode-compile.el -f mode-compile -eval "(describe-
variable 'compilation-error-regexp-alist)"
^C
lanx@nc10-ubuntu:~$ cat error.pl
use strict;
use diagnostics;

my $a=A;
my $a=B;
$b=B;
-----------------------------

here the corresponding code in diagnostics.pm which shortens the
errormessage:

----------------------------
lanx@nc10-ubuntu:~$ perldoc -m diagnostics |tail -15

sub shorten {
    my $line = $_[0];
    if (length($line) > 79 and index($line, "\n") == -1) {
	my $space_place = rindex($line, ' ', 79);
	if ($space_place != -1) {
	    substr($line, $space_place, 1) = "\n\t";
	}
    }
    return $line;
}
---------------------------------

Bye
  Rolf


  reply	other threads:[~2009-10-15 14:44 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30 23:36 In emacs 23 compile-mode doesn't recognize (c)perl error messages LanX
2009-10-01  0:21 ` LanX
2009-10-01  8:57   ` Peter Dyballa
     [not found]     ` <ec36f5050910010654s624f703dpea442d11c1b3e48d@mail.gmail.com>
2009-10-01 14:18       ` LanX
2009-10-01 18:01       ` Peter Dyballa
     [not found]         ` <ec36f5050910011149t13417c4ew7b87f0f7a530c385@mail.gmail.com>
     [not found]           ` <ec36f5050910011152l757db6awf5083c40837563ab@mail.gmail.com>
2009-10-01 19:42             ` Peter Dyballa
2009-10-01 20:01               ` LanX
     [not found]             ` <mailman.7873.1254426168.2239.help-gnu-emacs@gnu.org>
2009-10-01 20:45               ` Ilya Zakharevich
2009-10-01 23:25                 ` Peter Dyballa
     [not found]                 ` <mailman.7883.1254439549.2239.help-gnu-emacs@gnu.org>
2009-10-03  0:25                   ` LanX
2009-10-08 12:41                     ` LanX
2009-10-09  2:09                       ` LanX
2009-10-09  8:42                         ` Peter Dyballa
     [not found]                         ` <mailman.8389.1255077768.2239.help-gnu-emacs@gnu.org>
2009-10-09 12:56                           ` LanX
2009-10-09 13:58                             ` Peter Dyballa
2009-10-09 14:06                               ` LanX
2009-10-09 15:34                                 ` LanX
2009-10-09 22:15                   ` Ilya Zakharevich
2009-10-09 22:54                     ` Lennart Borgman
2009-10-10  8:22                     ` Peter Dyballa
     [not found]                     ` <mailman.8476.1255163312.2239.help-gnu-emacs@gnu.org>
2009-10-10 11:43                       ` LanX
     [not found]                     ` <mailman.8462.1255128901.2239.help-gnu-emacs@gnu.org>
2009-10-10  1:53                       ` LanX
2009-10-30  3:51                         ` Joseph Brenner
2009-10-30  6:04                           ` Stefan Monnier
2009-10-31  1:03                             ` Lennart Borgman
     [not found]                             ` <mailman.9761.1256951018.2239.help-gnu-emacs@gnu.org>
2009-11-03  2:01                               ` Joseph Brenner
2009-11-03  2:44                                 ` Lennart Borgman
2009-11-03  2:11                             ` Joseph Brenner
2009-11-03  2:48                               ` Lennart Borgman
2009-10-15  8:31                       ` Ilya Zakharevich
2009-10-15 16:17                         ` LanX
2009-10-15 23:05                           ` Ilya Zakharevich
2009-10-16  1:23                             ` LanX
2009-10-16 23:36                               ` Ilya Zakharevich
2009-10-17  0:31                                 ` LanX
2009-10-17  7:45                                   ` Ilya Zakharevich
2009-10-19 22:18                                     ` LanX
2009-10-24  6:05                                       ` Ilya Zakharevich
2009-10-24 12:55                                         ` LanX
2009-10-24 18:19                                           ` perl TeXinfo docs emacs Ilya Zakharevich
2009-10-24 19:37                                             ` LanX
2009-10-24 19:41                                               ` LanX
2009-10-25  1:57                                               ` Ilya Zakharevich
2009-10-25 20:28                                                 ` LanX
2009-10-17  2:00                                 ` In emacs 23 compile-mode doesn't recognize (c)perl error messages LanX
2009-10-17  7:48                                   ` Ilya Zakharevich
2009-10-19 22:03                                     ` LanX
2009-10-20 23:45                                       ` Ilya Zakharevich
2009-10-16 15:01                             ` LanX
2009-10-16 15:12                               ` LanX
2009-10-16 23:39                               ` Ilya Zakharevich
     [not found]       ` <mailman.7868.1254420309.2239.help-gnu-emacs@gnu.org>
2009-10-01 20:41         ` Ilya Zakharevich
2009-10-12 22:14 ` LanX
2009-10-13 19:18 ` LanX
2009-10-15  8:24   ` Ilya Zakharevich
2009-10-15  9:09   ` Ilya Zakharevich
2009-10-15 14:44     ` LanX [this message]
2009-10-15 15:52       ` LanX
2009-10-15 23:17         ` Ilya Zakharevich
2009-10-15 23:09       ` Ilya Zakharevich
2009-10-16  0:46         ` LanX

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

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

  git send-email \
    --in-reply-to=07cda09c-bccd-4257-9162-c3c78a9daf75@m38g2000yqd.googlegroups.com \
    --to=lanx.perl@googlemail.com \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.