From fd958ee8a2c85e3cc5c2f45a426ef4b724191f57 Mon Sep 17 00:00:00 2001 From: pdmef Date: Mon, 29 Aug 2005 05:35:45 +0000 Subject: [PATCH] Rocco Rutte: - in addition to now having 'A'/' ' for multipart msgs in $index_format, add ~M pattern for these (maybe counters still to add, i.e. to match msgs with e.g. 3-5 parts?) git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@467 e385b8ad-14ed-0310-8656-cc95a2468c6d --- VERSION.svn | 2 +- doc/manual.sgml.head | 1 + doc/manual.txt | 5 +++-- mutt.h | 3 ++- pattern.c | 4 ++++ 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/VERSION.svn b/VERSION.svn index f27d46f..5873851 100644 --- a/VERSION.svn +++ b/VERSION.svn @@ -1 +1 @@ -466 +467 diff --git a/doc/manual.sgml.head b/doc/manual.sgml.head index cbc9700..1173666 100644 --- a/doc/manual.sgml.head +++ b/doc/manual.sgml.head @@ -4756,6 +4756,7 @@ of the file ``˜/run2.dat''. ~L EXPR message is either originated or received by EXPR ~l message is addressed to a known mailing list ~m [MIN]-[MAX] message in the range MIN to MAX *) +~M multipart messages ~n [MIN]-[MAX] messages with a score in the range MIN to MAX *) ~N new messages ~O old messages diff --git a/doc/manual.txt b/doc/manual.txt index ec54e0b..07c1a46 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -4,7 +4,7 @@ by Andreas Krennmair and others originally based on _m_u_t_t by Michael Elkins and others - version devel-r462 + version devel-r465 AAbbssttrraacctt @@ -4250,6 +4250,7 @@ ~L EXPR message is either originated or received by EXPR ~l message is addressed to a known mailing list ~m [MIN]-[MAX] message in the range MIN to MAX *) + ~M multipart messages ~n [MIN]-[MAX] messages with a score in the range MIN to MAX *) ~N new messages ~O old messages @@ -6592,7 +6593,7 @@ Type: system property - Value: 462 + Value: 465 _T_h_i_s _i_s _a _r_e_a_d_-_o_n_l_y _s_y_s_t_e_m _p_r_o_p_e_r_t_y _a_n_d _s_p_e_c_i_f_i_e_s _m_u_t_t_n_g_'_s _s_u_b_v_e_r_s_i_o_n _r_e_v_i_s_i_o_n _s_t_r_i_n_g_. diff --git a/mutt.h b/mutt.h index 3af6c90..8394be2 100644 --- a/mutt.h +++ b/mutt.h @@ -167,7 +167,6 @@ enum { M_LIMIT, M_EXPIRED, M_SUPERSEDED, - M_REALNAME, /* actions for mutt_pattern_comp/mutt_pattern_exec */ M_AND, @@ -204,6 +203,8 @@ enum { #ifdef USE_NNTP M_NEWSGROUPS, #endif + M_REALNAME, + M_MULTIPART, /* Options for Mailcap lookup */ M_EDIT, diff --git a/pattern.c b/pattern.c index ec46dca..84e2cea 100644 --- a/pattern.c +++ b/pattern.c @@ -20,6 +20,7 @@ #include "mapping.h" #include "keymap.h" #include "copy.h" +#include "mime.h" #include "lib/mem.h" #include "lib/intl.h" @@ -65,6 +66,7 @@ struct pattern_flags { 'L', M_ADDRESS, 0, eat_regexp}, { 'l', M_LIST, 0, NULL}, { 'm', M_MESSAGE, 0, eat_range}, { + 'M', M_MULTIPART, 0, NULL}, { 'n', M_SCORE, 0, eat_range}, { 'N', M_NEW, 0, NULL}, { 'O', M_OLD, 0, NULL}, { @@ -1047,6 +1049,8 @@ mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, return (pat->not ^ (h->thread && h->thread->duplicate_thread)); case M_UNREFERENCED: return (pat->not ^ (h->thread && !h->thread->child)); + case M_MULTIPART: + return (pat->not ^ (h->content && h->content->type == TYPEMULTIPART)); case M_REALNAME: /* realname filter: * we have a match if -- 2.20.1