Hi,
When I started making the Emacs Procmail lint and programming
mode I didn't realize that many of the people here probably can't
access the tinypm.el for variaous of reasons: Usually because
people don't knwo how to use and install packages to Emacs
I admit, It's darn complex and must scare out lot of potential
Emacs lovers. VI is still the king to many people.
I adjusted the tinypm.el (now v1.58) package to work from
Emacs batch mode, so that It dosn't require user to open up
Emacs at all. In addition I added simple procmail rule to my
.procmailrc to answer to Lint requests. So if you want to check
your code, any code, with the Lint parser; you can
do it now. Send message
To: jari(_dot_)aalto(_at_)poboxes(_dot_)com
subject: pm-lint
BODY-CONTAINS-ONLY-VALID-PROCMAIL-CODE-TO-LINT
Do not add any sigs to the message; just the plain procmail
code that you would use. The server responds automatically back
with message similar to below.
o It's possible that the Emacs
dies to error message in the parser and you won't receive
the results, so be prepared to that too. The TinyPm is not
necessary buf free yet.
o The line numbers refered to may be off by 1-5, so look
around the line where lint points an error.
o Please let me know how the Lint performs to your code and what
should I improve.
jari
[example of the Lint service response]
To: jari(_dot_)aalto(_at_)poboxes(_dot_)com
Subject: Re: pm-lint
X-Pm-lint: results
Precedende: bulk
*** 1997-11-12 17:33 (pm.lint) tinypm.el 1.57
cd /users/jaalto/junk/
pm.lint:004: Warning, message dropped to folder, you need lock.
pm.lint:007: Warning, recipe with "|" may need `w' flag. (recommended)
000001
000002 # Put mail into backup directory, but continue9
000003 :0 c
000004 backup
000005
000006 # Keep only last 3 emails received in backup, and continue
000007 :0 ic
000008 | cd backup && rm -f dummy `ls -t msg.* | sed -e 1,3d`
000009
[excerpted from tinypm.el]
Lint: batch mode from command line
You can also lint the procmail files from command line prompt
like this. (You must have Emacs 1.30+ which has working -eval)
% emacs -batch -q -eval \
'(progn (load "cl") (push "~/elisp" load-path) \
(load "tinypm" ) \
(find-file "~/pm/pm-test.rc") \
(tipm-lint-buffer-batch) \
) '
Change the filename "~/pm/pm-test.rc" to the file being linted.
The Lint output will appear in file `tipm-:lint-output-file' which
is ~/pm-lint.out by default. Below you see a shell script fort his
same command line command. Rip code with ti::m-pkg-rip-magic