procmail
[Top] [All Lists]

Re: Emacs TinyPm manual (Procmail mode & Lint features)

1997-11-07 09:40:04
| Fri 97-11-07 era eriksson <era(_at_)iki(_dot_)fi> list.procmail
|
|  >             :0[aAeE]f[hbHB][Dwi]c: LOCKFILE
|  >                |    | |     |   |
|  >                |    | |     |   (c)ontinue or (c)opy flag last.
|  >                |    | |     Other flags
|  >                |    | The header/body flags next
|  >                |    (f)ilter flag to the left, before hb
|  >                The 'process' flags first. Signify (A)ND or (e)rror
|  >                receipe.
|  > What flag order would be better than this? 
| 
| Any one the user feels comfortable with. I wish you'd at least make
| this check optional, and even disabled by default. 

The flag order checking is only used if 'pedantic is set. You don't
get the warnings if you supply prefix arg to Lint

;;      Quick reference
;;
;;      o   M-x `tipm-mode' activates Procmail writing mode
;;      o           C-c ' L  to Lint whole buffer interactively
;;      o   C-u     C-c ' L  to Lint whole buffer and gathers info.
;;      o   C-u C-u C-c ' L, same as above, but be less pedantic.
;;

| 
| FWIW, you have left out r and W from this list entirely.

The 'W' was typo, but 'r' was missing. Thank you.

| If you have to enforce an order, make it configurable, and make one of
| the built-in user-selectable configurations the same order you get
| when you say procmail -h

I claim that the order above makes more sense than the procmail -h:

        HBDAaEehbficwrW

I put the biggest priority to the aAeE flags because they are
"dependency flags" and affect the whole recipe immediately, before
anything else.  Also, if the recipe filter something, the 'f' should
definitely be far left, because we humans read from left to right.

        aAeE    priority 1      Only one a or e (capital or not) is used
                                at a time
        f       priority 2
        hb      priority 3      h and/or b ("header" comes before "body")
        ..rest..
        c       Would be best to be at the end

The rest are negotiable. I insist to have at least these in this order 
for the Lint. Any votes for the de facto order?

| Does your lint grok this?
| 
|     FLAGS=BDi
| 
|     :0 $FLAGS
|     * condition
|     | filter

In fact it didn't notice this at all...Fixed in 1.50. The Lint does not
know anything about contents of the variables. Here it says:

*** 1997-11-07 17:51 (*scratch*) tinypm.el 1.50
*scratch*:002: Warning, no right hand variable found. ([$"`'] .. missing)
*scratch*:005: info, Flag variable `$FLAGS' was not checked.

Warning is issued, because variables must be assigned with

        FLAGS = "BDi"

to catch potential errors like this ( dollar is missing here)

        FLAGS = ANOTHER_VARIABLE

And no...this checking is not configurable: double quotes are required.

jari