NeoMutt  2025-12-11-276-g10b23b
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
private.h File Reference

Shared constants/structs that are private to libpattern. More...

#include <stdbool.h>
#include "mutt/lib.h"
#include "email/lib.h"
#include "lib.h"
+ Include dependency graph for private.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PatternFlags
 Mapping between user character and internal constant. More...
 
struct  RangeRegex
 Regular expression representing a range. More...
 

Macros

#define RANGE_NUM_RX   "([[:digit:]]+|0x[[:xdigit:]]+)[MmKk]?"
 Regex for a number (decimal or hex) with optional K/M suffix.
 
#define RANGE_REL_SLOT_RX   "[[:blank:]]*([.^$]|-?" RANGE_NUM_RX ")?[[:blank:]]*"
 Regex for one slot in a relative range (e.g., "5" or "-3")
 
#define RANGE_REL_RX   "^" RANGE_REL_SLOT_RX "," RANGE_REL_SLOT_RX
 Regex for relative range (e.g., "1,5" or "-3,.")
 
#define RANGE_ABS_SLOT_RX   "[[:blank:]]*([.^$]|" RANGE_NUM_RX ")?[[:blank:]]*"
 Regex for one slot in an absolute range (no negative numbers)
 
#define RANGE_ABS_RX   "^" RANGE_ABS_SLOT_RX "-" RANGE_ABS_SLOT_RX
 Regex for absolute range (e.g., "1-5")
 
#define RANGE_LT_RX   "^()[[:blank:]]*(<[[:blank:]]*" RANGE_NUM_RX ")[[:blank:]]*"
 Regex for less-than range (e.g., "<100")
 
#define RANGE_GT_RX   "^()[[:blank:]]*(>[[:blank:]]*" RANGE_NUM_RX ")[[:blank:]]*"
 Regex for greater-than range (e.g., ">50")
 
#define RANGE_BARE_RX   "^[[:blank:]]*([.^$]|" RANGE_NUM_RX ")[[:blank:]]*"
 Regex for bare number range.
 
#define RANGE_RX_GROUPS   5
 Number of capture groups in range regexes.
 
#define RANGE_DOT   '.'
 Current position indicator '.'.
 
#define RANGE_CIRCUM   '^'
 First message indicator '^'.
 
#define RANGE_DOLLAR   '$'
 Last message indicator '$'.
 
#define RANGE_LT   '<'
 Less-than operator '<'.
 
#define RANGE_GT   '>'
 Greater-than operator '>'.
 
#define MUTT_MAXRANGE   -1
 

Enumerations

enum  ExpandoDataPattern { ED_PAT_DESCRIPTION = 1 , ED_PAT_EXPRESSION , ED_PAT_NUMBER }
 Expando UIDs for Patterns. More...
 
enum  PatternEat {
  EAT_NONE , EAT_DATE , EAT_GROUP , EAT_MESSAGE_RANGE ,
  EAT_QUERY , EAT_RANGE , EAT_REGEX , EAT_STRING
}
 Function to process pattern arguments. More...
 
enum  RangeType {
  RANGE_K_REL , RANGE_K_ABS , RANGE_K_LT , RANGE_K_GT ,
  RANGE_K_BARE , RANGE_K_INVALID
}
 Type of range. More...
 
enum  RangeSide { RANGE_S_LEFT , RANGE_S_RIGHT }
 Which side of the range. More...
 

Functions

static int email_msgno (struct Email *e)
 Helper to get the Email's message number.
 
const struct PatternFlagslookup_op (int op)
 Lookup the Pattern Flags for an op.
 
const struct PatternFlagslookup_tag (char prefix, char tag)
 Lookup a pattern modifier.
 
bool eval_date_minmax (struct Pattern *pat, const char *s, struct Buffer *err)
 Evaluate a date-range pattern against 'now'.
 
bool eat_message_range (struct Pattern *pat, PatternCompFlags flags, struct Buffer *s, struct Buffer *err, struct MailboxView *mv)
 Parse a range of message numbers - Implements eat_arg_t -.
 

Variables

struct RangeRegex RangeRegexes []
 Set of Regexes for various range types.
 
const struct PatternFlags Flags []
 Lookup table for all patterns.
 

Detailed Description

Shared constants/structs that are private to libpattern.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file private.h.

Macro Definition Documentation

◆ RANGE_NUM_RX

#define RANGE_NUM_RX   "([[:digit:]]+|0x[[:xdigit:]]+)[MmKk]?"

