NeoMutt  2021-02-05-89-gabe350
Teaching an old dog new tricks
DOXYGEN
mutt_config.c
Go to the documentation of this file.
1 
30 #include "config.h"
31 #include <stddef.h>
32 #include <stdbool.h>
33 #include "mutt/lib.h"
34 #include "address/lib.h"
35 #include "config/lib.h"
36 #include "email/lib.h"
37 #include "core/lib.h"
38 #include "alias/lib.h"
39 #include "gui/lib.h"
40 #include "bcache/lib.h"
41 #include "compose/lib.h"
42 #include "pager/lib.h"
43 #include "browser.h"
44 #include "commands.h"
45 #include "handler.h"
46 #include "hdrline.h"
47 #include "hook.h"
48 #include "init.h"
49 #include "mailcap.h"
50 #include "main.h"
51 #include "mutt_globals.h"
52 #include "mutt_logging.h"
53 #include "mutt_mailbox.h"
54 #include "mutt_menu.h"
55 #include "mutt_thread.h"
56 #include "muttlib.h"
57 #include "mx.h"
58 #include "progress.h"
59 #include "recvattach.h"
60 #include "recvcmd.h"
61 #include "remailer.h"
62 #include "rfc3676.h"
63 #include "score.h"
64 #include "sort.h"
65 #include "status.h"
66 
67 #define CONFIG_INIT_TYPE(CS, NAME) \
68  extern const struct ConfigSetType cst_##NAME; \
69  cs_register_type(CS, &cst_##NAME)
70 
71 #define CONFIG_INIT_VARS(CS, NAME) \
72  bool config_init_##NAME(struct ConfigSet *cs); \
73  config_init_##NAME(CS)
74 
75 /* These options are deprecated */
76 char *C_Escape = NULL;
78 
82 const struct Mapping SortAuxMethods[] = {
83  // clang-format off
84  { "date", SORT_DATE },
85  { "date-sent", SORT_DATE },
86  { "threads", SORT_DATE },
87  { "date-received", SORT_RECEIVED },
88  { "from", SORT_FROM },
89  { "label", SORT_LABEL },
90  { "unsorted", SORT_ORDER },
91  { "mailbox-order", SORT_ORDER },
92  { "score", SORT_SCORE },
93  { "size", SORT_SIZE },
94  { "spam", SORT_SPAM },
95  { "subject", SORT_SUBJECT },
96  { "to", SORT_TO },
97  { NULL, 0 },
98  // clang-format on
99 };
100 
104 const struct Mapping SortMethods[] = {
105  // clang-format off
106  { "date", SORT_DATE },
107  { "date-sent", SORT_DATE },
108  { "date-received", SORT_RECEIVED },
109  { "from", SORT_FROM },
110  { "label", SORT_LABEL },
111  { "unsorted", SORT_ORDER },
112  { "mailbox-order", SORT_ORDER },
113  { "score", SORT_SCORE },
114  { "size", SORT_SIZE },
115  { "spam", SORT_SPAM },
116  { "subject", SORT_SUBJECT },
117  { "threads", SORT_THREADS },
118  { "to", SORT_TO },
119  { NULL, 0 },
120  // clang-format on
121 };
122 
126 const struct Mapping SortBrowserMethods[] = {
127  // clang-format off
128  { "alpha", SORT_SUBJECT },
129  { "count", SORT_COUNT },
130  { "date", SORT_DATE },
131  { "desc", SORT_DESC },
132  { "new", SORT_UNREAD },
133  { "unread", SORT_UNREAD },
134  { "size", SORT_SIZE },
135  { "unsorted", SORT_ORDER },
136  { NULL, 0 },
137  // clang-format on
138 };
139 
143 int multipart_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef,
144  intptr_t value, struct Buffer *err)
145 {
146  if (value == 0)
147  return CSR_SUCCESS;
148 
149  const char *str = (const char *) value;
150 
151  if (mutt_str_equal(str, "inline") || mutt_str_equal(str, "info"))
152  return CSR_SUCCESS;
153 
154  mutt_buffer_printf(err, _("Invalid value for option %s: %s"), cdef->name, str);
155  return CSR_ERR_INVALID;
156 }
157 
161 int pager_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef,
162  intptr_t value, struct Buffer *err)
163 {
164  if (CurrentMenu == MENU_PAGER)
165  {
166  mutt_buffer_printf(err, _("Option %s may not be set or reset from the pager"),
167  cdef->name);
168  return CSR_ERR_INVALID;
169  }
170 
171  return CSR_SUCCESS;
172 }
173 
177 int reply_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef,
178  intptr_t value, struct Buffer *err)
179 {
180  if (pager_validator(cs, cdef, value, err) != CSR_SUCCESS)
181  return CSR_ERR_INVALID;
182 
183  if (!OptAttachMsg)
184  return CSR_SUCCESS;
185 
186  mutt_buffer_printf(err, _("Option %s may not be set when in attach-message mode"),
187  cdef->name);
188  return CSR_ERR_INVALID;
189 }
190 
191 struct ConfigDef MainVars[] = {
192  // clang-format off
193  { "abort_backspace", DT_BOOL, &C_AbortBackspace, true, 0, NULL,
194  "Hitting backspace against an empty prompt aborts the prompt"
195  },
196  { "abort_key", DT_STRING|DT_NOT_EMPTY, &C_AbortKey, IP "\007", 0, NULL,
197  "String representation of key to abort prompts"
198  },
199  { "arrow_cursor", DT_BOOL|R_MENU, &C_ArrowCursor, false, 0, NULL,
200  "Use an arrow '->' instead of highlighting in the index"
201  },
202  { "arrow_string", DT_STRING|DT_NOT_EMPTY, &C_ArrowString, IP "->", 0, NULL,
203  "Use an custom string for arrow_cursor"
204  },
205  { "ascii_chars", DT_BOOL|R_INDEX|R_PAGER, &C_AsciiChars, false, 0, NULL,
206  "Use plain ASCII characters, when drawing email threads"
207  },
208  { "ask_bcc", DT_BOOL, &C_AskBcc, false, 0, NULL,
209  "Ask the user for the blind-carbon-copy recipients"
210  },
211  { "ask_cc", DT_BOOL, &C_AskCc, false, 0, NULL,
212  "Ask the user for the carbon-copy recipients"
213  },
214  { "assumed_charset", DT_STRING, &C_AssumedCharset, 0, 0, charset_validator,
215  "If a message is missing a character set, assume this character set"
216  },
217  { "attach_format", DT_STRING|DT_NOT_EMPTY, &C_AttachFormat, IP "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] ", 0, NULL,
218  "printf-like format string for the attachment menu"
219  },
220  { "attach_save_dir", DT_PATH|DT_PATH_DIR, &C_AttachSaveDir, IP "./", 0, NULL,
221  "Default directory where attachments are saved"
222  },
223  { "attach_save_without_prompting", DT_BOOL, &C_AttachSaveWithoutPrompting, false, 0, NULL,
224  "If true, then don't prompt to save"
225  },
226  { "attach_sep", DT_STRING, &C_AttachSep, IP "\n", 0, NULL,
227  "Separator to add between saved/printed/piped attachments"
228  },
229  { "attach_split", DT_BOOL, &C_AttachSplit, true, 0, NULL,
230  "Save/print/pipe tagged messages individually"
231  },
232  { "attribution", DT_STRING, &C_Attribution, IP "On %d, %n wrote:", 0, NULL,
233  "Message to start a reply, 'On DATE, PERSON wrote:'"
234  },
235  { "attribution_locale", DT_STRING, &C_AttributionLocale, 0, 0, NULL,
236  "Locale for dates in the attribution message"
237  },
238  { "auto_subscribe", DT_BOOL, &C_AutoSubscribe, false, 0, NULL,
239  "Automatically check if the user is subscribed to a mailing list"
240  },
241  { "auto_tag", DT_BOOL, &C_AutoTag, false, 0, NULL,
242  "Automatically apply actions to all tagged messages"
243  },
244  { "auto_edit", DT_BOOL, &C_AutoEdit, false, 0, NULL,
245  "Skip the initial compose menu and edit the email"
246  },
247  { "beep", DT_BOOL, &C_Beep, true, 0, NULL,
248  "Make a noise when an error occurs"
249  },
250  { "beep_new", DT_BOOL, &C_BeepNew, false, 0, NULL,
251  "Make a noise when new mail arrives"
252  },
253  { "bounce", DT_QUAD, &C_Bounce, MUTT_ASKYES, 0, NULL,
254  "Confirm before bouncing a message"
255  },
256  { "braille_friendly", DT_BOOL, &C_BrailleFriendly, false, 0, NULL,
257  "Move the cursor to the beginning of the line"
258  },
259  { "browser_abbreviate_mailboxes", DT_BOOL, &C_BrowserAbbreviateMailboxes, true, 0, NULL,
260  "Abbreviate mailboxes using '~' and '=' in the browser"
261  },
263  "Default character set for displaying text on screen"
264  },
265  { "collapse_flagged", DT_BOOL, &C_CollapseFlagged, true, 0, NULL,
266  "Prevent the collapse of threads with flagged emails"
267  },
268  { "collapse_unread", DT_BOOL, &C_CollapseUnread, true, 0, NULL,
269  "Prevent the collapse of threads with unread emails"
270  },
271  { "config_charset", DT_STRING, &C_ConfigCharset, 0, 0, charset_validator,
272  "Character set that the config files are in"
273  },
274  { "confirm_append", DT_BOOL, &C_ConfirmAppend, true, 0, NULL,
275  "Confirm before appending emails to a mailbox"
276  },
277  { "confirm_create", DT_BOOL, &C_ConfirmCreate, true, 0, NULL,
278  "Confirm before creating a new mailbox"
279  },
280  { "copy_decode_weed", DT_BOOL, &C_CopyDecodeWeed, false, 0, NULL,
281  "Controls whether to weed headers when copying or saving emails"
282  },
283  { "count_alternatives", DT_BOOL, &C_CountAlternatives, false, 0, NULL,
284  "Recurse inside multipart/alternatives while counting attachments"
285  },
286  { "crypt_chars", DT_MBTABLE|R_INDEX|R_PAGER, &C_CryptChars, IP "SPsK ", 0, NULL,
287  "User-configurable crypto flags: signed, encrypted etc."
288  },
289  { "date_format", DT_STRING|DT_NOT_EMPTY|R_MENU, &C_DateFormat, IP "!%a, %b %d, %Y at %I:%M:%S%p %Z", 0, NULL,
290  "strftime format string for the `%d` expando"
291  },
292  { "debug_file", DT_PATH|DT_PATH_FILE, &C_DebugFile, IP "~/.neomuttdebug", 0, NULL,
293  "File to save debug logs"
294  },
295  { "debug_level", DT_NUMBER, &C_DebugLevel, 0, 0, level_validator,
296  "Logging level for debug logs"
297  },
298  { "default_hook", DT_STRING, &C_DefaultHook, IP "~f %s !~P | (~P ~C %s)", 0, NULL,
299  "Pattern to use for hooks that only have a simple regex"
300  },
301  { "delete", DT_QUAD, &C_Delete, MUTT_ASKYES, 0, NULL,
302  "Really delete messages, when the mailbox is closed"
303  },
304  { "delete_untag", DT_BOOL, &C_DeleteUntag, true, 0, NULL,
305  "Untag messages when they are marked for deletion"
306  },
307  { "digest_collapse", DT_BOOL, &C_DigestCollapse, true, 0, NULL,
308  "Hide the subparts of a multipart/digest"
309  },
310  { "display_filter", DT_STRING|DT_COMMAND|R_PAGER, &C_DisplayFilter, 0, 0, NULL,
311  "External command to pre-process an email before display"
312  },
313  { "duplicate_threads", DT_BOOL|R_RESORT|R_RESORT_INIT|R_INDEX, &C_DuplicateThreads, true, 0, pager_validator,
314  "Highlight messages with duplicated message IDs"
315  },
316  { "editor", DT_STRING|DT_NOT_EMPTY|DT_COMMAND, &C_Editor, IP "vi", 0, NULL,
317  "External command to use as an email editor"
318  },
319  { "flag_chars", DT_MBTABLE|R_INDEX|R_PAGER, &C_FlagChars, IP "*!DdrONon- ", 0, NULL,
320  "User-configurable index flags: tagged, new, etc"
321  },
322  { "flag_safe", DT_BOOL, &C_FlagSafe, false, 0, NULL,
323  "Protect flagged messages from deletion"
324  },
325  { "folder", DT_STRING|DT_MAILBOX, &C_Folder, IP "~/Mail", 0, NULL,
326  "Base folder for a set of mailboxes"
327  },
328  { "folder_format", DT_STRING|DT_NOT_EMPTY|R_MENU, &C_FolderFormat, IP "%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %i", 0, NULL,
329  "printf-like format string for the browser's display of folders"
330  },
331  { "force_name", DT_BOOL, &C_ForceName, false, 0, NULL,
332  "Save outgoing mail in a folder of their name"
333  },
334  { "forward_attachments", DT_QUAD, &C_ForwardAttachments, MUTT_ASKYES, 0, NULL,
335  "Forward attachments when forwarding a message"
336  },
337  { "forward_decode", DT_BOOL, &C_ForwardDecode, true, 0, NULL,
338  "Decode the message when forwarding it"
339  },
340  { "forward_quote", DT_BOOL, &C_ForwardQuote, false, 0, NULL,
341  "Automatically quote a forwarded message using `$indent_string`"
342  },
343  { "from", DT_ADDRESS, &C_From, 0, 0, NULL,
344  "Default 'From' address to use, if isn't otherwise set"
345  },
346  { "from_chars", DT_MBTABLE|R_INDEX|R_PAGER, &C_FromChars, 0, 0, NULL,
347  "User-configurable index flags: to address, cc address, etc"
348  },
349  { "gecos_mask", DT_REGEX, &C_GecosMask, IP "^[^,]*", 0, NULL,
350  "Regex for parsing GECOS field of /etc/passwd"
351  },
352  { "header", DT_BOOL, &C_Header, false, 0, NULL,
353  "Include the message headers in the reply email (Weed applies)"
354  },
355  { "hidden_tags", DT_SLIST|SLIST_SEP_COMMA, &C_HiddenTags, IP "unread,draft,flagged,passed,replied,attachment,signed,encrypted", 0, NULL,
356  "Tags that shouldn't be displayed on screen"
357  },
358  { "hide_limited", DT_BOOL|R_TREE|R_INDEX, &C_HideLimited, false, 0, NULL,
359  "Don't indicate hidden messages, in the thread tree"
360  },
361  { "hide_missing", DT_BOOL|R_TREE|R_INDEX, &C_HideMissing, true, 0, NULL,
362  "Don't indicate missing messages, in the thread tree"
363  },
364  { "hide_thread_subject", DT_BOOL|R_TREE|R_INDEX, &C_HideThreadSubject, true, 0, NULL,
365  "Hide subjects that are similar to that of the parent message"
366  },
367  { "hide_top_limited", DT_BOOL|R_TREE|R_INDEX, &C_HideTopLimited, false, 0, NULL,
368  "Don't indicate hidden top message, in the thread tree"
369  },
370  { "hide_top_missing", DT_BOOL|R_TREE|R_INDEX, &C_HideTopMissing, true, 0, NULL,
371  "Don't indicate missing top message, in the thread tree"
372  },
373  { "honor_disposition", DT_BOOL, &C_HonorDisposition, false, 0, NULL,
374  "Don't display MIME parts inline if they have a disposition of 'attachment'"
375  },
376  { "hostname", DT_STRING, &C_Hostname, 0, 0, NULL,
377  "Fully-qualified domain name of this machine"
378  },
379 #ifdef HAVE_LIBIDN
380  { "idn_decode", DT_BOOL|R_MENU, &C_IdnDecode, true, 0, NULL,
381  "(idn) Decode international domain names"
382  },
383  { "idn_encode", DT_BOOL|R_MENU, &C_IdnEncode, true, 0, NULL,
384  "(idn) Encode international domain names"
385  },
386 #endif
387  { "implicit_autoview", DT_BOOL, &C_ImplicitAutoview, false, 0, NULL,
388  "Display MIME attachments inline if a 'copiousoutput' mailcap entry exists"
389  },
390  { "include_encrypted", DT_BOOL, &C_IncludeEncrypted, false, 0, NULL,
391  "Whether to include encrypted content when replying"
392  },
393  { "include_only_first", DT_BOOL, &C_IncludeOnlyFirst, false, 0, NULL,
394  "Only include the first attachment when replying"
395  },
396  { "indent_string", DT_STRING, &C_IndentString, IP "> ", 0, NULL,
397  "String used to indent 'reply' text"
398  },
399  { "index_format", DT_STRING|DT_NOT_EMPTY|R_INDEX|R_PAGER, &C_IndexFormat, IP "%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s", 0, NULL,
400  "printf-like format string for the index menu (emails)"
401  },
402  { "keep_flagged", DT_BOOL, &C_KeepFlagged, false, 0, NULL,
403  "Don't move flagged messages from `$spool_file` to `$mbox`"
404  },
405  { "mail_check", DT_NUMBER|DT_NOT_NEGATIVE, &C_MailCheck, 5, 0, NULL,
406  "Number of seconds before NeoMutt checks for new mail"
407  },
408  { "mail_check_recent", DT_BOOL, &C_MailCheckRecent, true, 0, NULL,
409  "Notify the user about new mail since the last time the mailbox was opened"
410  },
411  { "mail_check_stats", DT_BOOL, &C_MailCheckStats, false, 0, NULL,
412  "Periodically check for new mail"
413  },
414  { "mail_check_stats_interval", DT_NUMBER|DT_NOT_NEGATIVE, &C_MailCheckStatsInterval, 60, 0, NULL,
415  "How often to check for new mail"
416  },
417  { "mailcap_path", DT_SLIST|SLIST_SEP_COLON, &C_MailcapPath, IP "~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap", 0, NULL,
418  "Colon-separated list of mailcap files"
419  },
420  { "mailcap_sanitize", DT_BOOL, &C_MailcapSanitize, true, 0, NULL,
421  "Restrict the possible characters in mailcap expandos"
422  },
423  { "mark_old", DT_BOOL|R_INDEX|R_PAGER, &C_MarkOld, true, 0, NULL,
424  "Mark new emails as old when leaving the mailbox"
425  },
426  { "markers", DT_BOOL|R_PAGER_FLOW, &C_Markers, true, 0, NULL,
427  "Display a '+' at the beginning of wrapped lines in the pager"
428  },
429  { "mask", DT_REGEX|DT_REGEX_MATCH_CASE|DT_REGEX_ALLOW_NOT|DT_REGEX_NOSUB, &C_Mask, IP "!^\\.[^.]", 0, NULL,
430  "Only display files/dirs matching this regex in the browser"
431  },
432  { "mbox", DT_STRING|DT_MAILBOX|R_INDEX|R_PAGER, &C_Mbox, IP "~/mbox", 0, NULL,
433  "Folder that receives read emails (see Move)"
434  },
435  { "mbox_type", DT_ENUM, &C_MboxType, MUTT_MBOX, IP &MboxTypeDef, NULL,
436  "Default type for creating new mailboxes"
437  },
438  { "menu_context", DT_NUMBER|DT_NOT_NEGATIVE, &C_MenuContext, 0, 0, NULL,
439  "Number of lines of overlap when changing pages in the index"
440  },
441  { "menu_move_off", DT_BOOL, &C_MenuMoveOff, true, 0, NULL,
442  "Allow the last menu item to move off the bottom of the screen"
443  },
444  { "menu_scroll", DT_BOOL, &C_MenuScroll, false, 0, NULL,
445  "Scroll the menu/index by one line, rather than a page"
446  },
447  { "message_cache_clean", DT_BOOL, &C_MessageCacheClean, false, 0, NULL,
448  "(imap/pop) Clean out obsolete entries from the message cache"
449  },
450  { "message_cachedir", DT_PATH|DT_PATH_DIR, &C_MessageCachedir, 0, 0, NULL,
451  "(imap/pop) Directory for the message cache"
452  },
453  { "message_format", DT_STRING|DT_NOT_EMPTY, &C_MessageFormat, IP "%s", 0, NULL,
454  "printf-like format string for listing attached messages"
455  },
456  { "meta_key", DT_BOOL, &C_MetaKey, false, 0, NULL,
457  "Interpret 'ALT-x' as 'ESC-x'"
458  },
459  { "mime_forward", DT_QUAD, &C_MimeForward, MUTT_NO, 0, NULL,
460  "Forward a message as a 'message/RFC822' MIME part"
461  },
462  { "mime_forward_rest", DT_QUAD, &C_MimeForwardRest, MUTT_YES, 0, NULL,
463  "Forward all attachments, even if they can't be decoded"
464  },
465 #ifdef MIXMASTER
466  { "mix_entry_format", DT_STRING|DT_NOT_EMPTY, &C_MixEntryFormat, IP "%4n %c %-16s %a", 0, NULL,
467  "(mixmaster) printf-like format string for the mixmaster chain"
468  },
469  { "mixmaster", DT_STRING|DT_COMMAND, &C_Mixmaster, IP MIXMASTER, 0, NULL,
470  "(mixmaster) External command to route a mixmaster message"
471  },
472 #endif
473  { "move", DT_QUAD, &C_Move, MUTT_NO, 0, NULL,
474  "Move emails from `$spool_file` to `$mbox` when read"
475  },
476  { "narrow_tree", DT_BOOL|R_TREE|R_INDEX, &C_NarrowTree, false, 0, NULL,
477  "Draw a narrower thread tree in the index"
478  },
479  { "net_inc", DT_NUMBER|DT_NOT_NEGATIVE, &C_NetInc, 10, 0, NULL,
480  "(socket) Update the progress bar after this many KB sent/received (0 to disable)"
481  },
482  { "new_mail_command", DT_STRING|DT_COMMAND, &C_NewMailCommand, 0, 0, NULL,
483  "External command to run when new mail arrives"
484  },
485  { "pager", DT_STRING|DT_COMMAND, &C_Pager, IP "builtin", 0, NULL,
486  "External command for viewing messages, or 'builtin' to use NeoMutt's"
487  },
488  { "pager_format", DT_STRING|R_PAGER, &C_PagerFormat, IP "-%Z- %C/%m: %-20.20n %s%* -- (%P)", 0, NULL,
489  "printf-like format string for the pager's status bar"
490  },
491  { "pipe_decode", DT_BOOL, &C_PipeDecode, false, 0, NULL,
492  "Decode the message when piping it"
493  },
494  { "pipe_decode_weed", DT_BOOL, &C_PipeDecodeWeed, true, 0, NULL,
495  "Control whether to weed headers when piping an email"
496  },
497  { "pipe_sep", DT_STRING, &C_PipeSep, IP "\n", 0, NULL,
498  "Separator to add between multiple piped messages"
499  },
500  { "pipe_split", DT_BOOL, &C_PipeSplit, false, 0, NULL,
501  "Run the pipe command on each message separately"
502  },
503  { "postponed", DT_STRING|DT_MAILBOX|R_INDEX, &C_Postponed, IP "~/postponed", 0, NULL,
504  "Folder to store postponed messages"
505  },
506  { "preferred_languages", DT_SLIST|SLIST_SEP_COMMA, &C_PreferredLanguages, 0, 0, NULL,
507  "Preferred languages for multilingual MIME"
508  },
509  { "print", DT_QUAD, &C_Print, MUTT_ASKNO, 0, NULL,
510  "Confirm before printing a message"
511  },
512  { "print_command", DT_STRING|DT_COMMAND, &C_PrintCommand, IP "lpr", 0, NULL,
513  "External command to print a message"
514  },
515  { "print_decode", DT_BOOL, &C_PrintDecode, true, 0, NULL,
516  "Decode message before printing it"
517  },
518  { "print_decode_weed", DT_BOOL, &C_PrintDecodeWeed, true, 0, NULL,
519  "Control whether to weed headers when printing an email "
520  },
521  { "print_split", DT_BOOL, &C_PrintSplit, false, 0, NULL,
522  "Print multiple messages separately"
523  },
524  { "prompt_after", DT_BOOL, &C_PromptAfter, true, 0, NULL,
525  "Pause after running an external pager"
526  },
527  { "quit", DT_QUAD, &C_Quit, MUTT_YES, 0, NULL,
528  "Prompt before exiting NeoMutt"
529  },
530  { "quote_regex", DT_REGEX|R_PAGER, &C_QuoteRegex, IP "^([ \t]*[|>:}#])+", 0, NULL,
531  "Regex to match quoted text in a reply"
532  },
533  { "read_inc", DT_NUMBER|DT_NOT_NEGATIVE, &C_ReadInc, 10, 0, NULL,
534  "Update the progress bar after this many records read (0 to disable)"
535  },
536  { "read_only", DT_BOOL, &C_ReadOnly, false, 0, NULL,
537  "Open folders in read-only mode"
538  },
539  { "real_name", DT_STRING|R_INDEX|R_PAGER, &C_RealName, 0, 0, NULL,
540  "Real name of the user"
541  },
542  { "record", DT_STRING|DT_MAILBOX, &C_Record, IP "~/sent", 0, NULL,
543  "Folder to save 'sent' messages"
544  },
545  { "reflow_space_quotes", DT_BOOL, &C_ReflowSpaceQuotes, true, 0, NULL,
546  "Insert spaces into reply quotes for 'format=flowed' messages"
547  },
548  { "reflow_text", DT_BOOL, &C_ReflowText, true, 0, NULL,
549  "Reformat paragraphs of 'format=flowed' text"
550  },
551  { "reflow_wrap", DT_NUMBER, &C_ReflowWrap, 78, 0, NULL,
552  "Maximum paragraph width for reformatting 'format=flowed' text"
553  },
554  { "reply_regex", DT_REGEX|R_INDEX|R_RESORT, &C_ReplyRegex, IP "^((re|aw|sv)(\\[[0-9]+\\])*:[ \t]*)*", 0, reply_validator,
555  "Regex to match message reply subjects like 're: '"
556  },
557  { "resolve", DT_BOOL, &C_Resolve, true, 0, NULL,
558  "Move to the next email whenever a command modifies an email"
559  },
560  { "resume_draft_files", DT_BOOL, &C_ResumeDraftFiles, false, 0, NULL,
561  "Process draft files like postponed messages"
562  },
563  { "resume_edited_draft_files", DT_BOOL, &C_ResumeEditedDraftFiles, true, 0, NULL,
564  "Resume editing previously saved draft files"
565  },
566  { "reverse_alias", DT_BOOL|R_INDEX|R_PAGER, &C_ReverseAlias, false, 0, NULL,
567  "Display the alias in the index, rather than the message's sender"
568  },
569  { "rfc2047_parameters", DT_BOOL, &C_Rfc2047Parameters, false, 0, NULL,
570  "Decode RFC2047-encoded MIME parameters"
571  },
572  { "save_address", DT_BOOL, &C_SaveAddress, false, 0, NULL,
573  "Use sender's full address as a default save folder"
574  },
575  { "save_empty", DT_BOOL, &C_SaveEmpty, true, 0, NULL,
576  "(mbox,mmdf) Preserve empty mailboxes"
577  },
578  { "save_name", DT_BOOL, &C_SaveName, false, 0, NULL,
579  "Save outgoing message to mailbox of recipient's name if it exists"
580  },
581  { "score", DT_BOOL, &C_Score, true, 0, NULL,
582  "Use message scoring"
583  },
584  { "score_threshold_delete", DT_NUMBER, &C_ScoreThresholdDelete, -1, 0, NULL,
585  "Messages with a lower score will be automatically deleted"
586  },
587  { "score_threshold_flag", DT_NUMBER, &C_ScoreThresholdFlag, 9999, 0, NULL,
588  "Messages with a greater score will be automatically flagged"
589  },
590  { "score_threshold_read", DT_NUMBER, &C_ScoreThresholdRead, -1, 0, NULL,
591  "Messages with a lower score will be automatically marked read"
592  },
593  { "send_charset", DT_STRING|DT_CHARSET_STRICT, &C_SendCharset, IP "us-ascii:iso-8859-1:utf-8", 0, charset_validator,
594  "Character sets for outgoing mail"
595  },
596  { "shell", DT_STRING|DT_COMMAND, &C_Shell, IP "/bin/sh", 0, NULL,
597  "External command to run subshells in"
598  },
599  { "show_multipart_alternative", DT_STRING, &C_ShowMultipartAlternative, 0, 0, multipart_validator,
600  "How to display 'multipart/alternative' MIME parts"
601  },
602  { "simple_search", DT_STRING, &C_SimpleSearch, IP "~f %s | ~s %s", 0, NULL,
603  "Pattern to search for when search doesn't contain ~'s"
604  },
605  { "size_show_bytes", DT_BOOL|R_MENU, &C_SizeShowBytes, false, 0, NULL,
606  "Show smaller sizes in bytes"
607  },
608  { "size_show_fractions", DT_BOOL|R_MENU, &C_SizeShowFractions, true, 0, NULL,
609  "Show size fractions with a single decimal place"
610  },
611  { "size_show_mb", DT_BOOL|R_MENU, &C_SizeShowMb, true, 0, NULL,
612  "Show sizes in megabytes for sizes greater than 1 megabyte"
613  },
614  { "size_units_on_left", DT_BOOL|R_MENU, &C_SizeUnitsOnLeft, false, 0, NULL,
615  "Show the units as a prefix to the size"
616  },
617  { "sleep_time", DT_NUMBER|DT_NOT_NEGATIVE, &C_SleepTime, 1, 0, NULL,
618  "Time to pause after certain info messages"
619  },
621  "Sort method for the index"
622  },
624  "Secondary sort method for the index"
625  },
627  "Sort method for the browser"
628  },
630  "Sort method for the sidebar"
631  },
632  { "spam_separator", DT_STRING, &C_SpamSeparator, IP ",", 0, NULL,
633  "Separator for multiple spam headers"
634  },
635  { "spool_file", DT_STRING|DT_MAILBOX, &C_SpoolFile, 0, 0, NULL,
636  "Inbox"
637  },
638  { "status_chars", DT_MBTABLE|R_INDEX|R_PAGER, &C_StatusChars, IP "-*%A", 0, NULL,
639  "Indicator characters for the status bar"
640  },
641  { "status_format", DT_STRING|R_INDEX|R_PAGER, &C_StatusFormat, IP "-%r-NeoMutt: %D [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---", 0, NULL,
642  "printf-like format string for the index's status line"
643  },
644  { "status_on_top", DT_BOOL|R_REFLOW, &C_StatusOnTop, false, 0, NULL,
645  "Display the status bar at the top"
646  },
647  { "strict_threads", DT_BOOL|R_RESORT|R_RESORT_INIT|R_INDEX, &C_StrictThreads, false, 0, pager_validator,
648  "Thread messages using 'In-Reply-To' and 'References' headers"
649  },
650  { "suspend", DT_BOOL, &C_Suspend, true, 0, NULL,
651  "Allow the user to suspend NeoMutt using '^Z'"
652  },
653  { "text_flowed", DT_BOOL, &C_TextFlowed, false, 0, NULL,
654  "Generate 'format=flowed' messages"
655  },
656  { "thread_received", DT_BOOL|R_RESORT|R_RESORT_INIT|R_INDEX, &C_ThreadReceived, false, 0, pager_validator,
657  "Sort threaded messages by their received date"
658  },
659  { "time_inc", DT_NUMBER|DT_NOT_NEGATIVE, &C_TimeInc, 0, 0, NULL,
660  "Frequency of progress bar updates (milliseconds)"
661  },
662  { "timeout", DT_NUMBER|DT_NOT_NEGATIVE, &C_Timeout, 600, 0, NULL,
663  "Time to wait for user input in menus"
664  },
665  { "tmpdir", DT_PATH|DT_PATH_DIR|DT_NOT_EMPTY, &C_Tmpdir, IP TMPDIR, 0, NULL,
666  "Directory for temporary files"
667  },
668  { "toggle_quoted_show_levels", DT_NUMBER|DT_NOT_NEGATIVE, &C_ToggleQuotedShowLevels, 0, 0, NULL,
669  "Number of quote levels to show with toggle-quoted"
670  },
671  { "to_chars", DT_MBTABLE|R_INDEX|R_PAGER, &C_ToChars, IP " +TCFLR", 0, NULL,
672  "Indicator characters for the 'To' field in the index"
673  },
674  { "trash", DT_STRING|DT_MAILBOX, &C_Trash, 0, 0, NULL,
675  "Folder to put deleted emails"
676  },
677  { "ts_enabled", DT_BOOL|R_INDEX|R_PAGER, &C_TsEnabled, false, 0, NULL,
678  "Allow NeoMutt to set the terminal status line and icon"
679  },
680  { "ts_icon_format", DT_STRING|R_INDEX|R_PAGER, &C_TsIconFormat, IP "M%?n?AIL&ail?", 0, NULL,
681  "printf-like format string for the terminal's icon title"
682  },
683  { "ts_status_format", DT_STRING|R_INDEX|R_PAGER, &C_TsStatusFormat, IP "NeoMutt with %?m?%m messages&no messages?%?n? [%n NEW]?", 0, NULL,
684  "printf-like format string for the terminal's status (window title)"
685  },
686  { "use_domain", DT_BOOL, &C_UseDomain, true, 0, NULL,
687  "Qualify local addresses using this domain"
688  },
689  { "visual", DT_STRING|DT_COMMAND, &C_Visual, IP "vi", 0, NULL,
690  "Editor to use when '~v' is given in the built-in editor"
691  },
692  { "wait_key", DT_BOOL, &C_WaitKey, true, 0, NULL,
693  "Prompt to press a key after running external commands"
694  },
695  { "weed", DT_BOOL, &C_Weed, true, 0, NULL,
696  "Filter headers when displaying/forwarding/printing/replying"
697  },
698  { "wrap", DT_NUMBER|R_PAGER_FLOW, &C_Wrap, 0, 0, NULL,
699  "Width to wrap text in the pager"
700  },
701  { "wrap_search", DT_BOOL, &C_WrapSearch, true, 0, NULL,
702  "Wrap around when the search hits the end"
703  },
704  { "write_bcc", DT_BOOL, &C_WriteBcc, false, 0, NULL,
705  "Write out the 'Bcc' field when preparing to send a mail"
706  },
707  { "write_inc", DT_NUMBER|DT_NOT_NEGATIVE, &C_WriteInc, 10, 0, NULL,
708  "Update the progress bar after this many records written (0 to disable)"
709  },
710 
711  { "escape", DT_DEPRECATED|DT_STRING, &C_Escape, IP "~" },
712  { "ignore_linear_white_space", DT_DEPRECATED|DT_BOOL, &C_IgnoreLinearWhiteSpace, false },
713 
714  { "askbcc", DT_SYNONYM, NULL, IP "ask_bcc", },
715  { "askcc", DT_SYNONYM, NULL, IP "ask_cc", },
716  { "autoedit", DT_SYNONYM, NULL, IP "auto_edit", },
717  { "confirmappend", DT_SYNONYM, NULL, IP "confirm_append", },
718  { "confirmcreate", DT_SYNONYM, NULL, IP "confirm_create", },
719  { "edit_hdrs", DT_SYNONYM, NULL, IP "edit_headers", },
720  { "forw_decode", DT_SYNONYM, NULL, IP "forward_decode", },
721  { "forw_quote", DT_SYNONYM, NULL, IP "forward_quote", },
722  { "hdr_format", DT_SYNONYM, NULL, IP "index_format", },
723  { "include_onlyfirst", DT_SYNONYM, NULL, IP "include_only_first", },
724  { "indent_str", DT_SYNONYM, NULL, IP "indent_string", },
725  { "mime_fwd", DT_SYNONYM, NULL, IP "mime_forward", },
726  { "msg_format", DT_SYNONYM, NULL, IP "message_format", },
727  { "print_cmd", DT_SYNONYM, NULL, IP "print_command", },
728  { "quote_regexp", DT_SYNONYM, NULL, IP "quote_regex", },
729  { "realname", DT_SYNONYM, NULL, IP "real_name", },
730  { "reply_regexp", DT_SYNONYM, NULL, IP "reply_regex", },
731  { "spoolfile", DT_SYNONYM, NULL, IP "spool_file", },
732  { "xterm_icon", DT_SYNONYM, NULL, IP "ts_icon_format", },
733  { "xterm_set_titles", DT_SYNONYM, NULL, IP "ts_enabled", },
734  { "xterm_title", DT_SYNONYM, NULL, IP "ts_status_format", },
735 
736  { NULL, 0, NULL, 0, 0, NULL, NULL },
737  // clang-format on
738 };
739 
743 static bool config_init_main(struct ConfigSet *cs)
744 {
745  return cs_register_variables(cs, MainVars, 0);
746 }
747 
754 static void init_types(struct ConfigSet *cs)
755 {
756  CONFIG_INIT_TYPE(cs, address);
757  CONFIG_INIT_TYPE(cs, bool);
758  CONFIG_INIT_TYPE(cs, enum);
759  CONFIG_INIT_TYPE(cs, long);
760  CONFIG_INIT_TYPE(cs, mbtable);
761  CONFIG_INIT_TYPE(cs, number);
762  CONFIG_INIT_TYPE(cs, path);
763  CONFIG_INIT_TYPE(cs, quad);
764  CONFIG_INIT_TYPE(cs, regex);
765  CONFIG_INIT_TYPE(cs, slist);
766  CONFIG_INIT_TYPE(cs, sort);
767  CONFIG_INIT_TYPE(cs, string);
768 }
769 
774 static void init_variables(struct ConfigSet *cs)
775 {
776  // Define the config variables
777  config_init_main(cs);
778  CONFIG_INIT_VARS(cs, alias);
779 #ifdef USE_AUTOCRYPT
780  CONFIG_INIT_VARS(cs, autocrypt);
781 #endif
782  CONFIG_INIT_VARS(cs, compose);
783  CONFIG_INIT_VARS(cs, conn);
784 #ifdef USE_HCACHE
785  CONFIG_INIT_VARS(cs, hcache);
786 #endif
787  CONFIG_INIT_VARS(cs, helpbar);
788  CONFIG_INIT_VARS(cs, history);
789  CONFIG_INIT_VARS(cs, index);
790 #ifdef USE_IMAP
791  CONFIG_INIT_VARS(cs, imap);
792 #endif
793  CONFIG_INIT_VARS(cs, maildir);
794  CONFIG_INIT_VARS(cs, mbox);
795  CONFIG_INIT_VARS(cs, ncrypt);
796 #ifdef USE_NNTP
797  CONFIG_INIT_VARS(cs, nntp);
798 #endif
799 #ifdef USE_NOTMUCH
800  CONFIG_INIT_VARS(cs, notmuch);
801 #endif
802  CONFIG_INIT_VARS(cs, pager);
803  CONFIG_INIT_VARS(cs, pattern);
804 #ifdef USE_POP
805  CONFIG_INIT_VARS(cs, pop);
806 #endif
807  CONFIG_INIT_VARS(cs, send);
808 #ifdef USE_SIDEBAR
809  CONFIG_INIT_VARS(cs, sidebar);
810 #endif
811 }
812 
818 struct ConfigSet *init_config(size_t size)
819 {
820  struct ConfigSet *cs = cs_new(size);
821 
822  init_types(cs);
823  init_variables(cs);
824 
825  return cs;
826 }
lib.h
C_ReflowWrap
short C_ReflowWrap
Config: Maximum paragraph width for reformatting 'format=flowed' text.
Definition: rfc3676.c:47
IP
#define IP
Definition: set.h:54
rfc3676.h
C_ToChars
struct MbTable * C_ToChars
Config: Indicator characters for the 'To' field in the index.
Definition: hdrline.c:67
DT_QUAD
#define DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
Definition: types.h:37
C_StatusChars
struct MbTable * C_StatusChars
Config: Indicator characters for the status bar.
Definition: status.c:49
C_AttributionLocale
WHERE char * C_AttributionLocale
Config: Locale for dates in the attribution message.
Definition: mutt_globals.h:86
DT_REGEX_ALLOW_NOT
#define DT_REGEX_ALLOW_NOT
Regex can begin with '!'.
Definition: regex3.h:37
C_AskCc
WHERE bool C_AskCc
Config: Ask the user for the carbon-copy recipients.
Definition: mutt_globals.h:135
DT_MAILBOX
#define DT_MAILBOX
Don't perform path expansions.
Definition: types.h:48
C_Header
WHERE bool C_Header
Config: Include the message headers in the reply email (Weed applies)
Definition: mutt_globals.h:149
C_PipeSplit
bool C_PipeSplit
Config: Run the pipe command on each message separately.
Definition: commands.c:88
C_Timeout
WHERE short C_Timeout
Config: Time to wait for user input in menus.
Definition: mutt_globals.h:115
DT_STRING
#define DT_STRING
a string
Definition: types.h:41
C_SaveEmpty
WHERE bool C_SaveEmpty
Config: (mbox,mmdf) Preserve empty mailboxes.
Definition: mutt_globals.h:158
lib.h
R_TREE
#define R_TREE
Redraw the thread tree.
Definition: types.h:71
SORT_SPAM
@ SORT_SPAM
Sort by the email's spam score.
Definition: sort2.h:59
SLIST_SEP_COMMA
#define SLIST_SEP_COMMA
Definition: slist.h:34
C_AutoSubscribe
bool C_AutoSubscribe
Config: Automatically check if the user is subscribed to a mailing list.
Definition: globals.c:35
C_MimeForward
WHERE unsigned char C_MimeForward
Config: Forward a message as a 'message/RFC822' MIME part.
Definition: mutt_globals.h:127
C_ScoreThresholdDelete
short C_ScoreThresholdDelete
Config: Messages with a lower score will be automatically deleted.
Definition: score.c:49
SORT_TO
@ SORT_TO
Sort by the email's To field.
Definition: sort2.h:53
C_SizeUnitsOnLeft
WHERE bool C_SizeUnitsOnLeft
Config: Show the units as a prefix to the size.
Definition: mutt_globals.h:163
_
#define _(a)
Definition: message.h:28
C_Hostname
WHERE char * C_Hostname
Config: Fully-qualified domain name of this machine.
Definition: mutt_globals.h:91
R_RESORT_INIT
#define R_RESORT_INIT
Resort from scratch.
Definition: types.h:70
SORT_THREADS
@ SORT_THREADS
Sort by email threads.
Definition: sort2.h:51
C_RealName
WHERE char * C_RealName
Config: Real name of the user.
Definition: mutt_globals.h:105
C_FromChars
struct MbTable * C_FromChars
Config: User-configurable index flags: to address, cc address, etc.
Definition: hdrline.c:66
DT_DEPRECATED
#define DT_DEPRECATED
Config item shouldn't be used any more.
Definition: types.h:79
C_SortBrowser
short C_SortBrowser
Config: Sort method for the browser.
Definition: browser.c:74
C_HiddenTags
struct Slist * C_HiddenTags
Config: Tags that shouldn't be displayed on screen.
Definition: tags.c:36
Mapping::value
int value
Definition: mapping.h:34
C_TextFlowed
WHERE bool C_TextFlowed
Config: Generate 'format=flowed' messages.
Definition: mutt_globals.h:166
Buffer
String manipulation buffer.
Definition: buffer.h:33
remailer.h
level_validator
int level_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "debug_level" config variable - Implements ConfigDef::validator()
Definition: mutt_logging.c:302
C_DeleteUntag
WHERE bool C_DeleteUntag
Config: Untag messages when they are marked for deletion.
Definition: mutt_globals.h:145
DT_REGEX
#define DT_REGEX
regular expressions
Definition: types.h:38
C_Visual
WHERE char * C_Visual
Config: Editor to use when '~v' is given in the built-in editor.
Definition: mutt_globals.h:112
C_BeepNew
WHERE bool C_BeepNew
Config: Make a noise when new mail arrives.
Definition: mutt_globals.h:139
C_IncludeOnlyFirst
bool C_IncludeOnlyFirst
Config: Only include the first attachment when replying.
Definition: handler.c:68
C_DefaultHook
char * C_DefaultHook
Config: Pattern to use for hooks that only have a simple regex.
Definition: hook.c:58
C_PipeDecode
bool C_PipeDecode
Config: Decode the message when piping it.
Definition: commands.c:86
C_SleepTime
WHERE short C_SleepTime
Config: Time to pause after certain info messages.
Definition: mutt_globals.h:114
config_init_main
static bool config_init_main(struct ConfigSet *cs)
Register main config variables - Implements module_init_config_t.
Definition: mutt_config.c:743
CSR_SUCCESS
#define CSR_SUCCESS
Action completed successfully.
Definition: set.h:35
C_Attribution
WHERE char * C_Attribution
Config: Message to start a reply, "On DATE, PERSON wrote:".
Definition: mutt_globals.h:85
C_BrailleFriendly
WHERE bool C_BrailleFriendly
Config: Move the cursor to the beginning of the line.
Definition: mutt_globals.h:140
handler.h
C_SpamSeparator
char * C_SpamSeparator
Config: Separator for multiple spam headers.
Definition: globals.c:39
R_MENU
#define R_MENU
Redraw all menus.
Definition: types.h:74
C_FolderFormat
char * C_FolderFormat
Config: printf-like format string for the browser's display of folders.
Definition: browser.c:73
C_AttachSplit
bool C_AttachSplit
Config: Save/print/pipe tagged messages individually.
Definition: recvattach.c:75
SORT_COUNT
@ SORT_COUNT
Sort by number of emails in a folder.
Definition: sort2.h:60
DT_NOT_NEGATIVE
#define DT_NOT_NEGATIVE
Negative numbers are not allowed.
Definition: types.h:47
DT_PATH_DIR
#define DT_PATH_DIR
Path is a directory.
Definition: types.h:53
mailcap.h
C_NarrowTree
bool C_NarrowTree
Config: Draw a narrower thread tree in the index.
Definition: mutt_thread.c:53
MUTT_YES
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
Definition: quad.h:40
C_MessageCachedir
char * C_MessageCachedir
Config: (imap/pop) Directory for the message cache.
Definition: bcache.c:48
mutt_globals.h
C_UseDomain
WHERE bool C_UseDomain
Config: Qualify local addresses using this domain.
Definition: mutt_globals.h:168
C_StatusFormat
WHERE char * C_StatusFormat
Config: printf-like format string for the index's status line.
Definition: mutt_globals.h:109
C_AttachSep
char * C_AttachSep
Config: Separator to add between saved/printed/piped attachments.
Definition: recvattach.c:74
C_ReverseAlias
bool C_ReverseAlias
Config: Display the alias in the index, rather than the message's sender.
Definition: sort.c:52
C_ReadOnly
WHERE bool C_ReadOnly
Config: Open folders in read-only mode.
Definition: mutt_globals.h:154
C_IdnDecode
bool C_IdnDecode
C_PrintSplit
bool C_PrintSplit
Config: Print multiple messages separately.
Definition: commands.c:90
cs_register_variables
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[], uint32_t flags)
Register a set of config items.
Definition: set.c:286
C_IgnoreLinearWhiteSpace
bool C_IgnoreLinearWhiteSpace
Definition: mutt_config.c:77
DT_SORT_LAST
#define DT_SORT_LAST
Sort flag for -last prefix.
Definition: sort2.h:37
C_CollapseFlagged
bool C_CollapseFlagged
Config: Prevent the collapse of threads with flagged emails.
Definition: mutt_thread.c:45
lib.h
C_PrintDecode
bool C_PrintDecode
Config: Decode message before printing it.
Definition: commands.c:89
C_TsIconFormat
WHERE char * C_TsIconFormat
Config: printf-like format string for the terminal's icon title.
Definition: mutt_globals.h:111
DT_CHARSET_SINGLE
#define DT_CHARSET_SINGLE
Flag for charset_validator to allow only one charset.
Definition: charset.h:28
lib.h
C_MailcapPath
WHERE struct Slist * C_MailcapPath
Config: Colon-separated list of mailcap files.
Definition: mutt_globals.h:95
C_MessageCacheClean
bool C_MessageCacheClean
Config: (imap/pop) Clean out obsolete entries from the message cache.
Definition: bcache.c:44
R_REFLOW
#define R_REFLOW
Reflow window layout and full redraw.
Definition: types.h:72
C_ScoreThresholdFlag
short C_ScoreThresholdFlag
Config: Messages with a greater score will be automatically flagged.
Definition: score.c:50
C_ForwardAttachments
WHERE unsigned char C_ForwardAttachments
Config: Forward attachments when forwarding a message.
Definition: mutt_globals.h:126
DT_MBTABLE
#define DT_MBTABLE
multibyte char table
Definition: types.h:34
C_ForwardQuote
WHERE bool C_ForwardQuote
Config: Automatically quote a forwarded message using $indent_string
Definition: mutt_globals.h:148
C_Editor
WHERE char * C_Editor
Config: External command to use as an email editor.
Definition: mutt_globals.h:90
C_AutoTag
WHERE bool C_AutoTag
Config: Automatically apply actions to all tagged messages.
Definition: mutt_globals.h:137
mutt_str_equal
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:871
C_Score
WHERE bool C_Score
Config: Use message scoring.
Definition: mutt_globals.h:159
Mapping
Mapping between user-readable string and a constant.
Definition: mapping.h:31
lib.h
C_KeepFlagged
bool C_KeepFlagged
Config: Don't move flagged messages from $spool_file to $mbox
Definition: mx.c:89
C_SaveAddress
WHERE bool C_SaveAddress
Config: Use sender's full address as a default save folder.
Definition: mutt_globals.h:157
C_AttachSaveDir
char * C_AttachSaveDir
Config: Default directory where attachments are saved.
Definition: recvattach.c:72
C_Escape
char * C_Escape
Definition: mutt_config.c:76
C_Suspend
WHERE bool C_Suspend
Config: Allow the user to suspend NeoMutt using '^Z'.
Definition: mutt_globals.h:165
C_AbortKey
WHERE char * C_AbortKey
Config: String representation of key to abort prompts.
Definition: mutt_globals.h:84
C_ThreadReceived
bool C_ThreadReceived
Config: Sort threaded messages by their received date.
Definition: mutt_thread.c:56
C_AttachSaveWithoutPrompting
char * C_AttachSaveWithoutPrompting
Config: If true, then don't prompt to save.
Definition: recvattach.c:73
SortMethods
const struct Mapping SortMethods[]
Sort methods for '$sort' for the index.
Definition: mutt_config.c:104
DT_SORT_REVERSE
#define DT_SORT_REVERSE
Sort flag for -reverse prefix.
Definition: sort2.h:38
reply_validator
int reply_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "reply_regex" config variable - Implements ConfigDef::validator()
Definition: mutt_config.c:177
C_PrintDecodeWeed
WHERE bool C_PrintDecodeWeed
Config: Control whether to weed headers when printing an email.
Definition: mutt_globals.h:153
ConfigDef::name
const char * name
User-visible name.
Definition: set.h:63
C_ReflowText
bool C_ReflowText
Config: Reformat paragraphs of 'format=flowed' text.
Definition: handler.c:70
cs_new
struct ConfigSet * cs_new(size_t size)
Create a new Config Set.
Definition: set.c:166
send
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:107
C_ReplyRegex
struct Regex * C_ReplyRegex
Config: Regex to match message reply subjects like "re: ".
Definition: globals.c:37
C_ConfigCharset
WHERE char * C_ConfigCharset
Config: Character set that the config files are in.
Definition: mutt_globals.h:88
init.h
C_ScoreThresholdRead
short C_ScoreThresholdRead
Config: Messages with a lower score will be automatically marked read.
Definition: score.c:51
C_MailCheckStatsInterval
short C_MailCheckStatsInterval
Config: How often to check for new mail.
Definition: mutt_mailbox.c:53
DT_SYNONYM
#define DT_SYNONYM
synonym for another variable
Definition: types.h:42
C_MimeForwardRest
unsigned char C_MimeForwardRest
Config: Forward all attachments, even if they can't be decoded.
Definition: recvcmd.c:60
C_Wrap
WHERE short C_Wrap
Config: Width to wrap text in the pager.
Definition: mutt_globals.h:116
lib.h
C_DigestCollapse
bool C_DigestCollapse
Config: Hide the subparts of a multipart/digest.
Definition: recvattach.c:76
DT_NUMBER
#define DT_NUMBER
a number
Definition: types.h:35
muttlib.h
C_Folder
WHERE char * C_Folder
Config: Base folder for a set of mailboxes.
Definition: mutt_globals.h:96
C_IdnEncode
bool C_IdnEncode
C_Bounce
WHERE unsigned char C_Bounce
Config: Confirm before bouncing a message.
Definition: mutt_globals.h:124
SORT_SUBJECT
@ SORT_SUBJECT
Sort by the email's subject.
Definition: sort2.h:48
C_Shell
WHERE char * C_Shell
Config: External command to run subshells in.
Definition: mutt_globals.h:106
OptAttachMsg
WHERE bool OptAttachMsg
(pseudo) used by attach-message
Definition: options.h:31
C_QuoteRegex
WHERE struct Regex * C_QuoteRegex
Config: Regex to match quoted text in a reply.
Definition: mutt_globals.h:120
R_RESORT_SUB
#define R_RESORT_SUB
Resort subthreads.
Definition: types.h:69
SORT_SCORE
@ SORT_SCORE
Sort by the email's score.
Definition: sort2.h:54
C_CountAlternatives
WHERE bool C_CountAlternatives
Config: Recurse inside multipart/alternatives while counting attachments.
Definition: mutt_globals.h:144
mutt_menu.h
lib.h
lib.h
CONFIG_INIT_VARS
#define CONFIG_INIT_VARS(CS, NAME)
Definition: mutt_config.c:71
C_Beep
WHERE bool C_Beep
Config: Make a noise when an error occurs.
Definition: mutt_globals.h:138
CurrentMenu
WHERE enum MenuType CurrentMenu
Current Menu, e.g. MENU_PAGER.
Definition: mutt_globals.h:77
C_SaveName
bool C_SaveName
Config: Save outgoing message to mailbox of recipient's name if it exists.
Definition: hook.c:60
init_variables
static void init_variables(struct ConfigSet *cs)
Define the config variables.
Definition: mutt_config.c:774
C_CryptChars
struct MbTable * C_CryptChars
Config: User-configurable crypto flags: signed, encrypted etc.
Definition: hdrline.c:64
DT_SORT
#define DT_SORT
sorting methods
Definition: types.h:40
C_SizeShowMb
WHERE bool C_SizeShowMb
Config: Show sizes in megabytes for sizes greater than 1 megabyte.
Definition: mutt_globals.h:162
C_TsEnabled
WHERE bool C_TsEnabled
Config: Allow NeoMutt to set the terminal status line and icon.
Definition: mutt_globals.h:167
C_IndexFormat
WHERE char * C_IndexFormat
Config: printf-like format string for the index menu (emails)
Definition: mutt_globals.h:92
C_ArrowCursor
WHERE bool C_ArrowCursor
Config: Use an arrow '->' instead of highlighting in the index.
Definition: mutt_globals.h:131
C_ForwardDecode
WHERE bool C_ForwardDecode
Config: Decode the message when forwarding it.
Definition: mutt_globals.h:147
C_HideMissing
bool C_HideMissing
Config: Don't indicate missing messages, in the thread tree.
Definition: mutt_thread.c:49
DT_PATH
#define DT_PATH
a path to a file/directory
Definition: types.h:36
R_RESORT
#define R_RESORT
Resort the mailbox.
Definition: types.h:68
C_Trash
char * C_Trash
Config: Folder to put deleted emails.
Definition: mx.c:92
R_PAGER_FLOW
#define R_PAGER_FLOW
Reflow line_info and redraw the pager menu.
Definition: types.h:67
SortBrowserMethods
const struct Mapping SortBrowserMethods[]
Sort methods for the folder/dir browser.
Definition: mutt_config.c:126
C_AsciiChars
WHERE bool C_AsciiChars
Config: Use plain ASCII characters, when drawing email threads.
Definition: mutt_globals.h:133
MUTT_NO
@ MUTT_NO
User answered 'No', or assume 'No'.
Definition: quad.h:39
SORT_UNREAD
@ SORT_UNREAD
Sort by the number of unread emails.
Definition: sort2.h:61
C_Tmpdir
char * C_Tmpdir
Config: Directory for temporary files.
Definition: file.c:56
C_SizeShowFractions
WHERE bool C_SizeShowFractions
Config: Show size fractions with a single decimal place.
Definition: mutt_globals.h:161
C_FlagSafe
WHERE bool C_FlagSafe
Config: Protect flagged messages from deletion.
Definition: mutt_globals.h:146
C_SendCharset
char * C_SendCharset
Config: Character sets for outgoing mail.
Definition: globals.c:38
C_PrintCommand
WHERE char * C_PrintCommand
Config: External command to print a message.
Definition: mutt_globals.h:103
C_MenuMoveOff
bool C_MenuMoveOff
Config: Allow the last menu item to move off the bottom of the screen.
Definition: menu.c:57
C_AutoEdit
WHERE bool C_AutoEdit
Config: Skip the initial compose menu and edit the email.
Definition: mutt_globals.h:136
DT_NOT_EMPTY
#define DT_NOT_EMPTY
Empty strings are not allowed.
Definition: types.h:46
SORT_ALPHA
@ SORT_ALPHA
Required by makedoc.c.
Definition: sort2.h:47
recvcmd.h
mutt_mailbox.h
C_GecosMask
struct Regex * C_GecosMask
Config: Regex for parsing GECOS field of /etc/passwd.
Definition: muttlib.c:70
C_NetInc
short C_NetInc
Config: (socket) Update the progress bar after this many KB sent/received (0 to disable)
Definition: progress.c:46
C_ToggleQuotedShowLevels
WHERE int C_ToggleQuotedShowLevels
Config: Number of quote levels to show with toggle-quoted.
Definition: mutt_globals.h:121
C_Quit
WHERE unsigned char C_Quit
Config: Prompt before exiting NeoMutt.
Definition: mutt_globals.h:129
SORT_ORDER
@ SORT_ORDER
Sort by the order the messages appear in the mailbox.
Definition: sort2.h:50
C_SimpleSearch
WHERE char * C_SimpleSearch
Config: Pattern to search for when search doesn't contain ~'s.
Definition: mutt_globals.h:107
C_Rfc2047Parameters
bool C_Rfc2047Parameters
Config: Decode RFC2047-encoded MIME parameters.
Definition: rfc2231.c:49
C_DisplayFilter
char * C_DisplayFilter
Config: External command to pre-process an email before display.
Definition: commands.c:85
DT_BOOL
#define DT_BOOL
boolean option
Definition: types.h:30
mutt_logging.h
init_types
static void init_types(struct ConfigSet *cs)
Create the config types.
Definition: mutt_config.c:754
C_Record
WHERE char * C_Record
Config: Folder to save 'sent' messages.
Definition: mutt_globals.h:98
C_SizeShowBytes
WHERE bool C_SizeShowBytes
Config: Show smaller sizes in bytes.
Definition: mutt_globals.h:160
C_PipeDecodeWeed
WHERE bool C_PipeDecodeWeed
Config: Control whether to weed headers when piping an email.
Definition: mutt_globals.h:152
C_MixEntryFormat
char * C_MixEntryFormat
Config: (mixmaster) printf-like format string for the mixmaster chain.
Definition: remailer.c:58
C_TimeInc
short C_TimeInc
Config: Frequency of progress bar updates (milliseconds)
Definition: progress.c:43
lib.h
pager_validator
int pager_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Check for config variables that can't be set from the pager - Implements ConfigDef::validator()
Definition: mutt_config.c:161
CONFIG_INIT_TYPE
#define CONFIG_INIT_TYPE(CS, NAME)
Definition: mutt_config.c:67
init_config
struct ConfigSet * init_config(size_t size)
Initialise the config system.
Definition: mutt_config.c:818
C_Mixmaster
char * C_Mixmaster
Config: (mixmaster) External command to route a mixmaster message.
Definition: remailer.c:59
C_ReflowSpaceQuotes
bool C_ReflowSpaceQuotes
Config: Insert spaces into reply quotes for 'format=flowed' messages.
Definition: rfc3676.c:46
C_ResumeEditedDraftFiles
bool C_ResumeEditedDraftFiles
Config: Resume editing previously saved draft files.
Definition: main.c:98
C_Weed
bool C_Weed
Config: Filter headers when displaying/forwarding/printing/replying.
Definition: globals.c:40
SORT_RECEIVED
@ SORT_RECEIVED
Sort by when the message were delivered locally.
Definition: sort2.h:52
DT_REGEX_NOSUB
#define DT_REGEX_NOSUB
Do not report what was matched (REG_NOSUB)
Definition: regex3.h:38
C_MailcapSanitize
bool C_MailcapSanitize
Config: Restrict the possible characters in mailcap expandos.
Definition: mailcap.c:48
C_ReadInc
short C_ReadInc
Config: Update the progress bar after this many records read (0 to disable)
Definition: progress.c:44
mutt_thread.h
C_DebugLevel
short C_DebugLevel
Config: Logging level for debug logs.
Definition: mutt_logging.c:48
C_MailCheck
short C_MailCheck
Config: Number of seconds before NeoMutt checks for new mail.
Definition: mutt_mailbox.c:51
C_NewMailCommand
WHERE char * C_NewMailCommand
Config: External command to run when new mail arrives.
Definition: mutt_globals.h:104
C_DebugFile
char * C_DebugFile
Config: File to save debug logs.
Definition: mutt_logging.c:49
C_MailCheckRecent
WHERE bool C_MailCheckRecent
Config: Notify the user about new mail since the last time the mailbox was opened.
Definition: mutt_globals.h:150
C_Sort
WHERE short C_Sort
Config: Sort method for the index.
Definition: sort.h:60
sort.h
C_BrowserAbbreviateMailboxes
bool C_BrowserAbbreviateMailboxes
Config: Abbreviate mailboxes using '~' and '=' in the browser.
Definition: browser.c:72
C_DuplicateThreads
bool C_DuplicateThreads
Config: Highlight messages with duplicated message IDs.
Definition: mutt_thread.c:47
R_INDEX
#define R_INDEX
Redraw the index menu (MENU_MAIN)
Definition: types.h:65
C_HideThreadSubject
bool C_HideThreadSubject
Config: Hide subjects that are similar to that of the parent message.
Definition: mutt_thread.c:50
main.h
C_TsStatusFormat
WHERE char * C_TsStatusFormat
Config: printf-like format string for the terminal's status (window title)
Definition: mutt_globals.h:110
C_FlagChars
struct MbTable * C_FlagChars
Config: User-configurable index flags: tagged, new, etc.
Definition: hdrline.c:65
SORT_FROM
@ SORT_FROM
Sort by the email's From field.
Definition: sort2.h:49
C_MenuContext
short C_MenuContext
Config: Number of lines of overlap when changing pages in the index.
Definition: menu.c:56
progress.h
DT_REGEX_MATCH_CASE
#define DT_REGEX_MATCH_CASE
Case-sensitive matching.
Definition: regex3.h:36
C_SpoolFile
WHERE char * C_SpoolFile
Config: Inbox.
Definition: mutt_globals.h:108
DT_PATH_FILE
#define DT_PATH_FILE
Path is a file.
Definition: types.h:54
C_WrapSearch
WHERE bool C_WrapSearch
Config: Wrap around when the search hits the end.
Definition: mutt_globals.h:170
C_SortRe
bool C_SortRe
Config: Sort method for the sidebar.
Definition: mutt_thread.c:54
MboxTypeDef
struct EnumDef MboxTypeDef
Definition: mx.c:104
C_AssumedCharset
char * C_AssumedCharset
Config: If a message is missing a character set, assume this character set.
Definition: charset.c:52
C_Delete
WHERE unsigned char C_Delete
Config: Really delete messages, when the mailbox is closed.
Definition: mutt_globals.h:125
C_ShowMultipartAlternative
char * C_ShowMultipartAlternative
Config: How to display 'multipart/alternative' MIME parts.
Definition: handler.c:71
ConfigDef
Config item definition.
Definition: set.h:61
C_Postponed
WHERE char * C_Postponed
Config: Folder to store postponed messages.
Definition: mutt_globals.h:101
C_Pager
WHERE char * C_Pager
Config: External command for viewing messages, or 'builtin' to use NeoMutt's.
Definition: mutt_globals.h:99
C_AbortBackspace
WHERE bool C_AbortBackspace
Config: Hitting backspace against an empty prompt aborts the prompt.
Definition: mutt_globals.h:83
DT_ADDRESS
#define DT_ADDRESS
e-mail address
Definition: types.h:29
ConfigSet
Container for lots of config items.
Definition: set.h:228
C_Mbox
WHERE char * C_Mbox
Config: Folder that receives read emails (see Move)
Definition: mutt_globals.h:94
C_Markers
WHERE bool C_Markers
Config: Display a '+' at the beginning of wrapped lines in the pager.
Definition: mutt_globals.h:151
recvattach.h
C_PipeSep
char * C_PipeSep
Config: Separator to add between multiple piped messages.
Definition: commands.c:87
C_IncludeEncrypted
bool C_IncludeEncrypted
Config: Whether to include encrypted content when replying.
Definition: handler.c:67
C_ResumeDraftFiles
WHERE bool C_ResumeDraftFiles
Config: Process draft files like postponed messages.
Definition: mutt_globals.h:156
DT_ENUM
#define DT_ENUM
an enumeration
Definition: types.h:31
C_AskBcc
WHERE bool C_AskBcc
Config: Ask the user for the blind-carbon-copy recipients.
Definition: mutt_globals.h:134
C_MarkOld
bool C_MarkOld
Config: Mark new emails as old when leaving the mailbox.
Definition: globals.c:36
C_ImplicitAutoview
bool C_ImplicitAutoview
Config: Display MIME attachments inline if a 'copiousoutput' mailcap entry exists.
Definition: handler.c:66
browser.h
C_MetaKey
bool C_MetaKey
Config: Interpret 'ALT-x' as 'ESC-x'.
Definition: curs_lib.c:72
C_ArrowString
WHERE char * C_ArrowString
Config: Use an custom string for arrow_cursor.
Definition: mutt_globals.h:132
C_CollapseUnread
bool C_CollapseUnread
Config: Prevent the collapse of threads with unread emails.
Definition: mutt_thread.c:46
C_From
WHERE struct Address * C_From
Config: Default 'From' address to use, if isn't otherwise set.
Definition: mutt_globals.h:81
C_StatusOnTop
WHERE bool C_StatusOnTop
Config: Display the status bar at the top.
Definition: mutt_globals.h:164
C_Resolve
WHERE bool C_Resolve
Config: Move to the next email whenever a command modifies an email.
Definition: mutt_globals.h:155
C_ForceName
bool C_ForceName
Config: Save outgoing mail in a folder of their name.
Definition: hook.c:59
CSR_ERR_INVALID
#define CSR_ERR_INVALID
Value hasn't been set.
Definition: set.h:38
C_IndentString
WHERE char * C_IndentString
Config: String used to indent 'reply' text.
Definition: mutt_globals.h:102
C_PromptAfter
bool C_PromptAfter
Config: Pause after running an external pager.
Definition: commands.c:91
C_HonorDisposition
bool C_HonorDisposition
Config: Don't display MIME parts inline if they have a disposition of 'attachment'.
Definition: handler.c:65
score.h
multipart_validator
int multipart_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "show_multipart_alternative" config variable - Implements ConfigDef::validator()
Definition: mutt_config.c:143
mx.h
SLIST_SEP_COLON
#define SLIST_SEP_COLON
Definition: slist.h:35
C_MessageFormat
char * C_MessageFormat
Config: printf-like format string for listing attached messages.
Definition: recvattach.c:77
commands.h
C_HideTopLimited
bool C_HideTopLimited
Config: Don't indicate hidden top message, in the thread tree.
Definition: mutt_thread.c:51
SORT_LABEL
@ SORT_LABEL
Sort by the emails label.
Definition: sort2.h:64
C_HideLimited
bool C_HideLimited
Config: Don't indicate hidden messages, in the thread tree.
Definition: mutt_thread.c:48
MUTT_ASKYES
@ MUTT_ASKYES
Ask the user, defaulting to 'Yes'.
Definition: quad.h:42
C_Charset
char * C_Charset
Config: Default character set for displaying text on screen.
Definition: charset.c:53
C_DateFormat
WHERE char * C_DateFormat
Config: strftime format string for the d expando.
Definition: mutt_globals.h:89
C_CopyDecodeWeed
WHERE bool C_CopyDecodeWeed
Config: Controls whether to weed headers when copying or saving emails.
Definition: mutt_globals.h:143
MUTT_ASKNO
@ MUTT_ASKNO
Ask the user, defaulting to 'No'.
Definition: quad.h:41
C_WriteInc
short C_WriteInc
Config: Update the progress bar after this many records written (0 to disable)
Definition: progress.c:45
C_AttachFormat
WHERE char * C_AttachFormat
Config: printf-like format string for the attachment menu.
Definition: mutt_globals.h:87
lib.h
C_Mask
WHERE struct Regex * C_Mask
Config: Only display files/dirs matching this regex in the browser.
Definition: mutt_globals.h:119
DT_COMMAND
#define DT_COMMAND
A command.
Definition: types.h:50
SORT_SIZE
@ SORT_SIZE
Sort by the size of the email.
Definition: sort2.h:46
charset_validator
int charset_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "charset" config variable - Implements ConfigDef::validator()
Definition: charset.c:39
C_SortAux
WHERE short C_SortAux
Config: Secondary sort method for the index.
Definition: sort.h:61
mutt_buffer_printf
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:160
C_MailCheckStats
bool C_MailCheckStats
Config: Periodically check for new mail.
Definition: mutt_mailbox.c:52
SORT_DATE
@ SORT_DATE
Sort by the date the email was sent.
Definition: sort2.h:45
C_ConfirmAppend
WHERE bool C_ConfirmAppend
Config: Confirm before appending emails to a mailbox.
Definition: mutt_globals.h:141
R_PAGER
#define R_PAGER
Redraw the pager menu.
Definition: types.h:66
C_Move
unsigned char C_Move
Config: Move emails from $spool_file to $mbox when read.
Definition: mx.c:91
C_MenuScroll
bool C_MenuScroll
Config: Scroll the menu/index by one line, rather than a page.
Definition: menu.c:58
MUTT_MBOX
@ MUTT_MBOX
'mbox' Mailbox type
Definition: mailbox.h:48
C_PagerFormat
WHERE char * C_PagerFormat
Config: printf-like format string for the pager's status bar.
Definition: mutt_globals.h:100
C_Print
WHERE unsigned char C_Print
Config: Confirm before printing a message.
Definition: mutt_globals.h:128
hook.h
C_ConfirmCreate
WHERE bool C_ConfirmCreate
Config: Confirm before creating a new mailbox.
Definition: mutt_globals.h:142
MENU_PAGER
@ MENU_PAGER
Pager pager (email viewer)
Definition: keymap.h:81
C_MboxType
unsigned char C_MboxType
Config: Default type for creating new mailboxes.
Definition: mx.c:90
MainVars
struct ConfigDef MainVars[]
Definition: mutt_config.c:191
DT_SLIST
#define DT_SLIST
a list of strings
Definition: types.h:39
C_WaitKey
WHERE bool C_WaitKey
Config: Prompt to press a key after running external commands.
Definition: mutt_globals.h:169
status.h
hdrline.h
C_WriteBcc
WHERE bool C_WriteBcc
Config: Write out the 'Bcc' field when preparing to send a mail.
Definition: mutt_globals.h:171
SortAuxMethods
const struct Mapping SortAuxMethods[]
Sort methods for '$sort_aux' for the index.
Definition: mutt_config.c:82
C_PreferredLanguages
struct Slist * C_PreferredLanguages
Config: Preferred languages for multilingual MIME.
Definition: handler.c:69
DT_CHARSET_STRICT
#define DT_CHARSET_STRICT
Flag for charset_validator to use strict char check.
Definition: charset.h:29
C_HideTopMissing
bool C_HideTopMissing
Config: Don't indicate missing top message, in the thread tree.
Definition: mutt_thread.c:52
SORT_DESC
@ SORT_DESC
Sort by the folder's description.
Definition: sort2.h:65
C_StrictThreads
bool C_StrictThreads
Config: Thread messages using 'In-Reply-To' and 'References' headers.
Definition: mutt_thread.c:55