procmail
[Top] [All Lists]

Re: Emacs and Linting procmail code with tinypm.el v1.21

1997-10-23 08:22:14
jari(_dot_)aalto(_at_)poboxes(_dot_)com writes:
...
       I need your advice how for the following list questions.
       A sample receipe definition is below.

               :0 flags
               * condition
               | action

o       What does lonely "f" flag mean. Shouldn't it be better to force
       to say if h and/or b is wanted?

The default is to feed the entire message into the filter, the same as
if both the 'h' and 'b' were given.  I think it's reasonable for lint
to require certain certain otherwise unnecessary code mannerisms so
that it can detect intension vs forgetfulness, so I would suggest that
your lint give a warning unless the 'h' or 'b' flags or both were
supplied.  That way if someone really does want to feed the entire message
into the filter they can profess so by saying "fhb".


o       Is it possible to suggest w or W flag by looking at the action
       line? Right now anything that looks like ">" to put something into
       the file triggers suggesting "w" flag.

I would suggest that almost every | action should have the 'w' flag.
Perhaps someone would tell your lint not to complain about this by prefacing
the recipe with:
        # ignore exit code

or something like that to indicate that they know that they're ignoring
the exit code of the action.  Didn't the C lint let you turn off
specific warnings using comments before the problematical code?


o       If formail -D is used; should it always have W flag? 

I _think_ that if formail -D is the action (not a condition), then the
'W' flag is sensically required.


o       Can Lint suggest "i" flag for receipe? Now, if there is no formail
       in the action line and "f" is used, then "i" is also suggested. Is this
       correct? Like below.

               :0 fbw
               * ^Content-Transfer-Encoding: *quoted-printable
               | mimencode -u -q

Hmm, I think a filter should almost never have the 'i' flag.  The above
recipe certainly shouldn't.


Philip Guenther