Regex for a number (decimal or hex) with optional K/M suffix.

Definition at line 103 of file private.h.

◆ RANGE_REL_SLOT_RX

#define RANGE_REL_SLOT_RX   "[[:blank:]]*([.^$]|-?" RANGE_NUM_RX ")?[[:blank:]]*"

Regex for one slot in a relative range (e.g., "5" or "-3")

Definition at line 105 of file private.h.

◆ RANGE_REL_RX

#define RANGE_REL_RX   "^" RANGE_REL_SLOT_RX "," RANGE_REL_SLOT_RX

Regex for relative range (e.g., "1,5" or "-3,.")

Definition at line 107 of file private.h.

◆ RANGE_ABS_SLOT_RX

#define RANGE_ABS_SLOT_RX   "[[:blank:]]*([.^$]|" RANGE_NUM_RX ")?[[:blank:]]*"

Regex for one slot in an absolute range (no negative numbers)

Definition at line 110 of file private.h.

◆ RANGE_ABS_RX

#define RANGE_ABS_RX   "^" RANGE_ABS_SLOT_RX "-" RANGE_ABS_SLOT_RX

Regex for absolute range (e.g., "1-5")

Definition at line 112 of file private.h.

◆ RANGE_LT_RX

#define RANGE_LT_RX   "^()[[:blank:]]*(<[[:blank:]]*" RANGE_NUM_RX ")[[:blank:]]*"

Regex for less-than range (e.g., "<100")

Definition at line 115 of file private.h.

◆ RANGE_GT_RX

#define RANGE_GT_RX   "^()[[:blank:]]*(>[[:blank:]]*" RANGE_NUM_RX ")[[:blank:]]*"

Regex for greater-than range (e.g., ">50")

Definition at line 117 of file private.h.

◆ RANGE_BARE_RX

#define RANGE_BARE_RX   "^[[:blank:]]*([.^$]|" RANGE_NUM_RX ")[[:blank:]]*"

Regex for bare number range.

Definition at line 120 of file private.h.

◆ RANGE_RX_GROUPS

#define RANGE_RX_GROUPS   5

Number of capture groups in range regexes.

Definition at line 122 of file private.h.

◆ RANGE_DOT

#define RANGE_DOT   '.'

Current position indicator '.'.

Definition at line 124 of file private.h.

◆ RANGE_CIRCUM

#define RANGE_CIRCUM   '^'

First message indicator '^'.

Definition at line 125 of file private.h.

◆ RANGE_DOLLAR

#define RANGE_DOLLAR   '$'

Last message indicator '$'.

Definition at line 126 of file private.h.

◆ RANGE_LT

#define RANGE_LT   '<'

Less-than operator '<'.

Definition at line 127 of file private.h.

◆ RANGE_GT

#define RANGE_GT   '>'

Greater-than operator '>'.

Definition at line 128 of file private.h.

◆ MUTT_MAXRANGE

#define MUTT_MAXRANGE   -1

Definition at line 149 of file private.h.

Enumeration Type Documentation

◆ ExpandoDataPattern

Expando UIDs for Patterns.

See also
ED_PATTERN, ExpandoDomain
Enumerator
ED_PAT_DESCRIPTION 

PatternEntry.desc.

ED_PAT_EXPRESSION 

PatternEntry.expr.

ED_PAT_NUMBER 

PatternEntry.num.

Definition at line 38 of file private.h.

39{
43};
@ ED_PAT_DESCRIPTION
PatternEntry.desc.
Definition private.h:40
@ ED_PAT_EXPRESSION
PatternEntry.expr.
Definition private.h:41
@ ED_PAT_NUMBER
PatternEntry.num.
Definition private.h:42

◆ PatternEat

enum PatternEat

Function to process pattern arguments.

Values for PatternFlags.eat_arg

Enumerator
EAT_NONE 

No arguments required.

EAT_DATE 

Process a date (range)

EAT_GROUP 

Process a group name.

EAT_MESSAGE_RANGE 

Process a message number (range)

EAT_QUERY 

Process a query string.

EAT_RANGE 

Process a number (range)

EAT_REGEX 

Process a regex.

EAT_STRING 

Process a plain string.

Definition at line 50 of file private.h.

