NeoMutt  2025-12-11-58-g09398d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mutt_config.c
Go to the documentation of this file.
1
28
34
35#include "config.h"
36#include <stdbool.h>
37#include <stdint.h>
38#include <stdio.h>
39#include "mutt/lib.h"
40#include "config/lib.h"
41#include "email/lib.h"
42#include "core/lib.h"
43#include "debug/lib.h"
44#include "attach/lib.h"
45#include "expando/lib.h"
46#include "index/lib.h"
47#include "mutt_logging.h"
48#include "mutt_thread.h"
49#include "mx.h"
50
51extern const struct ExpandoDefinition IndexFormatDef[];
52
53#define CONFIG_INIT_TYPE(CS, NAME) \
54 extern const struct ConfigSetType Cst##NAME; \
55 cs_register_type(CS, &Cst##NAME)
56
57#define CONFIG_INIT_VARS(CS, NAME) \
58 bool config_init_##NAME(struct ConfigSet *cs); \
59 config_init_##NAME(CS)
60
64static const struct Mapping SortAuxMethods[] = {
65 // clang-format off
66 { "date", EMAIL_SORT_DATE },
67 { "date-received", EMAIL_SORT_DATE_RECEIVED },
68 { "from", EMAIL_SORT_FROM },
69 { "label", EMAIL_SORT_LABEL },
70 { "score", EMAIL_SORT_SCORE },
71 { "size", EMAIL_SORT_SIZE },
72 { "spam", EMAIL_SORT_SPAM },
73 { "subject", EMAIL_SORT_SUBJECT },
74 { "to", EMAIL_SORT_TO },
75 { "unsorted", EMAIL_SORT_UNSORTED },
76 // Compatibility
77 { "date-sent", EMAIL_SORT_DATE },
78 { "mailbox-order", EMAIL_SORT_UNSORTED },
79 { "threads", EMAIL_SORT_DATE },
80 { NULL, 0 },
81 // clang-format on
82};
83
87const struct Mapping SortMethods[] = {
88 // clang-format off
89 { "date", EMAIL_SORT_DATE },
90 { "date-received", EMAIL_SORT_DATE_RECEIVED },
91 { "from", EMAIL_SORT_FROM },
92 { "label", EMAIL_SORT_LABEL },
93 { "score", EMAIL_SORT_SCORE },
94 { "size", EMAIL_SORT_SIZE },
95 { "spam", EMAIL_SORT_SPAM },
96 { "subject", EMAIL_SORT_SUBJECT },
97 { "threads", EMAIL_SORT_THREADS },
98 { "to", EMAIL_SORT_TO },
99 { "unsorted", EMAIL_SORT_UNSORTED },
100 // Compatibility
101 { "date-sent", EMAIL_SORT_DATE },
102 { "mailbox-order", EMAIL_SORT_UNSORTED },
103 { NULL, 0 },
104 // clang-format on
105};
106
110static int multipart_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
111{
112 if (value == 0)
113 return CSR_SUCCESS;
114
115 const char *str = (const char *) value;
116
117 if (mutt_str_equal(str, "inline") || mutt_str_equal(str, "info"))
118 return CSR_SUCCESS;
119
120 buf_printf(err, _("Invalid value for option %s: %s"), cdef->name, str);
121 return CSR_ERR_INVALID;
122}
123
130static const struct ExpandoDefinition AttachFormatDef[] = {
131 // clang-format off
132 { "*", "padding-soft", ED_GLOBAL, ED_GLO_PADDING_SOFT, node_padding_parse },
133 { ">", "padding-hard", ED_GLOBAL, ED_GLO_PADDING_HARD, node_padding_parse },
134 { "|", "padding-eol", ED_GLOBAL, ED_GLO_PADDING_EOL, node_padding_parse },
135 { "c", "charset-convert", ED_BODY, ED_BOD_CHARSET_CONVERT, NULL },
136 { "C", "charset", ED_ATTACH, ED_ATT_CHARSET, NULL },
137 { "d", "description", ED_BODY, ED_BOD_DESCRIPTION, NULL },
138 { "D", "deleted", ED_BODY, ED_BOD_DELETED, NULL },
139 { "e", "mime-encoding", ED_BODY, ED_BOD_MIME_ENCODING, NULL },
140 { "f", "file", ED_BODY, ED_BOD_FILE, NULL },
141 { "F", "file-disposition", ED_BODY, ED_BOD_FILE_DISPOSITION, NULL },
142 { "I", "disposition", ED_BODY, ED_BOD_DISPOSITION, NULL },
143 { "m", "mime-major", ED_BODY, ED_BOD_MIME_MAJOR, NULL },
144 { "M", "mime-minor", ED_BODY, ED_BOD_MIME_MINOR, NULL },
145 { "n", "number", ED_ATTACH, ED_ATT_NUMBER, NULL },
146 { "Q", "attach-qualifies", ED_BODY, ED_BOD_ATTACH_QUALIFIES, NULL },
147 { "s", "file-size", ED_BODY, ED_BOD_FILE_SIZE, NULL },
148 { "t", "tagged", ED_BODY, ED_BOD_TAGGED, NULL },
149 { "T", "tree", ED_ATTACH, ED_ATT_TREE, NULL },
150 { "u", "unlink", ED_BODY, ED_BOD_UNLINK, NULL },
151 { "X", "attach-count", ED_BODY, ED_BOD_ATTACH_COUNT, NULL },
152 { NULL, NULL, 0, -1, NULL }
153 // clang-format on
154};
155
163 struct ExpandoFormat *fmt, int did,
164 int uid, ExpandoParserFlags flags,
165 const char **parsed_until,
166 struct ExpandoParseError *err)
167{
168 if (flags & EP_CONDITIONAL)
169 {
170 return node_conddate_parse(str, did, uid, parsed_until, err);
171 }
172
173 return node_expando_parse_enclosure(str, did, uid, ')', fmt, parsed_until, err);
174}
175
182struct ExpandoNode *parse_index_date_local(const char *str, struct ExpandoFormat *fmt,
183 int did, int uid, ExpandoParserFlags flags,
184 const char **parsed_until,
185 struct ExpandoParseError *err)
186{
187 if (flags & EP_CONDITIONAL)
188 {
189 return node_conddate_parse(str, did, uid, parsed_until, err);
190 }
191
192 return node_expando_parse_enclosure(str, did, uid, ']', fmt, parsed_until, err);
193}
194
201struct ExpandoNode *parse_index_date(const char *str, struct ExpandoFormat *fmt,
202 int did, int uid, ExpandoParserFlags flags,
203 const char **parsed_until,
204 struct ExpandoParseError *err)
205{
206 if (flags & EP_CONDITIONAL)
207 {
208 return node_conddate_parse(str, did, uid, parsed_until, err);
209 }
210
211 struct ExpandoNode *node = node_expando_parse_enclosure(str, did, uid, '}',
212 fmt, parsed_until, err);
213 if (!node)
214 return NULL;
215
216 const char *pc = strchr(NONULL(node->text), '%');
217 if (!pc)
218 {
219 snprintf(err->message, sizeof(err->message), _("Unknown expando: %%{%s}"), node->text);
220 err->position = str;
221 node_free(&node);
222 }
223
224 return node;
225}
226
234struct ExpandoNode *parse_index_hook(const char *str, struct ExpandoFormat *fmt,
235 int did, int uid, ExpandoParserFlags flags,
236 const char **parsed_until,
237 struct ExpandoParseError *err)
238{
239 if (flags & EP_CONDITIONAL)
240 {
241 snprintf(err->message, sizeof(err->message),
242 _("index-hook cannot be used as a condition"));
243 err->position = str;
244 return NULL;
245 }
246
247 return node_expando_parse_enclosure(str, did, uid, '@', fmt, parsed_until, err);
248}
249
255struct ExpandoNode *parse_tags_transformed(const char *str, struct ExpandoFormat *fmt,
256 int did, int uid, ExpandoParserFlags flags,
257 const char **parsed_until,
258 struct ExpandoParseError *err)
259{
260 // Tag expando %G must use a suffix from [A-Za-z0-9], e.g. %Ga, %GL
261 if (!mutt_isalnum(str[1]))
262 return NULL;
263
264 struct ExpandoNode *node = node_expando_new(fmt, did, uid);
265
266 node->text = mutt_strn_dup(str, 2);
267
268 if (flags & EP_CONDITIONAL)
269 {
270 node->type = ENT_CONDBOOL;
272 }
273
274 (*parsed_until) = str + 2;
275
276 return node;
277}
278
285struct ExpandoNode *parse_subject(const char *str, struct ExpandoFormat *fmt,
286 int did, int uid, ExpandoParserFlags flags,
287 const char **parsed_until, struct ExpandoParseError *err)
288{
289 struct ExpandoNode *node_subj = node_expando_new(NULL, did, uid);
291 struct ExpandoNode *node_cont = node_container_new();
292
293 // Apply the formatting info to the container
294 node_cont->format = fmt;
295
296 node_add_child(node_cont, node_tree);
297 node_add_child(node_cont, node_subj);
298
299 if (*parsed_until[0] != '}')
300 (*parsed_until)++;
301
302 return node_cont;
303}
304
321 // clang-format off
322 { "*", "padding-soft", ED_GLOBAL, ED_GLO_PADDING_SOFT, node_padding_parse },
323 { ">", "padding-hard", ED_GLOBAL, ED_GLO_PADDING_HARD, node_padding_parse },
324 { "|", "padding-eol", ED_GLOBAL, ED_GLO_PADDING_EOL, node_padding_parse },
327 { "a", "from", ED_ENVELOPE, ED_ENV_FROM, NULL },
328 { "A", "reply-to", ED_ENVELOPE, ED_ENV_REPLY_TO, NULL },
329 { "b", "mailbox-name", ED_MAILBOX, ED_MBX_MAILBOX_NAME, NULL },
330 { "B", "list-address", ED_ENVELOPE, ED_ENV_LIST_ADDRESS, NULL },
331 { "cr", "body-characters", ED_EMAIL, ED_EMA_BODY_CHARACTERS, NULL },
332 { "c", "size", ED_EMAIL, ED_EMA_SIZE, NULL },
333 { "C", "number", ED_EMAIL, ED_EMA_NUMBER, NULL },
334 { "d", "date-format", ED_EMAIL, ED_EMA_DATE_FORMAT, NULL },
335 { "D", "date-format-local", ED_EMAIL, ED_EMA_DATE_FORMAT_LOCAL, NULL },
336 { "e", "thread-number", ED_EMAIL, ED_EMA_THREAD_NUMBER, NULL },
337 { "E", "thread-count", ED_EMAIL, ED_EMA_THREAD_COUNT, NULL },
338 { "f", "from-full", ED_ENVELOPE, ED_ENV_FROM_FULL, NULL },
339 { "Fp", "sender-plain", ED_ENVELOPE, ED_ENV_SENDER_PLAIN, NULL },
340 { "F", "sender", ED_ENVELOPE, ED_ENV_SENDER, NULL },
341 { "g", "tags", ED_EMAIL, ED_EMA_TAGS, NULL },
342 { "G", "tags-transformed", ED_EMAIL, ED_EMA_TAGS_TRANSFORMED, parse_tags_transformed },
343 { "H", "spam", ED_ENVELOPE, ED_ENV_SPAM, NULL },
344 { "i", "message-id", ED_ENVELOPE, ED_ENV_MESSAGE_ID, NULL },
345 { "I", "initials", ED_ENVELOPE, ED_ENV_INITIALS, NULL },
346 { "J", "thread-tags", ED_EMAIL, ED_EMA_THREAD_TAGS, NULL },
347 { "K", "list-empty", ED_ENVELOPE, ED_ENV_LIST_EMPTY, NULL },
348 { "l", "lines", ED_EMAIL, ED_EMA_LINES, NULL },
349 { "L", "from-list", ED_EMAIL, ED_EMA_FROM_LIST, NULL },
350 { "m", "message-count", ED_MAILBOX, ED_MBX_MESSAGE_COUNT, NULL },
351 { "M", "thread-hidden-count", ED_EMAIL, ED_EMA_THREAD_HIDDEN_COUNT, NULL },
352 { "n", "name", ED_ENVELOPE, ED_ENV_NAME, NULL },
353 { "N", "score", ED_EMAIL, ED_EMA_SCORE, NULL },
354 { "O", "save-folder", ED_EMAIL, ED_EMA_LIST_OR_SAVE_FOLDER, NULL },
355 { "P", "percentage", ED_MAILBOX, ED_MBX_PERCENTAGE, NULL },
356 { "q", "newsgroup", ED_ENVELOPE, ED_ENV_NEWSGROUP, NULL },
357 { "r", "to-all", ED_ENVELOPE, ED_ENV_TO_ALL, NULL },
358 { "R", "cc-all", ED_ENVELOPE, ED_ENV_CC_ALL, NULL },
359 { "s", "subject", ED_ENVELOPE, ED_ENV_SUBJECT, parse_subject },
360 { "S", "flag-chars", ED_EMAIL, ED_EMA_FLAG_CHARS, NULL },
361 { "t", "to", ED_ENVELOPE, ED_ENV_TO, NULL },
362 { "T", "to-chars", ED_EMAIL, ED_EMA_TO_CHARS, NULL },
363 { "u", "username", ED_ENVELOPE, ED_ENV_USERNAME, NULL },
364 { "v", "first-name", ED_ENVELOPE, ED_ENV_FIRST_NAME, NULL },
365 { "W", "organization", ED_ENVELOPE, ED_ENV_ORGANIZATION, NULL },
366 { "x", "x-comment-to", ED_ENVELOPE, ED_ENV_X_COMMENT_TO, NULL },
367 { "X", "attachment-count", ED_EMAIL, ED_EMA_ATTACHMENT_COUNT, NULL },
368 { "y", "x-label", ED_ENVELOPE, ED_ENV_X_LABEL, NULL },
369 { "Y", "thread-x-label", ED_ENVELOPE, ED_ENV_THREAD_X_LABEL, NULL },
370 { "Z", "combined-flags", ED_EMAIL, ED_EMA_COMBINED_FLAGS, NULL },
371 { "zc", "crypto-flags", ED_EMAIL, ED_EMA_CRYPTO_FLAGS, NULL },
372 { "zs", "status-flags", ED_EMAIL, ED_EMA_STATUS_FLAGS, NULL },
373 { "zt", "message-flags", ED_EMAIL, ED_EMA_MESSAGE_FLAGS, NULL },
376 { NULL, NULL, 0, -1, NULL }
377 // clang-format on
378};
379
382
385
389static struct ConfigDef MainVars[] = {
390 // clang-format off
391 { "abort_backspace", DT_BOOL, true, 0, NULL,
392 "Hitting backspace against an empty prompt aborts the prompt"
393 },
394 { "abort_key", DT_STRING|D_NOT_EMPTY|D_ON_STARTUP, IP "\007", 0, NULL,
395 "String representation of key to abort prompts"
396 },
397 { "ascii_chars", DT_BOOL, false, 0, NULL,
398 "Use plain ASCII characters, when drawing email threads"
399 },
401 "If a message is missing a character set, assume this character set"
402 },
403 { "attach_format", DT_EXPANDO|D_NOT_EMPTY, IP "%u%D%I %t%4n %T%d %> [%.7m/%.10M, %.6e%<C?, %C>, %s] ", IP &AttachFormatDef, NULL,
404 "printf-like format string for the attachment menu"
405 },
406 { "attach_save_dir", DT_PATH|D_PATH_DIR, IP "./", 0, NULL,
407 "Default directory where attachments are saved"
408 },
409 { "attach_save_without_prompting", DT_BOOL, false, 0, NULL,
410 "If true, then don't prompt to save"
411 },
412 { "attach_sep", DT_STRING, IP "\n", 0, NULL,
413 "Separator to add between saved/printed/piped attachments"
414 },
415 { "attach_split", DT_BOOL, true, 0, NULL,
416 "Save/print/pipe tagged messages individually"
417 },
418 { "auto_edit", DT_BOOL, false, 0, NULL,
419 "Skip the initial compose menu and edit the email"
420 },
421 { "auto_tag", DT_BOOL, false, 0, NULL,
422 "Automatically apply actions to all tagged messages"
423 },
424 { "beep", DT_BOOL, true, 0, NULL,
425 "Make a noise when an error occurs"
426 },
427 { "beep_new", DT_BOOL, false, 0, NULL,
428 "Make a noise when new mail arrives"
429 },
430 { "bounce", DT_QUAD, MUTT_ASKYES, 0, NULL,
431 "Confirm before bouncing a message"
432 },
433 { "braille_friendly", DT_BOOL, false, 0, NULL,
434 "Move the cursor to the beginning of the line"
435 },
437 "Default character set for displaying text on screen"
438 },
439 { "collapse_flagged", DT_BOOL, true, 0, NULL,
440 "Prevent the collapse of threads with flagged emails"
441 },
442 { "collapse_unread", DT_BOOL, true, 0, NULL,
443 "Prevent the collapse of threads with unread emails"
444 },
445 { "color_directcolor", DT_BOOL|D_ON_STARTUP, false, 0, NULL,
446 "Use 24bit colors (aka truecolor aka directcolor)"
447 },
448 { "config_charset", DT_STRING, 0, 0, charset_validator,
449 "Character set that the config files are in"
450 },
451 { "confirm_append", DT_BOOL, true, 0, NULL,
452 "Confirm before appending emails to a mailbox"
453 },
454 { "confirm_create", DT_BOOL, true, 0, NULL,
455 "Confirm before creating a new mailbox"
456 },
457 { "copy_decode_weed", DT_BOOL, false, 0, NULL,
458 "Controls whether to weed headers when copying or saving emails"
459 },
460 { "count_alternatives", DT_BOOL, false, 0, NULL,
461 "Recurse inside multipart/alternatives while counting attachments"
462 },
463 { "crypt_chars", DT_MBTABLE, IP "SPsK ", 0, NULL,
464 "User-configurable crypto flags: signed, encrypted etc."
465 },
466 { "date_format", DT_STRING|D_NOT_EMPTY, IP "!%a, %b %d, %Y at %I:%M:%S%p %Z", 0, NULL,
467 "strftime format string for the `%d` expando"
468 },
469 { "debug_file", DT_PATH|D_PATH_FILE, IP "~/.neomuttdebug", 0, NULL,
470 "File to save debug logs"
471 },
472 { "debug_level", DT_NUMBER, 0, 0, debug_level_validator,
473 "Logging level for debug logs"
474 },
475 { "default_hook", DT_STRING, IP "~f %s !~P | (~P ~C %s)", 0, NULL,
476 "Pattern to use for hooks that only have a simple regex"
477 },
478 { "delete", DT_QUAD, MUTT_ASKYES, 0, NULL,
479 "Really delete messages, when the mailbox is closed"
480 },
481 { "delete_untag", DT_BOOL, true, 0, NULL,
482 "Untag messages when they are marked for deletion"
483 },
484 { "digest_collapse", DT_BOOL, true, 0, NULL,
485 "Hide the subparts of a multipart/digest"
486 },
487 { "duplicate_threads", DT_BOOL, true, 0, NULL,
488 "Highlight messages with duplicated message IDs"
489 },
490 { "editor", DT_STRING|D_NOT_EMPTY|D_STRING_COMMAND, 0, 0, NULL,
491 "External command to use as an email editor"
492 },
493 { "flag_chars", DT_MBTABLE, IP "*!DdrONon- ", 0, NULL,
494 "User-configurable index flags: tagged, new, etc"
495 },
496 { "flag_safe", DT_BOOL, false, 0, NULL,
497 "Protect flagged messages from deletion"
498 },
499 { "folder", DT_STRING|D_STRING_MAILBOX, IP "~/Mail", 0, NULL,
500 "Base folder for a set of mailboxes"
501 },
502 { "force_name", DT_BOOL, false, 0, NULL,
503 "Save outgoing mail in a folder of their name"
504 },
505 { "forward_decode", DT_BOOL, true, 0, NULL,
506 "Decode the message when forwarding it"
507 },
508 { "forward_quote", DT_BOOL, false, 0, NULL,
509 "Automatically quote a forwarded message using `$indent_string`"
510 },
511 { "from", DT_ADDRESS, 0, 0, NULL,
512 "Default 'From' address to use, if isn't otherwise set"
513 },
514 { "from_chars", DT_MBTABLE, 0, 0, NULL,
515 "User-configurable index flags: to address, cc address, etc"
516 },
517 { "gecos_mask", DT_REGEX, IP "^[^,]*", 0, NULL,
518 "Regex for parsing GECOS field of /etc/passwd"
519 },
520 { "header", DT_BOOL, false, 0, NULL,
521 "Include the message headers in the reply email (Weed applies)"
522 },
523 { "hide_limited", DT_BOOL, false, 0, NULL,
524 "Don't indicate hidden messages, in the thread tree"
525 },
526 { "hide_missing", DT_BOOL, true, 0, NULL,
527 "Don't indicate missing messages, in the thread tree"
528 },
529 { "hide_thread_subject", DT_BOOL, true, 0, NULL,
530 "Hide subjects that are similar to that of the parent message"
531 },
532 { "hide_top_limited", DT_BOOL, false, 0, NULL,
533 "Don't indicate hidden top message, in the thread tree"
534 },
535 { "hide_top_missing", DT_BOOL, true, 0, NULL,
536 "Don't indicate missing top message, in the thread tree"
537 },
538 { "honor_disposition", DT_BOOL, false, 0, NULL,
539 "Don't display MIME parts inline if they have a disposition of 'attachment'"
540 },
541 { "hostname", DT_STRING, 0, 0, NULL,
542 "Fully-qualified domain name of this machine"
543 },
544 { "implicit_auto_view", DT_BOOL, false, 0, NULL,
545 "Display MIME attachments inline if a 'copiousoutput' mailcap entry exists"
546 },
547 { "include_encrypted", DT_BOOL, false, 0, NULL,
548 "Whether to include encrypted content when replying"
549 },
550 { "include_only_first", DT_BOOL, false, 0, NULL,
551 "Only include the first attachment when replying"
552 },
553 { "indent_string", DT_EXPANDO, IP "> ", IP IndexFormatDefNoPadding, NULL,
554 "String used to indent 'reply' text"
555 },
556 { "index_format", DT_EXPANDO|D_NOT_EMPTY, IP "%4C %Z %{%b %d} %-15.15L (%<l?%4l&%4c>) %s", IP &IndexFormatDef, NULL,
557 "printf-like format string for the index menu (emails)"
558 },
559 { "keep_flagged", DT_BOOL, false, 0, NULL,
560 "Don't move flagged messages from `$spool_file` to `$mbox`"
561 },
562 { "local_date_header", DT_BOOL, true, 0, NULL,
563 "Convert the date in the Date header of sent emails into local timezone, UTC otherwise"
564 },
565 { "mail_check", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 5, 0, NULL,
566 "Number of seconds before NeoMutt checks for new mail"
567 },
568 { "mail_check_recent", DT_BOOL, true, 0, NULL,
569 "Notify the user about new mail since the last time the mailbox was opened"
570 },
571 { "mail_check_stats", DT_BOOL, false, 0, NULL,
572 "Periodically check for new mail"
573 },
574 { "mail_check_stats_interval", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 60, 0, NULL,
575 "How often to check for new mail"
576 },
577 { "mailcap_path", DT_SLIST|D_SLIST_SEP_COLON, IP "~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap", 0, NULL,
578 "List of mailcap files (colon-separated)"
579 },
580 { "mailcap_sanitize", DT_BOOL, true, 0, NULL,
581 "Restrict the possible characters in mailcap expandos"
582 },
583 { "mark_old", DT_BOOL, true, 0, NULL,
584 "Mark new emails as old when leaving the mailbox"
585 },
586 { "mbox", DT_STRING|D_STRING_MAILBOX, IP "~/mbox", 0, NULL,
587 "Folder that receives read emails (see Move)"
588 },
589 { "mbox_type", DT_ENUM, MUTT_MBOX, IP &MboxTypeDef, NULL,
590 "Default type for creating new mailboxes"
591 },
592 { "message_cache_clean", DT_BOOL, false, 0, NULL,
593 "(imap/pop) Clean out obsolete entries from the message cache"
594 },
595 { "message_cache_dir", DT_PATH|D_PATH_DIR, 0, 0, NULL,
596 "(imap/pop) Directory for the message cache"
597 },
598 { "message_format", DT_EXPANDO|D_NOT_EMPTY, IP "%s", IP &IndexFormatDef, NULL,
599 "printf-like format string for listing attached messages"
600 },
601 { "meta_key", DT_BOOL, false, 0, NULL,
602 "Interpret 'ALT-x' as 'ESC-x'"
603 },
604 { "mime_forward", DT_QUAD, MUTT_NO, 0, NULL,
605 "Forward a message as a 'message/RFC822' MIME part"
606 },
607 { "mime_forward_rest", DT_QUAD, MUTT_YES, 0, NULL,
608 "Forward all attachments, even if they can't be decoded"
609 },
610 { "move", DT_QUAD, MUTT_NO, 0, NULL,
611 "Move emails from `$spool_file` to `$mbox` when read"
612 },
613 { "narrow_tree", DT_BOOL, false, 0, NULL,
614 "Draw a narrower thread tree in the index"
615 },
616 { "new_mail_command", DT_EXPANDO|D_STRING_COMMAND, 0, IP StatusFormatDefNoPadding, NULL,
617 "External command to run when new mail arrives"
618 },
619 { "pipe_decode", DT_BOOL, false, 0, NULL,
620 "Decode the message when piping it"
621 },
622 { "pipe_decode_weed", DT_BOOL, true, 0, NULL,
623 "Control whether to weed headers when piping an email"
624 },
625 { "pipe_sep", DT_STRING, IP "\n", 0, NULL,
626 "Separator to add between multiple piped messages"
627 },
628 { "pipe_split", DT_BOOL, false, 0, NULL,
629 "Run the pipe command on each message separately"
630 },
631 { "postponed", DT_STRING|D_STRING_MAILBOX, IP "~/postponed", 0, NULL,
632 "Folder to store postponed messages"
633 },
634 { "preferred_languages", DT_SLIST|D_SLIST_SEP_COMMA, 0, 0, NULL,
635 "List of Preferred Languages for multilingual MIME (comma-separated)"
636 },
637 { "print", DT_QUAD, MUTT_ASKNO, 0, NULL,
638 "Confirm before printing a message"
639 },
640 { "print_command", DT_STRING|D_STRING_COMMAND, IP "lpr", 0, NULL,
641 "External command to print a message"
642 },
643 { "print_decode", DT_BOOL, true, 0, NULL,
644 "Decode message before printing it"
645 },
646 { "print_decode_weed", DT_BOOL, true, 0, NULL,
647 "Control whether to weed headers when printing an email"
648 },
649 { "print_split", DT_BOOL, false, 0, NULL,
650 "Print multiple messages separately"
651 },
652 { "quit", DT_QUAD, MUTT_YES, 0, NULL,
653 "Prompt before exiting NeoMutt"
654 },
655 { "quote_regex", DT_REGEX, IP "^([ \t]*[|>:}#])+", 0, NULL,
656 "Regex to match quoted text in a reply"
657 },
658 { "read_only", DT_BOOL, false, 0, NULL,
659 "Open folders in read-only mode"
660 },
661 { "real_name", DT_STRING, 0, 0, NULL,
662 "Real name of the user"
663 },
664 { "record", DT_STRING|D_STRING_MAILBOX, IP "~/sent", 0, NULL,
665 "Folder to save 'sent' messages"
666 },
667 { "reflow_space_quotes", DT_BOOL, true, 0, NULL,
668 "Insert spaces into reply quotes for 'format=flowed' messages"
669 },
670 { "reflow_text", DT_BOOL, true, 0, NULL,
671 "Reformat paragraphs of 'format=flowed' text"
672 },
673 { "reflow_wrap", DT_NUMBER, 78, 0, NULL,
674 "Maximum paragraph width for reformatting 'format=flowed' text"
675 },
676 { "resolve", DT_BOOL, true, 0, NULL,
677 "Move to the next email whenever a command modifies an email"
678 },
679 { "resume_edited_draft_files", DT_BOOL, true, 0, NULL,
680 "Resume editing previously saved draft files"
681 },
682 { "save_address", DT_BOOL, false, 0, NULL,
683 "Use sender's full address as a default save folder"
684 },
685 { "save_empty", DT_BOOL, true, 0, NULL,
686 "(mbox,mmdf) Preserve empty mailboxes"
687 },
688 { "save_name", DT_BOOL, false, 0, NULL,
689 "Save outgoing message to mailbox of recipient's name if it exists"
690 },
691 { "score", DT_BOOL, true, 0, NULL,
692 "Use message scoring"
693 },
694 { "score_threshold_delete", DT_NUMBER, -1, 0, NULL,
695 "Messages with a lower score will be automatically deleted"
696 },
697 { "score_threshold_flag", DT_NUMBER, 9999, 0, NULL,
698 "Messages with a greater score will be automatically flagged"
699 },
700 { "score_threshold_read", DT_NUMBER, -1, 0, NULL,
701 "Messages with a lower score will be automatically marked read"
702 },
703 { "send_charset", DT_SLIST|D_SLIST_SEP_COLON|D_SLIST_ALLOW_EMPTY|D_CHARSET_STRICT, IP "us-ascii:iso-8859-1:utf-8", 0, charset_slist_validator,
704 "Character sets for outgoing mail"
705 },
706 { "shell", DT_STRING|D_STRING_COMMAND, IP "/bin/sh", 0, NULL,
707 "External command to run subshells in"
708 },
709 { "show_multipart_alternative", DT_STRING, 0, 0, multipart_validator,
710 "How to display 'multipart/alternative' MIME parts"
711 },
712 { "simple_search", DT_STRING, IP "~f %s | ~s %s", 0, NULL,
713 "Pattern to search for when search doesn't contain ~'s"
714 },
715 { "size_show_bytes", DT_BOOL, false, 0, NULL,
716 "Show smaller sizes in bytes"
717 },
718 { "size_show_fractions", DT_BOOL, true, 0, NULL,
719 "Show size fractions with a single decimal place"
720 },
721 { "size_show_mb", DT_BOOL, true, 0, NULL,
722 "Show sizes in megabytes for sizes greater than 1 megabyte"
723 },
724 { "size_units_on_left", DT_BOOL, false, 0, NULL,
725 "Show the units as a prefix to the size"
726 },
727 { "sleep_time", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 1, 0, NULL,
728 "Time to pause after certain info messages"
729 },
731 "Sort method for the index"
732 },
734 "Secondary sort method for the index"
735 },
736 { "sort_re", DT_BOOL, true, 0, NULL,
737 "Whether $reply_regex must be matched when not $strict_threads"
738 },
739 { "spool_file", DT_STRING|D_STRING_MAILBOX, 0, 0, NULL,
740 "Inbox"
741 },
742 { "status_chars", DT_MBTABLE, IP "-*%A", 0, NULL,
743 "Indicator characters for the status bar"
744 },
745 { "status_on_top", DT_BOOL, false, 0, NULL,
746 "Display the status bar at the top"
747 },
748 { "strict_threads", DT_BOOL, false, 0, NULL,
749 "Thread messages using 'In-Reply-To' and 'References' headers"
750 },
751 { "suspend", DT_BOOL, true, 0, NULL,
752 "Allow the user to suspend NeoMutt using '^Z'"
753 },
754 { "text_flowed", DT_BOOL, false, 0, NULL,
755 "Generate 'format=flowed' messages"
756 },
757 { "thread_received", DT_BOOL, false, 0, NULL,
758 "Sort threaded messages by their received date"
759 },
760 { "timeout", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 600, 0, NULL,
761 "Time to wait for user input in menus"
762 },
763 { "tmp_dir", DT_PATH|D_PATH_DIR|D_NOT_EMPTY, IP TMPDIR, 0, NULL,
764 "Directory for temporary files"
765 },
766 { "to_chars", DT_MBTABLE, IP " +TCFLR", 0, NULL,
767 "Indicator characters for the 'To' field in the index"
768 },
769 { "trash", DT_STRING|D_STRING_MAILBOX, 0, 0, NULL,
770 "Folder to put deleted emails"
771 },
772 { "ts_enabled", DT_BOOL, false, 0, NULL,
773 "Allow NeoMutt to set the terminal status line and icon"
774 },
775 // L10N: $ts_icon_format default format
776 { "ts_icon_format", DT_EXPANDO|D_L10N_STRING, IP N_("M%<n?AIL&ail>"), IP StatusFormatDefNoPadding, NULL,
777 "printf-like format string for the terminal's icon title"
778 },
779 // L10N: $ts_status_format default format
780 { "ts_status_format", DT_EXPANDO|D_L10N_STRING, IP N_("NeoMutt with %<m?%m messages&no messages>%<n? [%n NEW]>"), IP StatusFormatDefNoPadding, NULL,
781 "printf-like format string for the terminal's status (window title)"
782 },
783 { "use_domain", DT_BOOL, true, 0, NULL,
784 "Qualify local addresses using this domain"
785 },
786 { "use_threads", DT_ENUM, UT_UNSET, IP &UseThreadsTypeDef, NULL,
787 "Whether to use threads for the index"
788 },
789 { "wait_key", DT_BOOL, true, 0, NULL,
790 "Prompt to press a key after running external commands"
791 },
792 { "weed", DT_BOOL, true, 0, NULL,
793 "Filter headers when displaying/forwarding/printing/replying"
794 },
795 { "wrap", DT_NUMBER, 0, 0, NULL,
796 "Width to wrap text in the pager"
797 },
798 { "wrap_search", DT_BOOL, true, 0, NULL,
799 "Wrap around when the search hits the end"
800 },
801
802 { "cursor_overlay", D_INTERNAL_DEPRECATED|DT_BOOL, 0, IP "2020-07-20" },
803 { "escape", D_INTERNAL_DEPRECATED|DT_STRING, 0, IP "2021-03-18" },
804 { "ignore_linear_white_space", D_INTERNAL_DEPRECATED|DT_BOOL, 0, IP "2021-03-18" },
805 { "mixmaster", D_INTERNAL_DEPRECATED|DT_STRING, 0, IP "2024-05-30" },
806 { "mix_entry_format", D_INTERNAL_DEPRECATED|DT_EXPANDO,0, IP "2024-05-30" },
807 { "visual", D_INTERNAL_DEPRECATED|DT_STRING, 0, IP "2021-03-18" },
808
809 { "autoedit", DT_SYNONYM, IP "auto_edit", IP "2021-03-21" },
810 { "confirmappend", DT_SYNONYM, IP "confirm_append", IP "2021-03-21" },
811 { "confirmcreate", DT_SYNONYM, IP "confirm_create", IP "2021-03-21" },
812 { "edit_hdrs", DT_SYNONYM, IP "edit_headers", IP "2021-03-21" },
813 { "forw_decode", DT_SYNONYM, IP "forward_decode", IP "2021-03-21" },
814 { "forw_quote", DT_SYNONYM, IP "forward_quote", IP "2021-03-21" },
815 { "hdr_format", DT_SYNONYM, IP "index_format", IP "2021-03-21" },
816 { "implicit_autoview", DT_SYNONYM, IP "implicit_auto_view", IP "2023-01-25" },
817 { "include_onlyfirst", DT_SYNONYM, IP "include_only_first", IP "2021-03-21" },
818 { "indent_str", DT_SYNONYM, IP "indent_string", IP "2021-03-21" },
819 { "message_cachedir", DT_SYNONYM, IP "message_cache_dir", IP "2023-01-25" },
820 { "mime_fwd", DT_SYNONYM, IP "mime_forward", IP "2021-03-21" },
821 { "msg_format", DT_SYNONYM, IP "message_format", IP "2021-03-21" },
822 { "print_cmd", DT_SYNONYM, IP "print_command", IP "2021-03-21" },
823 { "quote_regexp", DT_SYNONYM, IP "quote_regex", IP "2021-03-21" },
824 { "realname", DT_SYNONYM, IP "real_name", IP "2021-03-21" },
825 { "spoolfile", DT_SYNONYM, IP "spool_file", IP "2021-03-21" },
826 { "tmpdir", DT_SYNONYM, IP "tmp_dir", IP "2023-01-25" },
827 { "xterm_icon", DT_SYNONYM, IP "ts_icon_format", IP "2021-03-21" },
828 { "xterm_set_titles", DT_SYNONYM, IP "ts_enabled", IP "2021-03-21" },
829 { "xterm_title", DT_SYNONYM, IP "ts_status_format", IP "2021-03-21" },
830
831 { "devel_security", DT_BOOL, false, 0, NULL,
832 "Devel feature: Security -- https://github.com/neomutt/neomutt/discussions/4251"
833 },
834
835 { NULL },
836 // clang-format on
837};
838
839#if defined(HAVE_LIBIDN)
843static struct ConfigDef MainVarsIdn[] = {
844 // clang-format off
845 { "idn_decode", DT_BOOL, true, 0, NULL,
846 "(idn) Decode international domain names"
847 },
848 { "idn_encode", DT_BOOL, true, 0, NULL,
849 "(idn) Encode international domain names"
850 },
851 { NULL },
852 // clang-format on
853};
854#endif
855
859static bool config_init_main(struct ConfigSet *cs)
860{
861 bool rc = cs_register_variables(cs, MainVars);
862
863#if defined(HAVE_LIBIDN)
865#endif
866
867 return rc;
868}
869
876static void init_types(struct ConfigSet *cs)
877{
879 CONFIG_INIT_TYPE(cs, Bool);
880 CONFIG_INIT_TYPE(cs, Enum);
882 CONFIG_INIT_TYPE(cs, Long);
883 CONFIG_INIT_TYPE(cs, Mbtable);
884 CONFIG_INIT_TYPE(cs, MyVar);
885 CONFIG_INIT_TYPE(cs, Number);
886 CONFIG_INIT_TYPE(cs, Path);
887 CONFIG_INIT_TYPE(cs, Quad);
890 CONFIG_INIT_TYPE(cs, Sort);
891 CONFIG_INIT_TYPE(cs, String);
892}
893
898static void init_variables(struct ConfigSet *cs)
899{
900 // Define the config variables
902 CONFIG_INIT_VARS(cs, alias);
903#if defined(USE_AUTOCRYPT)
904 CONFIG_INIT_VARS(cs, autocrypt);
905#endif
906 CONFIG_INIT_VARS(cs, browser);
907 CONFIG_INIT_VARS(cs, compose);
908 CONFIG_INIT_VARS(cs, conn);
909 CONFIG_INIT_VARS(cs, email);
910#if defined(USE_HCACHE)
911 CONFIG_INIT_VARS(cs, hcache);
912#endif
913 CONFIG_INIT_VARS(cs, helpbar);
914 CONFIG_INIT_VARS(cs, history);
915 CONFIG_INIT_VARS(cs, imap);
916 CONFIG_INIT_VARS(cs, index);
917 CONFIG_INIT_VARS(cs, maildir);
918 CONFIG_INIT_VARS(cs, mbox);
919 CONFIG_INIT_VARS(cs, menu);
920 CONFIG_INIT_VARS(cs, mh);
921 CONFIG_INIT_VARS(cs, ncrypt);
922 CONFIG_INIT_VARS(cs, nntp);
923#if defined(USE_NOTMUCH)
924 CONFIG_INIT_VARS(cs, notmuch);
925#endif
926 CONFIG_INIT_VARS(cs, pager);
927 CONFIG_INIT_VARS(cs, pattern);
928 CONFIG_INIT_VARS(cs, pop);
929 CONFIG_INIT_VARS(cs, progress);
931 CONFIG_INIT_VARS(cs, sidebar);
932}
933
938void init_config(struct ConfigSet *cs)
939{
940 init_types(cs);
941 init_variables(cs);
942}
GUI display the mailboxes in a side panel.
@ ED_ATT_NUMBER
AttachPtr.num.
Definition attach.h:55
@ ED_ATT_TREE
AttachPtr.tree.
Definition attach.h:56
@ ED_ATT_CHARSET
AttachPtr.body.
Definition attach.h:54
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition buffer.c:161
Convenience wrapper for the config headers.
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[])
Register a set of config items.
Definition set.c:289
#define CSR_ERR_INVALID
Value hasn't been set.
Definition set.h:36
#define CSR_SUCCESS
Action completed successfully.
Definition set.h:33
#define IP
Definition set.h:52
Convenience wrapper for the core headers.
@ ED_MBX_MESSAGE_COUNT
Mailbox.msg_count.
Definition mailbox.h:159
@ ED_MBX_PERCENTAGE
EmailFormatInfo.pager_progress.
Definition mailbox.h:160
@ ED_MBX_MAILBOX_NAME
Mailbox, mailbox_path()
Definition mailbox.h:158
@ MUTT_MBOX
'mbox' Mailbox type
Definition mailbox.h:45
bool mutt_isalnum(int arg)
Wrapper for isalnum(3)
Definition ctype.c:39
Convenience wrapper for the debug headers.
uint8_t ExpandoParserFlags
Flags for expando_parse(), e.g. EP_CONDITIONAL.
Definition definition.h:33
#define EP_CONDITIONAL
Expando is being used as a condition.
Definition definition.h:35
@ ED_ENVELOPE
Envelope ED_ENV_ ExpandoDataEnvelope.
Definition domain.h:42
@ ED_EMAIL
Email ED_EMA_ ExpandoDataEmail.
Definition domain.h:41
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition domain.h:44
@ ED_BODY
Body ED_BOD_ ExpandoDataBody.
Definition domain.h:38
@ ED_MAILBOX
Mailbox ED_MBX_ ExpandoDataMailbox.
Definition domain.h:47
@ ED_ATTACH
Attach ED_ATT_ ExpandoDataAttach.
Definition domain.h:36
@ ED_BOD_DESCRIPTION
Body.description.
Definition body.h:106
@ ED_BOD_CHARSET_CONVERT
Body.type.
Definition body.h:104
@ ED_BOD_DELETED
Body.deleted.
Definition body.h:105
@ ED_BOD_UNLINK
Body.unlink.
Definition body.h:115
@ ED_BOD_FILE_SIZE
Body.filename.
Definition body.h:110
@ ED_BOD_DISPOSITION
Body.disposition.
Definition body.h:107
@ ED_BOD_ATTACH_QUALIFIES
Body.attach_qualifies.
Definition body.h:103
@ ED_BOD_MIME_MAJOR
Body.type, Body.xtype.
Definition body.h:112
@ ED_BOD_TAGGED
Body.tagged.
Definition body.h:114
@ ED_BOD_ATTACH_COUNT
Body.attach_count.
Definition body.h:102
@ ED_BOD_FILE
Body.filename.
Definition body.h:108
@ ED_BOD_MIME_MINOR
Body.subtype.
Definition body.h:113
@ ED_BOD_FILE_DISPOSITION
Body.d_filename.
Definition body.h:109
@ ED_BOD_MIME_ENCODING
Body.encoding.
Definition body.h:111
Structs that make up an email.
@ EMAIL_SORT_LABEL
Sort by the emails label.
Definition sort.h:57
@ EMAIL_SORT_DATE_RECEIVED
Sort by when the message was delivered locally.
Definition sort.h:55
@ EMAIL_SORT_SPAM
Sort by the email's spam score.
Definition sort.h:60
@ EMAIL_SORT_SCORE
Sort by the email's score.
Definition sort.h:58
@ EMAIL_SORT_DATE
Sort by the date the email was sent.
Definition sort.h:54
@ EMAIL_SORT_THREADS
Sort by email threads.
Definition sort.h:62
@ EMAIL_SORT_SUBJECT
Sort by the email's subject.
Definition sort.h:61
@ EMAIL_SORT_FROM
Sort by the email's From field.
Definition sort.h:56
@ EMAIL_SORT_UNSORTED
Sort by the order the messages appear in the mailbox.
Definition sort.h:64
@ EMAIL_SORT_SIZE
Sort by the size of the email.
Definition sort.h:59
@ EMAIL_SORT_TO
Sort by the email's To field.
Definition sort.h:63
@ ED_EMA_DATE_STRF_LOCAL
Email.date_sent.
Definition email.h:143
@ ED_EMA_ATTACHMENT_COUNT
Email, mutt_count_body_parts()
Definition email.h:136
@ ED_EMA_DATE_FORMAT_LOCAL
Email.date_sent.
Definition email.h:141
@ ED_EMA_TAGS_TRANSFORMED
Email.tags, driver_tags_get_transformed()
Definition email.h:156
@ ED_EMA_THREAD_HIDDEN_COUNT
Email.collapsed, Email.num_hidden, ...
Definition email.h:158
@ ED_EMA_DATE_FORMAT
Email.date_sent.
Definition email.h:140
@ ED_EMA_THREAD_TAGS
Email.tags.
Definition email.h:160
@ ED_EMA_TAGS
Email.tags.
Definition email.h:155
@ ED_EMA_SIZE
Body.length.
Definition email.h:152
@ ED_EMA_FLAG_CHARS
Email.deleted, Email.attach_del, ...
Definition email.h:144
@ ED_EMA_THREAD_NUMBER
Email, mutt_messages_in_thread()
Definition email.h:159
@ ED_EMA_TO_CHARS
Email, User_is_recipient()
Definition email.h:161
@ ED_EMA_BODY_CHARACTERS
Body.length.
Definition email.h:137
@ ED_EMA_COMBINED_FLAGS
Email.read, Email.old, thread_is_new(), ...
Definition email.h:138
@ ED_EMA_THREAD_COUNT
Email, mutt_messages_in_thread()
Definition email.h:157
@ ED_EMA_STATUS_FLAGS
Email.deleted, Email.attach_del, ...
Definition email.h:153
@ ED_EMA_NUMBER
Email.msgno.
Definition email.h:150
@ ED_EMA_DATE_STRF
Email.date_sent, Email.zhours, Email.zminutes, Email.zoccident.
Definition email.h:142
@ ED_EMA_FROM_LIST
Envelope.to, Envelope.cc.
Definition email.h:145
@ ED_EMA_SCORE
Email.score.
Definition email.h:151
@ ED_EMA_CRYPTO_FLAGS
Email.security, SecurityFlags.
Definition email.h:139
@ ED_EMA_STRF_RECV_LOCAL
Email.received.
Definition email.h:154
@ ED_EMA_LIST_OR_SAVE_FOLDER
Envelope.to, Envelope.cc, check_for_mailing_list()
Definition email.h:148
@ ED_EMA_INDEX_HOOK
Mailbox, Email, mutt_idxfmt_hook()
Definition email.h:146
@ ED_EMA_LINES
Email.lines.
Definition email.h:147
@ ED_EMA_MESSAGE_FLAGS
Email.tagged, Email.flagged.
Definition email.h:149
@ ED_ENV_SUBJECT
Envelope.subject, Envelope.disp_subj.
Definition envelope.h:116
@ ED_ENV_NEWSGROUP
Envelope.newsgroups.
Definition envelope.h:109
@ ED_ENV_INITIALS
Envelope.from (first)
Definition envelope.h:104
@ ED_ENV_FROM_FULL
Envelope.from (all)
Definition envelope.h:103
@ ED_ENV_X_COMMENT_TO
Envelope.x_comment_to.
Definition envelope.h:123
@ ED_ENV_FROM
Envelope.from (first)
Definition envelope.h:102
@ ED_ENV_LIST_ADDRESS
Envelope.to, Envelope.cc.
Definition envelope.h:105
@ ED_ENV_SPAM
Envelope.spam.
Definition envelope.h:115
@ ED_ENV_SENDER
Envelope, make_from()
Definition envelope.h:113
@ ED_ENV_TO_ALL
Envelope.to (all)
Definition envelope.h:120
@ ED_ENV_X_LABEL
Envelope.x_label.
Definition envelope.h:124
@ ED_ENV_NAME
Envelope.from (first)
Definition envelope.h:108
@ ED_ENV_CC_ALL
Envelope.cc.
Definition envelope.h:100
@ ED_ENV_ORGANIZATION
Envelope.organization.
Definition envelope.h:110
@ ED_ENV_REPLY_TO
Envelope.reply_to.
Definition envelope.h:112
@ ED_ENV_LIST_EMPTY
Envelope.to, Envelope.cc.
Definition envelope.h:106
@ ED_ENV_THREAD_X_LABEL
Envelope.x_label.
Definition envelope.h:118
@ ED_ENV_MESSAGE_ID
Envelope.message_id.
Definition envelope.h:107
@ ED_ENV_SENDER_PLAIN
Envelope, make_from()
Definition envelope.h:114
@ ED_ENV_USERNAME
Envelope.from.
Definition envelope.h:121
@ ED_ENV_THREAD_TREE
Email.tree.
Definition envelope.h:117
@ ED_ENV_TO
Envelope.to, Envelope.cc (first)
Definition envelope.h:119
@ ED_ENV_FIRST_NAME
Envelope.from, Envelope.to, Envelope.cc.
Definition envelope.h:101
Parse Expando string.
const struct Mapping SortMethods[]
Sort methods for '$sort' for the index.
Definition mutt_config.c:87
int sort_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "sort" config variable - Implements ConfigDef::validator() -.
static int multipart_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "show_multipart_alternative" config variable - Implements ConfigDef::validator() -.
int charset_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "charset" config variables - Implements ConfigDef::validator() -.
Definition charset.c:45
int charset_slist_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the multiple "charset" config variables - Implements ConfigDef::validator() -.
Definition charset.c:84
int debug_level_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "debug_level" config variable - Implements ConfigDef::validator() -.
static bool config_init_main(struct ConfigSet *cs)
Register main config variables - Implements module_init_config_t -.
struct ExpandoNode * node_padding_parse(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Padding Expando - Implements ExpandoDefinition::parse() -.
struct ExpandoNode * parse_index_hook(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse an index-hook - Implements ExpandoDefinition::parse() -.
struct ExpandoNode * parse_subject(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Subject Expando - Implements ExpandoDefinition::parse() -.
struct ExpandoNode * parse_index_date_recv_local(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Date Expando - Implements ExpandoDefinition::parse() -.
struct ExpandoNode * parse_index_date_local(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Date Expando - Implements ExpandoDefinition::parse() -.
struct ExpandoNode * parse_index_date(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Date Expando - Implements ExpandoDefinition::parse() -.
struct ExpandoNode * parse_tags_transformed(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Tags-Transformed Expando - Implements ExpandoDefinition::parse() -.
int node_condbool_render(const struct ExpandoNode *node, const struct ExpandoRenderCallback *erc, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Callback for every bool node - Implements ExpandoNode::render() -.
const struct ExpandoDefinition IndexFormatDef[]
Expando definitions.
const struct ExpandoDefinition StatusFormatDef[]
Expando definitions.
Definition config.c:47
GUI manage the main index (list of emails)
Convenience wrapper for the library headers.
#define N_(a)
Definition message.h:32
#define _(a)
Definition message.h:28
static bool send(struct Notify *source, struct Notify *current, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition notify.c:120
char * mutt_strn_dup(const char *begin, size_t len)
Duplicate a sub-string.
Definition string.c:382
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition string.c:660
#define CONFIG_INIT_VARS(CS, NAME)
Definition mutt_config.c:57
static void init_types(struct ConfigSet *cs)
Create the config types.
#define CONFIG_INIT_TYPE(CS, NAME)
Definition mutt_config.c:53
void init_config(struct ConfigSet *cs)
Initialise the config system.
static struct ConfigDef MainVarsIdn[]
IDN Config definitions.
const struct ExpandoDefinition *const StatusFormatDefNoPadding
StatusFormatDefNoPadding - Status format definitions, without padding.
static void init_variables(struct ConfigSet *cs)
Define the config variables.
static const struct ExpandoDefinition *const IndexFormatDefNoPadding
IndexFormatDefNoPadding - Index format definitions, without padding.
static struct ConfigDef MainVars[]
General Config definitions for NeoMutt.
static const struct Mapping SortAuxMethods[]
Sort methods for '$sort_aux' for the index.
Definition mutt_config.c:64
static const struct ExpandoDefinition AttachFormatDef[]
Expando definitions.
NeoMutt Logging.
const struct EnumDef UseThreadsTypeDef
Data for the $use_threads enumeration.
Definition mutt_thread.c:65
Create/manipulate threading in emails.
@ UT_UNSET
Not yet set by user, stick to legacy semantics.
Definition mutt_thread.h:97
const struct EnumDef MboxTypeDef
Data for the $mbox_type enumeration.
Definition mx.c:92
API for mailboxes.
void node_add_child(struct ExpandoNode *node, struct ExpandoNode *child)
Add a child to an ExpandoNode.
Definition node.c:76
void node_free(struct ExpandoNode **ptr)
Free an ExpandoNode and its private data.
Definition node.c:48
@ ENT_CONDBOOL
True/False boolean condition.
Definition node.h:42
struct ExpandoNode * node_conddate_parse(const char *str, int did, int uid, const char **parsed_until, struct ExpandoParseError *err)
Parse a CondDate format string.
struct ExpandoNode * node_container_new(void)
Create a new Container ExpandoNode.
struct ExpandoNode * node_expando_new(struct ExpandoFormat *fmt, int did, int uid)
Create a new Expando ExpandoNode.
struct ExpandoNode * node_expando_parse_enclosure(const char *str, int did, int uid, char terminator, struct ExpandoFormat *fmt, const char **parsed_until, struct ExpandoParseError *err)
Parse an enclosed Expando.
@ MUTT_ASKNO
Ask the user, defaulting to 'No'.
Definition quad.h:40
@ MUTT_NO
User answered 'No', or assume 'No'.
Definition quad.h:38
@ MUTT_ASKYES
Ask the user, defaulting to 'Yes'.
Definition quad.h:41
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
Definition quad.h:39
#define NONULL(x)
Definition string2.h:43
An email address.
Definition address.h:35
String manipulation buffer.
Definition buffer.h:36
const char * name
User-visible name.
Definition set.h:63
Container for lots of config items.
Definition set.h:248
Definition of a format string.
Definition definition.h:43
Formatting information for an Expando.
Definition node.h:53
Basic Expando Node.
Definition node.h:67
int uid
Unique ID, e.g. ED_EMA_SIZE.
Definition node.h:70
struct ExpandoFormat * format
Formatting info.
Definition node.h:72
int(* render)(const struct ExpandoNode *node, const struct ExpandoRenderCallback *erc, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Definition node.h:92
int did
Domain ID, e.g. ED_EMAIL.
Definition node.h:69
const char * text
Node-specific text.
Definition node.h:73
enum ExpandoNodeType type
Type of Node, e.g. ENT_EXPANDO.
Definition node.h:68
Buffer for parsing errors.
Definition parse.h:37
char message[1024]
Error message.
Definition parse.h:38
const char * position
Position of error in original string.
Definition parse.h:39
Parsed Expando trees.
Definition expando.h:41
Mapping between user-readable string and a constant.
Definition mapping.h:33
int value
Integer value.
Definition mapping.h:35
Cached regular expression.
Definition regex3.h:86
String list.
Definition slist.h:37
#define D_SLIST_SEP_COMMA
Slist items are comma-separated.
Definition types.h:110
#define D_CHARSET_SINGLE
Flag for charset_validator to allow only one charset.
Definition types.h:83
#define D_SLIST_SEP_COLON
Slist items are colon-separated.
Definition types.h:111
#define D_INTERNAL_DEPRECATED
Config item shouldn't be used any more.
Definition types.h:87
#define D_STRING_COMMAND
A command.
Definition types.h:98
#define D_SLIST_ALLOW_EMPTY
Slist may be empty.
Definition types.h:115
#define D_L10N_STRING
String can be localised.
Definition types.h:81
#define D_PATH_DIR
Path is a directory.
Definition types.h:102
#define D_CHARSET_STRICT
Flag for charset_validator to use strict char check.
Definition types.h:84
#define D_PATH_FILE
Path is a file.
Definition types.h:103
@ DT_NUMBER
a number
Definition types.h:38
@ DT_SLIST
a list of strings
Definition types.h:42
@ DT_BOOL
boolean option
Definition types.h:32
@ DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
Definition types.h:40
@ DT_SYNONYM
synonym for another variable
Definition types.h:45
@ DT_STRING
a string
Definition types.h:44
@ DT_SORT
sorting methods
Definition types.h:43
@ DT_MBTABLE
multibyte char table
Definition types.h:36
@ DT_ADDRESS
e-mail address
Definition types.h:31
@ DT_EXPANDO
an expando
Definition types.h:34
@ DT_ENUM
an enumeration
Definition types.h:33
@ DT_REGEX
regular expressions
Definition types.h:41
@ DT_PATH
a path to a file/directory
Definition types.h:39
#define D_STRING_MAILBOX
Don't perform path expansions.
Definition types.h:97
#define D_SORT_LAST
Sort flag for -last prefix.
Definition types.h:118
#define D_SORT_REVERSE
Sort flag for -reverse prefix.
Definition types.h:119
#define D_NOT_EMPTY
Empty strings are not allowed.
Definition types.h:79
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition types.h:100
#define D_ON_STARTUP
May only be set at startup.
Definition types.h:78
@ ED_GLO_PADDING_EOL
Padding to end-of-line.
Definition uid.h:38
@ ED_GLO_PADDING_HARD
Hard Padding.
Definition uid.h:39
@ ED_GLO_PADDING_SOFT
Soft Padding.
Definition uid.h:40