69 struct Hook *hook = NULL;
83 const char *match = NULL;
116 struct Hook *hook = NULL;
137 struct Hook *hook = NULL;
161 memset(&cache, 0,
sizeof(cache));
184 struct Hook *hook = NULL;
225 const struct Address *addr = NULL;
228 if (!from_me && reply_to && reply_to->
mailbox)
230 else if (!from_me && from && from->
mailbox)
264 if ((c_save_name || c_force_name) && (to || cc || bcc))
266 const struct Address *addr = to ? to : (cc ? cc : bcc);
296 struct Hook *tmp = NULL;
328 static bool inhook =
false;
332 struct Hook *hook = NULL;
374 struct Hook *hook = NULL;
412 struct Hook *hook = NULL;
420 if (!(hook->
command && (hook->
id ==
id)))
453 const struct Expando *exp = NULL;
454 struct Hook *hook = NULL;
bool mutt_addr_is_user(const struct Address *addr)
Does the address belong to the user.
GUI display the mailboxes in a side panel.
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
void buf_fix_dptr(struct Buffer *buf)
Move the dptr to end of the Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
size_t buf_concat_path(struct Buffer *buf, const char *dir, const char *fname)
Join a directory name and a filename.
void buf_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
@ CMD_SAVE_HOOK
:save-hook
@ CMD_TIMEOUT_HOOK
:timeout-hook
@ CMD_ACCOUNT_HOOK
:account-hook
@ CMD_CRYPT_HOOK
:crypt-hook
@ CMD_FOLDER_HOOK
:folder-hook
@ MUTT_CMD_ERROR
Error: Can't help the user.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
int mutt_make_string(struct Buffer *buf, size_t max_cols, const struct Expando *exp, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
Create formatted strings using mailbox expandos.
Structs that make up an email.
#define mutt_debug(LEVEL,...)
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
void mutt_default_save(struct Buffer *path, struct Email *e)
Find the default save path for an email.
void exec_startup_shutdown_hook(enum CommandId id)
Execute any startup/shutdown hooks.
char * mutt_find_hook(enum CommandId id, const char *pat)
Find a matching hook.
void mutt_select_fcc(struct Buffer *path, struct Email *e)
Select the FCC path for an email.
void exec_folder_hook(const char *path, const char *desc)
Perform a folder hook.
const struct Expando * mutt_idxfmt_hook(const char *name, struct Mailbox *m, struct Email *e)
Get index-format-hook format string.
static int addr_hook(struct Buffer *path, enum CommandId id, struct Mailbox *m, struct Email *e)
Perform an address hook (get a path)
static void list_hook(struct ListHead *matches, const char *match, enum CommandId id)
Find hook strings matching.
void exec_timeout_hook(void)
Execute any timeout hooks.
void exec_message_hook(struct Mailbox *m, struct Email *e, enum CommandId id)
Perform a message hook.
void mutt_crypt_hook(struct ListHead *list, struct Address *addr)
Find crypto hooks for an Address.
void exec_account_hook(const char *url)
Perform an account hook.
enum CommandId CurrentHookId
The ID of the Hook currently being executed, e.g. CMD_SAVE_HOOK.
struct HashTable * IdxFmtHooks
All Index Format hooks.
struct HookList Hooks
All simple hooks, e.g. CMD_FOLDER_HOOK.
Parse user-defined Hooks.
GUI manage the main index (list of emails)
struct Mailbox * get_current_mailbox(void)
Get the current Mailbox.
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
@ LL_DEBUG5
Log at debug level 5.
@ LL_DEBUG1
Log at debug level 1.
Convenience wrapper for the library headers.
bool mutt_regex_match(const struct Regex *regex, const char *str)
Shorthand to mutt_regex_capture()
char * mutt_str_dup(const char *str)
Copy a string, safely.
void mutt_temp_attachments_cleanup(void)
Delete all temporary attachments.
void generate_save_path(struct Buffer *dest, const struct Address *a)
Make a safe filename from an email address.
void pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
Some miscellaneous functions.
int mx_access(const char *path, int flags)
Wrapper for access, checks permissions on a given mailbox.
bool mutt_pattern_exec(struct Pattern *pat, PatternExecFlags flags, struct Mailbox *m, struct Email *e, struct PatternCache *cache)
Match a pattern against an email header.
Match patterns to emails.
void parse_context_free(struct ParseContext **pptr)
Free a ParseContext.
struct ParseContext * parse_context_new(void)
Create a new ParseContext.
void parse_error_reset(struct ParseError *pe)
Clear the contents of a ParseError.
void parse_error_free(struct ParseError **pptr)
Free a ParseError.
struct ParseError * parse_error_new(void)
Create a new ParseError.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_FIRST(head)
#define SLIST_FIRST(head)
#define MUTT_FORMAT_PLAIN
Do not prepend DISP_TO, DISP_CC ...
enum CommandResult parse_rc_line_cwd(const char *line, char *cwd, struct ParseContext *pc, struct ParseError *pe)
Parse and run a muttrc line in a relative directory.
struct Buffer * mailbox
Mailbox and host address.
String manipulation buffer.
The envelope/body of an email.
struct Envelope * env
Envelope information.
struct AddressList to
Email's 'To' list.
struct AddressList reply_to
Email's 'reply-to'.
struct AddressList cc
Email's 'Cc' list.
struct AddressList bcc
Email's 'Bcc' list.
struct AddressList from
Email's 'From' list.
struct PatternList * pattern
Used for fcc,save,send-hook.
struct Regex regex
Regular expression.
char * command
Filename, command or pattern to execute.
struct Expando * expando
Used for format hooks.
enum CommandId id
Hook CommandId, e.g. CMD_FOLDER_HOOK.
char * source_file
Used for relative-directory source.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
Context for config parsing (history/backtrace)
Detailed error information from config parsing.
struct Buffer * message
Error message.
Cache commonly-used patterns.
A simple (non-regex) pattern.
char * pattern
printable version