51{
52 EAT_NONE,
53 EAT_DATE,
54 EAT_GROUP,
56 EAT_QUERY,
57 EAT_RANGE,
58 EAT_REGEX,
60};
@ EAT_STRING
Process a plain string.
Definition private.h:59
@ EAT_NONE
No arguments required.
Definition private.h:52
@ EAT_RANGE
Process a number (range)
Definition private.h:57
@ EAT_GROUP
Process a group name.
Definition private.h:54
@ EAT_MESSAGE_RANGE
Process a message number (range)
Definition private.h:55
@ EAT_DATE
Process a date (range)
Definition private.h:53
@ EAT_QUERY
Process a query string.
Definition private.h:56
@ EAT_REGEX
Process a regex.
Definition private.h:58

◆ RangeType

enum RangeType

Type of range.

Enumerator
RANGE_K_REL 

Relative range.

RANGE_K_ABS 

Absolute range.

RANGE_K_LT 

Less-than range.

RANGE_K_GT 

Greater-than range.

RANGE_K_BARE 

Single symbol.

RANGE_K_INVALID 

Range is invalid.

Definition at line 91 of file private.h.

92{
98 /* add new ones HERE */
100};
@ RANGE_K_REL
Relative range.
Definition private.h:93
@ RANGE_K_ABS
Absolute range.
Definition private.h:94
@ RANGE_K_LT
Less-than range.
Definition private.h:95
@ RANGE_K_INVALID
Range is invalid.
Definition private.h:99
@ RANGE_K_BARE
Single symbol.
Definition private.h:97
@ RANGE_K_GT
Greater-than range.
Definition private.h:96

◆ RangeSide

enum RangeSide

Which side of the range.

Enumerator
RANGE_S_LEFT 

Left side of range.

RANGE_S_RIGHT 

Right side of range.

Definition at line 133 of file private.h.

134{
137};
@ RANGE_S_LEFT
Left side of range.
Definition private.h:135
@ RANGE_S_RIGHT
Right side of range.
Definition private.h:136

Function Documentation

◆ email_msgno()

static int email_msgno ( struct Email * e)
inlinestatic

Helper to get the Email's message number.

Parameters
eEmail
Return values
numMessage number

Definition at line 144 of file private.h.

145{
146 return e->msgno + 1;
147}
int msgno
Number displayed to the user.
Definition email.h:111
+ Here is the caller graph for this function:

◆ lookup_op()

const struct PatternFlags * lookup_op ( int op)

Lookup the Pattern Flags for an op.

Parameters
opOperation, e.g. MUTT_PAT_SENDER
Return values
ptrPatternFlags

Definition at line 258 of file flags.c.

259{
260 for (int i = 0; Flags[i].tag; i++)
261 if (Flags[i].op == op)
262 return (&Flags[i]);
263 return NULL;
264}
const struct PatternFlags Flags[]
Lookup table for all patterns.
Definition flags.c:47
+ Here is the caller graph for this function:

◆ lookup_tag()

const struct PatternFlags * lookup_tag ( char prefix,
char tag )

Lookup a pattern modifier.

Parameters
prefixPattern prefix, e.g. '~', '', or '='
tagLetter, e.g. 'b' for pattern '~b'
Return values
ptrPattern data

This function first looks for an exact match with the given prefix and tag. If not found and prefix is '' or '=', it falls back to looking for the tag with '~' prefix to maintain backward compatibility where '=' means string-match and '' means group-match modifier.

Definition at line 235 of file flags.c.

236{
237 // First, try exact match
238 for (int i = 0; Flags[i].tag; i++)
239 if ((Flags[i].prefix == prefix) && (Flags[i].tag == tag))
240 return &Flags[i];
241
242 // Fall back to '~' prefix for '%' and '=' modifiers
243 if ((prefix == '%') || (prefix == '='))
244 {
245 for (int i = 0; Flags[i].tag; i++)
246 if ((Flags[i].prefix == '~') && (Flags[i].tag == tag))
247 return &Flags[i];
248 }
249
250 return NULL;
251}
+ Here is the caller graph for this function:

◆ eval_date_minmax()

bool eval_date_minmax ( struct Pattern * pat,
const char * s,
struct Buffer * err )

Evaluate a date-range pattern against 'now'.

Parameters
patPattern to modify
sPattern string to use
errBuffer for error messages
Return values
truePattern valid and updated
falsePattern invalid

Definition at line 544 of file compile.c.

