<<< Date Index >>>     <<< Thread Index >>>

Re: Using send-hook to remove a header



 On Friday, August 26, 2005 at 12:53:40 PM +0200, Alain Bench wrote:

> use the ~l pattern for "message is addressed to a known mailing list"?
> But note the <F1> lies: It matches *only* subscribed lists. And even
> patch-1.4-me.lists.1 doesn't help. Is that a bug in doc or in code?

    From my own usage pattern of ~l, I believe it to be a bug in code
that should be corrected to match documentation and to match all known
lists. The attached patch ab.tilde_l_matches_known_lists.1 does just
that. It is an independant complement of me.lists.1.


Bye!    Alain.
-- 
When you want to reply to a mailing list, please avoid doing so from a
digest. This often builds incorrect references and breaks threads.
ab.tilde_l_matches_known_lists.1
Pattern ~l matches known lists as documented.


diff -prud mutt-1.4/pattern.c mutt-1.4.mod/pattern.c
--- mutt-1.4/pattern.c  Sat May 18 07:39:18 2002
+++ mutt-1.4.mod/pattern.c      Sat Aug 27 21:08:39 2005
@@ -1034,7 +1034,7 @@ mutt_pattern_exec (struct pattern_t *pat
       return (pat->not ^ match_adrlist (pat->rx, flags & M_MATCH_FULL_ADDRESS,
                                        pat->alladdr, 2, h->env->to, 
h->env->cc));
     case M_LIST:
-      return (pat->not ^ mutt_is_list_recipient (pat->alladdr, h->env->to, 
h->env->cc));
+      return (pat->not ^ mutt_is_list_cc (pat->alladdr, h->env->to, 
h->env->cc));
     case M_PERSONAL_RECIP:
       return (pat->not ^ match_user (pat->alladdr, h->env->to, h->env->cc));
     case M_PERSONAL_FROM:
--- mutt/PATCHES        Tue Nov  6 19:59:33 2001
+++ mutt/PATCHES        Tue Nov  6 19:59:42 2001
@@ -1,0 +1 @@
+patch-1.4.ab.tilde_l_matches_known_lists.1
ab.tilde_l_matches_known_lists.1
Pattern ~l matches known lists as documented.


diff -prud mutt-1.5.10/pattern.c mutt-1.5.10.mod/pattern.c
--- mutt-1.5.10/pattern.c       Tue Jul 26 18:39:44 2005
+++ mutt-1.5.10.mod/pattern.c   Sat Aug 27 20:18:59 2005
@@ -1026,7 +1026,7 @@ mutt_pattern_exec (struct pattern_t *pat
            return (pat->not ^ (h->env && match_adrlist (pat->rx, flags & 
M_MATCH_FULL_ADDRESS,
                                        pat->alladdr, 2, h->env->to, 
h->env->cc)));
     case M_LIST:
-      return (pat->not ^ (h->env && mutt_is_list_recipient (pat->alladdr, 
h->env->to, h->env->cc)));
+      return (pat->not ^ (h->env && mutt_is_list_cc (pat->alladdr, h->env->to, 
h->env->cc)));
     case M_PERSONAL_RECIP:
       return (pat->not ^ (h->env && match_user (pat->alladdr, h->env->to, 
h->env->cc)));
     case M_PERSONAL_FROM:
--- mutt/PATCHES        Tue Nov  6 19:59:33 2001
+++ mutt/PATCHES        Tue Nov  6 19:59:42 2001
@@ -1,0 +1 @@
+patch-1.5.10.ab.tilde_l_matches_known_lists.1