[Top][All Lists]

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

Re: compile perl file, specify current buffer, using help effectively

From: Kevin Rodgers
Subject: Re: compile perl file, specify current buffer, using help effectively
Date: Wed, 03 May 2006 11:04:46 -0600
User-agent: Thunderbird (Windows/20060308)

David Hansen wrote:
On Tue, 2 May 2006 22:04:56 -0400 David Schneider wrote:
I am trying to use emacs as an IDE for perl development.  I think it
would be useful to have a compile command that runs perl on the
current buffer I am editing.  The compile command defaults to make -k.
I want to change it to perl xx where xx is the name of the current
buffer - is there some variable or special syntax I can use to get the
current filename?  More important then the answer, is how do I figure
this out from the help.  I have been using C-h a to try to search the
help.  This gives me lists of commands or variables which may be
related - but I frequently find my questions are still unanswered.

`C-h a' is for commands.  `C-h f' is for functions.  `C-h v' is for

`C-h v compile-command' has a C mode example that David has converted
to Perl mode for you:

Not tested:

(add-hook 'perl-mode-hook
          (lambda ()
            (set (make-local-variable 'compile-command)
                 (concat "perl -w " (buffer-file-name)))))

Anyway i doub't that the compile mode will recognize the
perl errors and warnings.

See compilation-error-regexp-alist:

    ;; Perl -w:
    ;; syntax error at automake line 922, near "':'"
    ;; Perl debugging traces
    ;; store::odrecall('File_A', 'x2') called at line 90
    (".* at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 1 2)


reply via email to

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