545{
546 /* the '0' time is Jan 1, 1970 UTC, so in order to prevent a negative time
547 * when doing timezone conversion, we use Jan 2, 1970 UTC as the base here */
548 struct tm min = { 0 };
549 min.tm_mday = 2;
550 min.tm_year = 70;
551
552 /* Arbitrary year in the future. Don't set this too high or
553 * mutt_date_make_time() returns something larger than will fit in a time_t
554 * on some systems */
555 struct tm max = { 0 };
556 max.tm_year = 130;
557 max.tm_mon = 11;
558 max.tm_mday = 31;
559 max.tm_hour = 23;
560 max.tm_min = 59;
561 max.tm_sec = 59;
562
563 if (strchr("<>=", s[0]))
564 {
565 /* offset from current time
566 * <3d less than three days ago
567 * >3d more than three days ago
568 * =3d exactly three days ago */
569 struct tm *tm = NULL;
570 bool exact = false;
571
572 if (s[0] == '<')
573 {
575 tm = &min;
576 }
577 else
578 {
580 tm = &max;
581
582 if (s[0] == '=')
583 exact = true;
584 }
585
586 /* Reset the HMS unless we are relative matching using one of those
587 * offsets. */
588 char *offset_type = NULL;
589 strtol(s + 1, &offset_type, 0);
590 if (!(*offset_type && strchr("HMS", *offset_type)))
591 {
592 tm->tm_hour = 23;
593 tm->tm_min = 59;
594 tm->tm_sec = 59;
595 }
596
597 /* force negative offset */
598 get_offset(tm, s + 1, -1);
599
600 if (exact)
601 {
602 /* start at the beginning of the day in question */
603 memcpy(&min, &max, sizeof(max));
604 min.tm_hour = 0;
605 min.tm_sec = 0;
606 min.tm_min = 0;
607 }
608 }
609 else
610 {
611 const char *pc = s;
612
613 bool have_min = false;
614 bool until_now = false;
615 if (mutt_isdigit(*pc))
616 {
617 /* minimum date specified */
618 pc = get_date(pc, &min, err);
619 if (!pc)
620 {
621 return false;
622 }
623 have_min = true;
624 SKIPWS(pc);
625 if (*pc == '-')
626 {
627 const char *pt = pc + 1;
628 SKIPWS(pt);
629 until_now = (*pt == '\0');
630 }
631 }
632
633 if (!until_now)
634 { /* max date or relative range/window */
635
636 struct tm base_min = { 0 };
637
638 if (!have_min)
639 { /* save base minimum and set current date, e.g. for "-3d+1d" */
640 memcpy(&base_min, &min, sizeof(base_min));
642 min.tm_hour = 0;
643 min.tm_sec = 0;
644 min.tm_min = 0;
645 }
646
647 /* preset max date for relative offsets,
648 * if nothing follows we search for messages on a specific day */
649 max.tm_year = min.tm_year;
650 max.tm_mon = min.tm_mon;
651 max.tm_mday = min.tm_mday;
652
653 if (!parse_date_range(pc, &min, &max, have_min, &base_min, err))
654 { /* bail out on any parsing error */
655 return false;
656 }
657 }
658 }
659
660 /* Since we allow two dates to be specified we'll have to adjust that. */
661 adjust_date_range(&min, &max);
662
663 pat->min = mutt_date_make_time(&min, true);
664 pat->max = mutt_date_make_time(&max, true);
665
666 return true;
667}
static const char * parse_date_range(const char *pc, struct tm *min, struct tm *max, bool have_min, struct tm *base_min, struct Buffer *err)
Parse a date range.
Definition compile.c:412
static void adjust_date_range(struct tm *min, struct tm *max)
Put a date range in the correct order.
Definition compile.c:506
static const char * get_offset(struct tm *tm, const char *s, int sign)
Calculate a symbolic offset.
Definition compile.c:272
static const char * get_date(const char *s, struct tm *t, struct Buffer *err)
Parse a (partial) date in dd/mm/yyyy format.
Definition compile.c:326
bool mutt_isdigit(int arg)
Wrapper for isdigit(3)
Definition ctype.c:66
struct tm mutt_date_localtime(time_t t)
Converts calendar time to a broken-down time structure expressed in user timezone.
Definition date.c:907
time_t mutt_date_make_time(struct tm *t, bool local)
Convert struct tm to time_t
Definition date.c:243
time_t mutt_date_now(void)
Return the number of seconds since the Unix epoch.
Definition date.c:457
#define SKIPWS(ch)
Definition string2.h:52
long min
Minimum for range checks.
Definition lib.h:89
long max
Maximum for range checks.
Definition lib.h:90
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ RangeRegexes

