NeoMutt  2019-12-07
Teaching an old dog new tricks
Go to the documentation of this file.
23 #ifndef MUTT_GLOBALS_H
24 #define MUTT_GLOBALS_H
26 #include "config.h"
27 #include <signal.h> // IWYU pragma: keep
28 #include <stdbool.h>
29 #include "mutt/mutt.h"
30 #include "keymap.h"
31 #include "where.h"
33 #ifdef MAIN_C
34 /* so that global vars get included */
35 #include "mx.h"
36 #include "ncrypt/ncrypt.h"
37 #include "sort.h"
38 #endif /* MAIN_C */
41 WHERE struct Colors *Colors;
43 WHERE struct Context *Context;
46 WHERE char ErrorBuf[256];
50 WHERE char *HomeDir;
53 WHERE char *Username;
58 extern const char *GitVer;
63 /* Lists of strings */
64 WHERE struct ListHead AlternativeOrderList INITVAL(STAILQ_HEAD_INITIALIZER(AlternativeOrderList));
65 WHERE struct ListHead AutoViewList INITVAL(STAILQ_HEAD_INITIALIZER(AutoViewList));
66 WHERE struct ListHead HeaderOrderList INITVAL(STAILQ_HEAD_INITIALIZER(HeaderOrderList));
67 WHERE struct ListHead MimeLookupList INITVAL(STAILQ_HEAD_INITIALIZER(MimeLookupList));
69 #ifdef USE_SIDEBAR
70 WHERE struct ListHead SidebarWhitelist INITVAL(STAILQ_HEAD_INITIALIZER(SidebarWhitelist));
71 #endif
72 WHERE struct ListHead TempAttachmentsList INITVAL(STAILQ_HEAD_INITIALIZER(TempAttachmentsList));
73 WHERE struct ListHead UserHeader INITVAL(STAILQ_HEAD_INITIALIZER(UserHeader));
75 WHERE struct RegexList Alternates INITVAL(STAILQ_HEAD_INITIALIZER(Alternates));
76 WHERE struct RegexList UnAlternates INITVAL(STAILQ_HEAD_INITIALIZER(UnAlternates));
78 /* flags for received signals */
85 WHERE struct AliasList Aliases INITVAL(TAILQ_HEAD_INITIALIZER(Aliases));
90 #endif
92 /* All the variables below are backing for config items */
95 WHERE struct Address *C_From;
101 #ifdef USE_AUTOCRYPT
104 #endif
115 #ifdef USE_IMAP
117 #endif
118 WHERE char *C_Mbox;
121 #ifdef USE_HCACHE
123 #if defined(HAVE_GDBM) || defined(HAVE_BDB)
125 #endif /* HAVE_GDBM || HAVE_BDB */
126 #endif /* USE_HCACHE */
129 #ifdef USE_NNTP
131 #endif
133 WHERE char *C_Pager;
140 WHERE char *C_Shell;
142 #ifdef USE_SMTP
144 #endif /* USE_SMTP */
153 WHERE short C_Wrap;
155 #ifdef USE_SIDEBAR
157 #endif
158 #ifdef USE_IMAP
161 #endif
171 #ifdef USE_NOTMUCH
174 #endif
176 /* These variables are backing for config items */
177 WHERE struct Regex *C_Mask;
181 /* Quad-options */
182 WHERE unsigned char C_Bounce;
183 WHERE unsigned char C_Copy;
184 WHERE unsigned char C_Delete;
186 WHERE unsigned char C_MimeForward;
187 WHERE unsigned char C_Print;
188 WHERE unsigned char C_Quit;
189 #ifdef USE_SSL
190 WHERE unsigned char C_SslStarttls;
191 #endif
192 #ifdef USE_NNTP
193 WHERE unsigned char C_PostModerated;
194 WHERE unsigned char C_FollowupToPoster;
195 #endif
201 #ifdef USE_AUTOCRYPT
204 #endif
207 WHERE bool C_Beep;
218 #ifdef USE_HCACHE
219 #if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC)
221 #endif /* HAVE_QDBM | HAVE_TC | HAVE_KC */
222 #endif /* USE_HCACHE */
224 WHERE bool C_Help;
225 #ifdef USE_IMAP
232 #endif
233 #ifdef USE_SSL
234 #ifndef USE_SSL_GNUTLS
235 WHERE bool C_SslUsesystemcerts;
236 WHERE bool C_SslUseSslv2;
237 #endif /* USE_SSL_GNUTLS */
239 #if defined(USE_SSL_OPENSSL) && defined(HAVE_SSL_PARTIAL_CHAIN)
241 #endif /* USE_SSL_OPENSSL */
242 #endif /* defined(USE_SSL) */
246 #if defined(USE_IMAP) || defined(USE_POP)
248 #endif
255 #ifdef USE_SIDEBAR
258 #endif
274 /* PGP options */
287 /* news options */
289 #ifdef USE_NNTP
292 #endif
294 #ifdef USE_NOTMUCH
296 #endif
298 #endif /* MUTT_GLOBALS_H */
WHERE unsigned char C_Bounce
Config: Confirm before bouncing a message.
Definition: globals.h:182
WHERE char * Username
User&#39;s login name.
Definition: globals.h:53
WHERE bool C_StatusOnTop
Config: Display the status bar at the top.
Definition: globals.h:263
WHERE char * C_SmtpUrl
Config: (smtp) Url of the SMTP server.
Definition: globals.h:143
WHERE char * C_TsIconFormat
Config: printf-like format string for the terminal&#39;s icon title.
Definition: globals.h:148
WHERE bool C_ImapListSubscribed
Config: (imap) When browsing a mailbox, only display subscribed folders.
Definition: globals.h:228
Container for lots of config items.
Definition: set.h:187
WHERE bool C_MessageCacheClean
Config: (imap/pop) Clean out obsolete entries from the message cache.
Definition: globals.h:247
Manage keymappings.
WHERE bool C_Autocrypt
Config: Enables the Autocrypt feature.
Definition: globals.h:202
WHERE bool C_CryptConfirmhook
Config: Prompt the user to confirm keys before use.
Definition: globals.h:276
WHERE bool C_MailCheckRecent
Config: Notify the user about new mail since the last time the mailbox was opened.
Definition: globals.h:243
WHERE bool C_WriteBcc
Config: Write out the &#39;Bcc&#39; field when preparing to send a mail.
Definition: globals.h:270
WHERE char * C_AttributionLocale
Config: Locale for dates in the attribution message.
Definition: globals.h:99
WHERE bool C_BeepNew
Config: Make a noise when new mail arrives.
Definition: globals.h:208
WHERE bool C_AutocryptReply
Config: Replying to an autocrypt email automatically enables autocrypt in the reply.
Definition: globals.h:203
WHERE unsigned char C_Print
Config: Confirm before printing a message.
Definition: globals.h:187
WHERE char * C_AttachFormat
Config: printf-like format string for the attachment menu.
Definition: globals.h:100
WHERE char * C_IndentString
Config: String used to indent &#39;reply&#39; text.
Definition: globals.h:136
WHERE short C_ImapPollTimeout
Config: (imap) Maximum time to wait for a server response.
Definition: globals.h:160
A Hash Table.
Definition: hash.h:61
WHERE bool C_ForwardDecode
Config: Decode the message when forwarding it.
Definition: globals.h:216
Types of GUI selections.
Definition: keymap.h:69
WHERE bool C_Confirmappend
Config: Confirm before appending emails to a mailbox.
Definition: globals.h:211
WHERE char * C_SmimeDefaultKey
Config: Default key for SMIME operations.
Definition: globals.h:167
true after SIGINT is received
Definition: globals.h:80
WHERE unsigned char C_Quit
Config: Prompt before exiting NeoMutt.
Definition: globals.h:188
WHERE short C_SleepTime
Config: Time to pause after certain info messages.
Definition: globals.h:151
WHERE char * C_CryptProtectedHeadersSubject
Config: Use this as the subject for encrypted emails.
Definition: globals.h:106
WHERE char * AutocryptDefaultKey
Autocrypt default key id (used for postponing messages)
Definition: globals.h:89
true after SIGALRM is received
Definition: globals.h:79
WHERE unsigned char C_FollowupToPoster
Config: (nntp) Reply to the poster if &#39;poster&#39; is in the &#39;Followup-To&#39; header.
Definition: globals.h:194
WHERE long C_HeaderCachePagesize
Config: (hcache) Database page size (gdbm,bdb4)
Definition: globals.h:124
WHERE struct ListHead AlternativeOrderList INITVAL(STAILQ_HEAD_INITIALIZER(AlternativeOrderList))
List of preferred mime types to display.
WHERE bool C_Help
Config: Display a help line with common key bindings.
Definition: globals.h:224
WHERE char AttachmentMarker[256]
Unique ANSI string to mark PGP messages in an email.
Definition: globals.h:47
WHERE char * C_NmQueryWindowCurrentSearch
Config: (notmuch) Current search parameters.
Definition: globals.h:173
WHERE enum MenuType CurrentMenu
Current Menu, e.g. MENU_PAGER.
Definition: globals.h:83
WHERE unsigned char C_Delete
Config: Really delete messages, when the mailbox is closed.
Definition: globals.h:184
WHERE bool C_CryptUsePka
Config: Use GPGME to use PKA (lookup PGP keys using DNS)
Definition: globals.h:272
WHERE bool C_SaveEmpty
Config: (mbox,mmdf) Preserve empty mailboxes.
Definition: globals.h:253
WHERE struct Hash * TagFormats
Hash table of tag-formats (tag -> format string)
Definition: globals.h:61
WHERE bool C_CryptProtectedHeadersWrite
Config: Generate protected header (Memory Hole) for signed and encrypted emails.
Definition: globals.h:280
WHERE bool C_ImapPeek
Config: (imap) Don&#39;t mark messages as read when fetching them from the server.
Definition: globals.h:230
WHERE struct ConfigSet * Config
Wrapper around the user&#39;s config settings.
Definition: globals.h:40
WHERE bool C_WrapSearch
Config: Wrap around when the search hits the end.
Definition: globals.h:269
WHERE char * C_ImapUser
Config: (imap) Username for the IMAP server.
Definition: globals.h:116
WHERE short C_Wrap
Config: Width to wrap text in the pager.
Definition: globals.h:153
WHERE bool C_PgpAutoinline
Config: Use old-style inline PGP messages (not recommended)
Definition: globals.h:285
WHERE bool C_BrailleFriendly
Config: Move the cursor to the beginning of the line.
Definition: globals.h:209
An email address.
Definition: address.h:34
WHERE unsigned char C_Copy
Config: Save outgoing emails to $record.
Definition: globals.h:183
WHERE char * LastFolder
Previously selected mailbox.
Definition: globals.h:56
WHERE char * C_AutocryptAcctFormat
Config: Format of the autocrypt account menu.
Definition: globals.h:102
#define WHERE
Definition: where.h:30
WHERE char * C_Record
Config: Folder to save &#39;sent&#39; messages.
Definition: globals.h:132
WHERE char * C_Shell
Config: External command to run subshells in.
Definition: globals.h:140
WHERE char * C_StatusFormat
Config: printf-like format string for the index&#39;s status line.
Definition: globals.h:146
WHERE bool C_PgpLongIds
Config: Display long PGP key IDs to the user.
Definition: globals.h:283
String list.
Definition: slist.h:43
WHERE bool C_SslForceTls
Config: (ssl) Require TLS encryption for all connections.
Definition: globals.h:238
WHERE char * C_HeaderCache
Config: (hcache) Directory/file for the header cache database.
Definition: globals.h:122
WHERE bool C_Confirmcreate
Config: Confirm before creating a new mailbox.
Definition: globals.h:212
WHERE bool C_TsEnabled
Config: Allow NeoMutt to set the terminal status line and icon.
Definition: globals.h:266
WHERE char * C_AliasFile
Config: Save new aliases to this file.
Definition: globals.h:97
WHERE bool C_CheckMboxSize
Config: (mbox,mmdf) Use mailbox size as an indicator of new mail.
Definition: globals.h:210
WHERE char * C_ConfigCharset
Config: Character set that the config files are in.
Definition: globals.h:105
WHERE bool C_SizeShowFractions
Config: Show size fractions with a single decimal place.
Definition: globals.h:260
WHERE bool C_SmimeIsDefault
Config: Use SMIME rather than PGP by default.
Definition: globals.h:281
WHERE bool C_UseDomain
Config: Qualify local addresses using this domain.
Definition: globals.h:267
WHERE bool C_HeaderCacheCompress
Config: (hcache) Enable database compression (qdbm,tokyocabinet,kyotocabinet)
Definition: globals.h:220
WHERE bool C_EditHeaders
Config: Let the user edit the email headers whilst editing an email.
Definition: globals.h:214
WHERE bool C_SidebarOnRight
Config: (sidebar) Display the sidebar on the right.
Definition: globals.h:257
API for mailboxes.
WHERE bool C_SizeShowMb
Config: Show sizes in megabytes for sizes greater than 1 megabyte.
Definition: globals.h:261
WHERE unsigned char C_MimeForward
Config: Forward a message as a &#39;message/RFC822&#39; MIME part.
Definition: globals.h:186
WHERE char * C_Mbox
Config: Folder that receives read emails (see Move)
Definition: globals.h:118
WHERE struct Address * C_From
Config: Default &#39;From&#39; address to use, if isn&#39;t otherwise set.
Definition: globals.h:95
WHERE char * HomeDir
User&#39;s home directory.
Definition: globals.h:50
WHERE bool C_SizeUnitsOnLeft
Config: Show the units as a prefix to the size.
Definition: globals.h:262
WHERE bool C_Autoedit
Config: Skip the initial compose menu and edit the email.
Definition: globals.h:205
true after SIGWINCH is received
Definition: globals.h:81
WHERE char * CurrentFolder
Currently selected mailbox.
Definition: globals.h:55
WHERE bool C_SizeShowBytes
Config: Show smaller sizes in bytes.
Definition: globals.h:259
WHERE int C_NmQueryWindowDuration
Config: (notmuch) Time duration of the current search window.
Definition: globals.h:172
WHERE unsigned char C_PostModerated
Config: (nntp) Allow posting to moderated newsgroups.
Definition: globals.h:193
WHERE bool C_ReadOnly
Config: Open folders in read-only mode.
Definition: globals.h:249
WHERE char * C_NewsServer
Config: (nntp) Url of the news server.
Definition: globals.h:130
WHERE bool C_Header
Config: Include the message headers in the reply email (Weed applies)
Definition: globals.h:223
WHERE short C_ImapKeepalive
Config: (imap) Time to wait before polling an open IMAP connection.
Definition: globals.h:159
WHERE bool C_SidebarVisible
Config: (sidebar) Show the sidebar.
Definition: globals.h:256
WHERE struct Context * Context
Definition: globals.h:43
WHERE bool C_CryptOpportunisticEncrypt
Config: Enable encryption when the recipient&#39;s key is available.
Definition: globals.h:277
WHERE bool C_WaitKey
Config: Prompt to press a key after running external commands.
Definition: globals.h:268
WHERE struct Slist * C_MailcapPath
Config: Colon-separated list of mailcap files.
Definition: globals.h:119
WHERE char * C_Folder
Config: Base folder for a set of mailboxes.
Definition: globals.h:120
WHERE char * C_IndexFormat
Config: printf-like format string for the index menu (emails)
Definition: globals.h:113
const char * GitVer
WHERE bool C_SaveUnsubscribed
Config: (nntp) Save a list of unsubscribed newsgroups to the &#39;newsrc&#39;.
Definition: globals.h:290
WHERE bool C_MaildirTrash
Config: Use the maildir &#39;trashed&#39; flag, rather than deleting.
Definition: globals.h:244
WHERE bool C_ImapQresync
Config: (imap) Enable the QRESYNC extension.
Definition: globals.h:231
WHERE char ErrorBuf[256]
Copy of the last error message.
Definition: globals.h:46
WHERE bool C_Resolve
Config: Move to the next email whenever a command modifies an email.
Definition: globals.h:250
WHERE char * C_PgpEntryFormat
Config: printf-like format string for the PGP key selection menu.
Definition: globals.h:165
WHERE bool C_AsciiChars
Config: Use plain ASCII characters, when drawing email threads.
Definition: globals.h:198
WHERE bool C_CryptProtectedHeadersSave
Config: Save the cleartext Subject with the headers.
Definition: globals.h:279
WHERE short C_Timeout
Config: Time to wait for user input in menus.
Definition: globals.h:152
WHERE char * C_SmimeEncryptWith
Config: Algorithm for encryption.
Definition: globals.h:169
WHERE char * C_NewMailCommand
Config: External command to run when new mail arrives.
Definition: globals.h:138
WHERE bool ErrorBufMessage
true if the last message was an error
Definition: globals.h:45
WHERE struct Regex * C_QuoteRegex
Config: Regex to match quoted text in a reply.
Definition: globals.h:178
WHERE struct Colors * Colors
Wrapper around the user&#39;s colour settings.
Definition: globals.h:41
WHERE bool C_ImapCheckSubscribed
Config: (imap) When opening a mailbox, ask the server for a list of subscribed folders.
Definition: globals.h:226
WHERE int C_ToggleQuotedShowLevels
Config: Number of quote levels to show with toggle-quoted.
Definition: globals.h:179
API for encryption/signing of emails.
An evil macro.
WHERE bool C_ImapCondstore
Config: (imap) Enable the CONDSTORE extension.
Definition: globals.h:227
WHERE bool C_CryptProtectedHeadersRead
Config: Display protected headers (Memory Hole) in the pager.
Definition: globals.h:278
WHERE char * C_TsStatusFormat
Config: printf-like format string for the terminal&#39;s status (window title)
Definition: globals.h:147
WHERE char * C_DsnReturn
Config: What to send as a notification of message delivery or delay.
Definition: globals.h:109
WHERE char ProtectedHeaderMarker[256]
Unique ANSI string to mark protected headers in an email.
Definition: globals.h:48
WHERE bool C_DeleteUntag
Config: Untag messages when they are marked for deletion.
Definition: globals.h:213
WHERE short C_SidebarWidth
Config: (sidebar) Width of the sidebar.
Definition: globals.h:156
WHERE char * C_SimpleSearch
Config: Pattern to search for when search doesn&#39;t contain ~&#39;s.
Definition: globals.h:141
WHERE struct Hash * ReverseAliases
Hash table of aliases (email address -> alias)
Definition: globals.h:60
WHERE bool C_TextFlowed
Config: Generate &#39;format=flowed&#39; messages.
Definition: globals.h:265
WHERE bool C_ResumeDraftFiles
Config: Process draft files like postponed messages.
Definition: globals.h:251
WHERE bool C_PgpIgnoreSubkeys
Config: Only use the principal PGP key.
Definition: globals.h:282
WHERE bool C_Suspend
Config: Allow the user to suspend NeoMutt using &#39;^Z&#39;.
Definition: globals.h:264
WHERE char * C_Spoolfile
Config: Inbox.
Definition: globals.h:145
WHERE bool C_XCommentTo
Config: (nntp) Add &#39;X-Comment-To&#39; header that contains article author.
Definition: globals.h:291
Cached regular expression.
Definition: regex3.h:57
WHERE struct Address * C_EnvelopeFromAddress
Config: Manually set the sender for outgoing messages.
Definition: globals.h:94
WHERE struct Regex * C_Mask
Config: Only display files/dirs matching this regex in the browser.
Definition: globals.h:177
WHERE char * C_PrintCommand
Config: External command to print a message.
Definition: globals.h:137
WHERE char * C_DateFormat
Config: strftime format string for the d expando.
Definition: globals.h:107
WHERE bool C_ImapPassive
Config: (imap) Reuse an existing IMAP connection to check for new mail.
Definition: globals.h:229
WHERE char * C_Editor
Config: External command to use as an email editor.
Definition: globals.h:110
WHERE bool C_ForwardQuote
Config: Automatically quote a forwarded message using C_IndentString.
Definition: globals.h:217
WHERE char * C_PgpDefaultKey
Config: Default key to use for PGP operations.
Definition: globals.h:163
WHERE char * ShortHostname
Short version of the hostname.
Definition: globals.h:51
WHERE char * C_Hostname
Config: Fully-qualified domain name of this machine.
Definition: globals.h:112
WHERE bool C_Beep
Config: Make a noise when an error occurs.
Definition: globals.h:207
WHERE bool C_Score
Config: Use message scoring.
Definition: globals.h:254
WHERE char * C_AutocryptDir
Config: Location of autocrypt files, including the GPG keyring and sqlite database.
Definition: globals.h:103
WHERE bool C_FlagSafe
Config: Protect flagged messages from deletion.
Definition: globals.h:215
Definition: queue.h:322
WHERE bool C_SslVerifyPartialChains
Config: (ssl) Allow verification using partial certificate chains.
Definition: globals.h:240
WHERE bool C_AutoTag
Config: Automatically apply actions to all tagged messages.
Definition: globals.h:206
WHERE char * C_Pager
Config: External command for viewing messages, or &#39;builtin&#39; to use NeoMutt&#39;s.
Definition: globals.h:133
WHERE char * C_Realname
Config: Real name of the user.
Definition: globals.h:139
WHERE char * C_Postponed
Config: Folder to store postponed messages.
Definition: globals.h:135
WHERE char * C_Attribution
Config: Message to start a reply, "On DATE, PERSON wrote:".
Definition: globals.h:98
WHERE char * C_ExternalSearchCommand
Config: External search command.
Definition: globals.h:111
WHERE char * C_PgpSignAs
Config: Use this alternative key for signing messages.
Definition: globals.h:164
WHERE char * C_SmimeSignAs
Config: Use this alternative key for signing messages.
Definition: globals.h:168
WHERE bool C_Markers
Config: Display a &#39;+&#39; at the beginning of wrapped lines in the pager.
Definition: globals.h:245
Definition: queue.h:631
WHERE bool C_Askbcc
Config: Ask the user for the blind-carbon-copy recipients.
Definition: globals.h:199
WHERE char * C_DsnNotify
Config: Request notification for message delivery or delay.
Definition: globals.h:108
WHERE unsigned char C_SslStarttls
Config: (ssl) Use STARTTLS on servers advertising the capability.
Definition: globals.h:190
WHERE bool C_Askcc
Config: Ask the user for the carbon-copy recipients.
Definition: globals.h:200
WHERE char * C_PagerFormat
Config: printf-like format string for the pager&#39;s status bar.
Definition: globals.h:134
WHERE bool C_SaveAddress
Config: Use sender&#39;s full address as a default save folder.
Definition: globals.h:252
WHERE char * C_Visual
Config: Editor to use when &#39;~v&#39; is given in the built-in editor.
Definition: globals.h:149
WHERE bool C_VirtualSpoolfile
Config: (notmuch) Use the first virtual mailbox as a spool file.
Definition: globals.h:295
WHERE char * AutocryptSignAs
Autocrypt Key id to sign as.
Definition: globals.h:88
WHERE bool C_ArrowCursor
Config: Use an arrow &#39;->&#39; instead of highlighting in the index.
Definition: globals.h:197
WHERE unsigned char C_ForwardAttachments
Config: Forward attachments when forwarding a message.
Definition: globals.h:185
WHERE bool C_PgpShowUnusable
Config: Show non-usable keys in the key selection.
Definition: globals.h:284