struct RangeRegex RangeRegexes[]
extern

Set of Regexes for various range types.

This array, will also contain the compiled regexes.

Definition at line 60 of file pattern.c.

60 {
61 // clang-format off
62 [RANGE_K_REL] = { RANGE_REL_RX, 1, 3, 0, { 0 } },
63 [RANGE_K_ABS] = { RANGE_ABS_RX, 1, 3, 0, { 0 } },
64 [RANGE_K_LT] = { RANGE_LT_RX, 1, 2, 0, { 0 } },
65 [RANGE_K_GT] = { RANGE_GT_RX, 2, 1, 0, { 0 } },
66 [RANGE_K_BARE] = { RANGE_BARE_RX, 1, 1, 0, { 0 } },
67 // clang-format on
68};
#define RANGE_GT_RX
Regex for greater-than range (e.g., ">50")
Definition private.h:117
#define RANGE_ABS_RX
Regex for absolute range (e.g., "1-5")
Definition private.h:112
#define RANGE_LT_RX
Regex for less-than range (e.g., "<100")
Definition private.h:115
#define RANGE_BARE_RX
Regex for bare number range.
Definition private.h:120
#define RANGE_REL_RX
Regex for relative range (e.g., "1,5" or "-3,.")
Definition private.h:107

◆ Flags

const struct PatternFlags Flags[]
extern

Lookup table for all patterns.

Patterns in use:

  • ~ .bcdefghi.klmn.p.rstuvwxyz
  • ~ ABCDEFGHI..LMNOPQRSTUV.XY.
  • ~# ~$ ~() ~<() ~= ~>()
  • Group patterns - c C e f L
  • IMAP patterns - =b =B =h =/

Definition at line 47 of file flags.c.

47 {
48 // clang-format off
49 { '~', 'A', MUTT_ALL, 0, EAT_NONE,
50 // L10N: Pattern Completion Menu description for ~A
51 N_("all messages") },
53 // L10N: Pattern Completion Menu description for ~b
54 N_("messages whose body matches REGEX") },
56 // L10N: Pattern Completion Menu description for =b
57 N_("IMAP: messages whose body contains STRING") },
59 // L10N: Pattern Completion Menu description for ~B
60 N_("messages whose body or headers match REGEX") },
62 // L10N: Pattern Completion Menu description for =B
63 N_("IMAP: messages whose body or headers contain STRING") },
64 { '~', 'c', MUTT_PAT_CC, 0, EAT_REGEX,
65 // L10N: Pattern Completion Menu description for ~c
66 N_("messages whose Cc: header matches REGEX") },
67 { '%', 'c', MUTT_PAT_CC, 0, EAT_GROUP,
68 // L10N: Pattern Completion Menu description for %c
69 N_("messages whose Cc: is a member of GROUP") },
70 { '~', 'C', MUTT_PAT_RECIPIENT, 0, EAT_REGEX,
71 // L10N: Pattern Completion Menu description for ~C
72 N_("messages whose To:, Cc: or Bcc: header matches REGEX") },
73 { '%', 'C', MUTT_PAT_RECIPIENT, 0, EAT_GROUP,
74 // L10N: Pattern Completion Menu description for %C
75 N_("messages whose To:, Cc: or Bcc: is a member of GROUP") },
76 { '~', 'd', MUTT_PAT_DATE, 0, EAT_DATE,
77 // L10N: Pattern Completion Menu description for ~d
78 N_("messages sent in DATERANGE") },
79 { '~', 'D', MUTT_DELETED, 0, EAT_NONE,
80 // L10N: Pattern Completion Menu description for ~D
81 N_("deleted messages") },
82 { '~', 'e', MUTT_PAT_SENDER, 0, EAT_REGEX,
83 // L10N: Pattern Completion Menu description for ~e
84 N_("messages whose Sender: header matches REGEX") },
85 { '%', 'e', MUTT_PAT_SENDER, 0, EAT_GROUP,
86 // L10N: Pattern Completion Menu description for %e
87 N_("messages whose Sender: is a member of GROUP") },
88 { '~', 'E', MUTT_EXPIRED, 0, EAT_NONE,
89 // L10N: Pattern Completion Menu description for ~E
90 N_("expired messages") },
91 { '~', 'f', MUTT_PAT_FROM, 0, EAT_REGEX,
92 // L10N: Pattern Completion Menu description for ~f
93 N_("messages whose From: header matches REGEX") },
94 { '%', 'f', MUTT_PAT_FROM, 0, EAT_GROUP,
95 // L10N: Pattern Completion Menu description for %f
96 N_("messages whose From: is a member of GROUP") },
97 { '~', 'F', MUTT_FLAG, 0, EAT_NONE,
98 // L10N: Pattern Completion Menu description for ~F
99 N_("flagged messages") },
100 { '~', 'g', MUTT_PAT_CRYPT_SIGN, 0, EAT_NONE,
101 // L10N: Pattern Completion Menu description for ~g
102 N_("cryptographically signed messages") },
103 { '~', 'G', MUTT_PAT_CRYPT_ENCRYPT, 0, EAT_NONE,
104 // L10N: Pattern Completion Menu description for ~G
105 N_("cryptographically encrypted messages") },
107 // L10N: Pattern Completion Menu description for ~h
108 N_("messages whose header matches REGEX") },
110 // L10N: Pattern Completion Menu description for =h
111 N_("IMAP: messages whose header contains STRING") },
112 { '~', 'H', MUTT_PAT_HORMEL, 0, EAT_REGEX,
113 // L10N: Pattern Completion Menu description for ~H
114 N_("messages whose spam header matches REGEX") },
115 { '~', 'i', MUTT_PAT_ID, 0, EAT_REGEX,
116 // L10N: Pattern Completion Menu description for ~i
117 N_("messages whose Message-Id: header matches REGEX") },
118 { '~', 'I', MUTT_PAT_ID_EXTERNAL, 0, EAT_QUERY,
119 // L10N: Pattern Completion Menu description for ~I
120 N_("messages whose Message-Id: is included in results from $external_search_command") },
121 { '~', 'k', MUTT_PAT_PGP_KEY, 0, EAT_NONE,
122 // L10N: Pattern Completion Menu description for ~k
123 N_("messages which contain a PGP key") },
124 { '~', 'K', MUTT_PAT_BCC, 0, EAT_REGEX,
125 // L10N: Pattern Completion Menu description for ~K
126 N_("messages whose Bcc: header matches REGEX") },
127 { '~', 'l', MUTT_PAT_LIST, 0, EAT_NONE,
128 // L10N: Pattern Completion Menu description for ~l
129 N_("messages addressed to known mailing lists") },
130 { '~', 'L', MUTT_PAT_ADDRESS, 0, EAT_REGEX,
131 // L10N: Pattern Completion Menu description for ~L
132 N_("messages whose From:, Sender:, To: or Cc: header matches REGEX") },
133 { '%', 'L', MUTT_PAT_ADDRESS, 0, EAT_GROUP,
134 // L10N: Pattern Completion Menu description for %L
135 N_("messages whose From:, Sender:, To: or Cc: is a member of GROUP") },
136 { '~', 'm', MUTT_PAT_MESSAGE, 0, EAT_MESSAGE_RANGE,
137 // L10N: Pattern Completion Menu description for ~m
138 N_("messages whose number is in RANGE") },
140 // L10N: Pattern Completion Menu description for ~M
141 N_("messages with a Content-Type matching REGEX") },
142 { '~', 'n', MUTT_PAT_SCORE, 0, EAT_RANGE,
143 // L10N: Pattern Completion Menu description for ~n
144 N_("messages whose score is in RANGE") },
145 { '~', 'N', MUTT_NEW, 0, EAT_NONE,
146 // L10N: Pattern Completion Menu description for ~N
147 N_("new messages") },
148 { '~', 'O', MUTT_OLD, 0, EAT_NONE,
149 // L10N: Pattern Completion Menu description for ~O
150 N_("old messages") },
151 { '~', 'p', MUTT_PAT_PERSONAL_RECIP, 0, EAT_NONE,
152 // L10N: Pattern Completion Menu description for ~p
153 N_("messages addressed to you") },
154 { '~', 'P', MUTT_PAT_PERSONAL_FROM, 0, EAT_NONE,
155 // L10N: Pattern Completion Menu description for ~P
156 N_("messages from you") },
157 { '~', 'Q', MUTT_REPLIED, 0, EAT_NONE,
158 // L10N: Pattern Completion Menu description for ~Q
159 N_("messages which have been replied to") },
160 { '~', 'r', MUTT_PAT_DATE_RECEIVED, 0, EAT_DATE,
161 // L10N: Pattern Completion Menu description for ~r
162 N_("messages received in DATERANGE") },
163 { '~', 'R', MUTT_READ, 0, EAT_NONE,
164 // L10N: Pattern Completion Menu description for ~R
165 N_("read messages") },
166 { '~', 's', MUTT_PAT_SUBJECT, 0, EAT_REGEX,
167 // L10N: Pattern Completion Menu description for ~s
168 N_("messages whose Subject: header matches REGEX") },
169 { '~', 'S', MUTT_SUPERSEDED, 0, EAT_NONE,
170 // L10N: Pattern Completion Menu description for ~S
171 N_("superseded messages") },
172 { '~', 't', MUTT_PAT_TO, 0, EAT_REGEX,
173 // L10N: Pattern Completion Menu description for ~t
174 N_("messages whose To: header matches REGEX") },
175 { '~', 'T', MUTT_TAG, 0, EAT_NONE,
176 // L10N: Pattern Completion Menu description for ~T
177 N_("tagged messages") },
178 { '~', 'u', MUTT_PAT_SUBSCRIBED_LIST, 0, EAT_NONE,
179 // L10N: Pattern Completion Menu description for ~u
180 N_("messages addressed to subscribed mailing lists") },
181 { '~', 'U', MUTT_UNREAD, 0, EAT_NONE,
182 // L10N: Pattern Completion Menu description for ~U
183 N_("unread messages") },
184 { '~', 'v', MUTT_PAT_COLLAPSED, 0, EAT_NONE,
185 // L10N: Pattern Completion Menu description for ~v
186 N_("messages in collapsed threads") },
187 { '~', 'V', MUTT_PAT_CRYPT_VERIFIED, 0, EAT_NONE,
188 // L10N: Pattern Completion Menu description for ~V
189 N_("cryptographically verified messages") },
190 { '~', 'w', MUTT_PAT_NEWSGROUPS, 0, EAT_REGEX,
191 // L10N: Pattern Completion Menu description for ~w
192 N_("newsgroups matching REGEX") },
193 { '~', 'x', MUTT_PAT_REFERENCE, 0, EAT_REGEX,
194 // L10N: Pattern Completion Menu description for ~x
195 N_("messages whose References: or In-Reply-To: header matches REGEX") },
196 { '~', 'X', MUTT_PAT_MIMEATTACH, 0, EAT_RANGE,
197 // L10N: Pattern Completion Menu description for ~X
198 N_("messages with RANGE attachments") },
199 { '~', 'y', MUTT_PAT_XLABEL, 0, EAT_REGEX,
200 // L10N: Pattern Completion Menu description for ~y
201 N_("messages whose X-Label: header matches REGEX") },
202 { '~', 'Y', MUTT_PAT_DRIVER_TAGS, 0, EAT_REGEX,
203 // L10N: Pattern Completion Menu description for ~Y
204 N_("messages whose tags match REGEX") },
205 { '~', 'z', MUTT_PAT_SIZE, 0, EAT_RANGE,
206 // L10N: Pattern Completion Menu description for ~z
207 N_("messages whose size is in RANGE") },
208 { '~', '#', MUTT_PAT_BROKEN, 0, EAT_NONE,
209 // L10N: Pattern Completion Menu description for ~#
210 N_("broken threads") },
211 { '~', '$', MUTT_PAT_UNREFERENCED, 0, EAT_NONE,
212 // L10N: Pattern Completion Menu description for ~$
213 N_("unreferenced messages") },
214 { '=', '/', MUTT_PAT_SERVERSEARCH, 0, EAT_STRING,
215 // L10N: Pattern Completion Menu description for =/
216 N_("GMail: custom server-side search for STRING") },
217 { '~', '=', MUTT_PAT_DUPLICATED, 0, EAT_NONE,
218 // L10N: Pattern Completion Menu description for ~=
219 N_("duplicated messages") },
220 { 0, 0, 0, 0, EAT_NONE, NULL, },
221 // clang-format on
222};
#define N_(a)
Definition message.h:32
@ MUTT_ALL
All messages.
Definition mutt.h:86
@ MUTT_SUPERSEDED
Superseded messages.
Definition mutt.h:102
@ MUTT_EXPIRED
Expired messages.
Definition mutt.h:101
@ MUTT_READ
Messages that have been read.
Definition mutt.h:91
@ MUTT_OLD
Old messages.
Definition mutt.h:89
@ MUTT_TAG
Tagged messages.
Definition mutt.h:98
@ MUTT_FLAG
Flagged messages.
Definition mutt.h:97
@ MUTT_DELETED
Deleted messages.
Definition mutt.h:96
@ MUTT_NEW
New messages.
Definition mutt.h:88
@ MUTT_UNREAD
Unread messages.
Definition mutt.h:92
@ MUTT_REPLIED
Messages that have been replied to.
Definition mutt.h:90
#define MUTT_PC_SEND_MODE_SEARCH
Allow send-mode body searching.
Definition lib.h:72
#define MUTT_PC_FULL_MSG
Enable body and header matching.
Definition lib.h:70
@ MUTT_PAT_HEADER
Pattern matches email's header.
Definition lib.h:157
@ MUTT_PAT_WHOLE_MSG
Pattern matches raw email text.
Definition lib.h:159
@ MUTT_PAT_BROKEN
Message is part of a broken thread.
Definition lib.h:153
@ MUTT_PAT_ID_EXTERNAL
Message-Id is among results from an external query.
Definition lib.h:155
@ MUTT_PAT_REFERENCE
Pattern matches 'References:' or 'In-Reply-To:' field.
Definition lib.h:164
@ MUTT_PAT_FROM
Pattern matches 'From:' field.
Definition lib.h:148
@ MUTT_PAT_DRIVER_TAGS
Pattern matches message tags.
Definition lib.h:177
@ MUTT_PAT_COLLAPSED
Thread is collapsed.
Definition lib.h:146
@ MUTT_PAT_CRYPT_VERIFIED
Message is crypographically verified.
Definition lib.h:172
@ MUTT_PAT_HORMEL
Pattern matches email's spam score.
Definition lib.h:158
@ MUTT_PAT_SUBJECT
Pattern matches 'Subject:' field.
Definition lib.h:147
@ MUTT_PAT_LIST
Email is on mailing list.
Definition lib.h:166
@ MUTT_PAT_NEWSGROUPS
Pattern matches newsgroup.
Definition lib.h:180
@ MUTT_PAT_PERSONAL_RECIP
Email is addressed to the user.
Definition lib.h:168
@ MUTT_PAT_CC
Pattern matches 'Cc:' field.
Definition lib.h:144
@ MUTT_PAT_SUBSCRIBED_LIST
Email is on subscribed mailing list.
Definition lib.h:167
@ MUTT_PAT_SERVERSEARCH
Server-side pattern matches.
Definition lib.h:176
@ MUTT_PAT_RECIPIENT
User is a recipient of the email.
Definition lib.h:165
@ MUTT_PAT_CRYPT_ENCRYPT
Message is encrypted.
Definition lib.h:173
@ MUTT_PAT_UNREFERENCED
Message is unreferenced in the thread.
Definition lib.h:152
@ MUTT_PAT_CRYPT_SIGN
Message is signed.
Definition lib.h:171
@ MUTT_PAT_MESSAGE
Pattern matches message number.
Definition lib.h:161
@ MUTT_PAT_DATE
Pattern matches 'Date:' field.
Definition lib.h:149
@ MUTT_PAT_XLABEL
Pattern matches keyword/label.
Definition lib.h:175
@ MUTT_PAT_SCORE
Pattern matches email's score.
Definition lib.h:162
@ MUTT_PAT_MIMEATTACH
Pattern matches number of attachments.
Definition lib.h:178
@ MUTT_PAT_DUPLICATED
Duplicate message.
Definition lib.h:151
@ MUTT_PAT_PERSONAL_FROM
Email is from the user.
Definition lib.h:169
@ MUTT_PAT_TO
Pattern matches 'To:' field.
Definition lib.h:143
@ MUTT_PAT_BCC
Pattern matches 'Bcc:' field.
Definition lib.h:145
@ MUTT_PAT_SENDER
Pattern matches sender.
Definition lib.h:160
@ MUTT_PAT_DATE_RECEIVED
Pattern matches date received.
Definition lib.h:150
@ MUTT_PAT_ADDRESS
Pattern matches any address field.
Definition lib.h:170
@ MUTT_PAT_MIMETYPE
Pattern matches MIME type.
Definition lib.h:179
@ MUTT_PAT_PGP_KEY
Message has PGP key.
Definition lib.h:174
@ MUTT_PAT_ID
Pattern matches email's Message-Id.
Definition lib.h:154
@ MUTT_PAT_SIZE
Pattern matches email's size.
Definition lib.h:163
@ MUTT_PAT_BODY
Pattern matches email's body.
Definition lib.h:156