Go to the documentation of this file.
38 #include <sys/types.h>
107 {
N_(
"Quit"), OP_QUIT },
108 {
N_(
"Del"), OP_DELETE },
109 {
N_(
"Undel"), OP_UNDELETE },
110 {
N_(
"Save"), OP_SAVE },
111 {
N_(
"Mail"), OP_MAIL },
112 {
N_(
"Reply"), OP_REPLY },
113 {
N_(
"Group"), OP_GROUP_REPLY },
114 {
N_(
"Help"), OP_HELP },
123 {
N_(
"Quit"), OP_QUIT },
124 {
N_(
"Del"), OP_DELETE },
125 {
N_(
"Undel"), OP_UNDELETE },
126 {
N_(
"Save"), OP_SAVE },
127 {
N_(
"Post"), OP_POST },
128 {
N_(
"Followup"), OP_FOLLOWUP },
129 {
N_(
"Catchup"), OP_CATCHUP },
130 {
N_(
"Help"), OP_HELP },
141 #define CHECK_NO_FLAGS 0
142 #define CHECK_IN_MAILBOX (1 << 0)
143 #define CHECK_MSGCOUNT (1 << 1)
144 #define CHECK_VISIBLE (1 << 2)
145 #define CHECK_READONLY (1 << 3)
146 #define CHECK_ATTACH (1 << 4)
189 mutt_error(
_(
"Function not permitted in attach-message mode"));
214 mutt_error(
_(
"%s: Operation not permitted by ACL"), msg);
316 for (
int i =
msgno - 1; i >= 0; i--)
341 for (
int i = 0; i < m->
vcount; i++)
390 mutt_error(
_(
"Can't toggle write on a readonly mailbox"));
397 mutt_message(
_(
"Changes to folder will be written on folder exit"));
415 if (!ctx || !ctx->
mailbox || !menu)
454 struct Email **save_new = NULL;
462 (lmt || c_uncollapse_new) && (num_new > 0))
503 if (c_uncollapse_new)
511 else if (oldcount > 0)
513 for (
int j = 0; j < num_new; j++)
620 const int old_current = menu->
current;
655 int oldcount,
const struct Email *cur_email)
702 char *new_last_folder = NULL;
718 if (monitor_remove_rc == 0)
724 FREE(&new_last_folder);
799 int buflen,
int *oldcount,
826 bool *pager_return,
bool read_only)
849 *pager_return =
false;
857 *pager_return =
false;
872 if (!m || !menu || (line < 0) || (line >= m->
email_max))
895 edgemsgno = m->
v2r[menu->
max - 1];
900 edgemsgno = m->
v2r[menu->
top];
948 if (!m || (line < 0))
1003 regmatch_t pmatch[cl->
match + 1];
1005 if (regexec(&cl->
regex, buf + offset, cl->
match + 1, pmatch, 0) != 0)
1008 int first = pmatch[cl->
match].rm_so + offset;
1009 int last = pmatch[cl->
match].rm_eo + offset;
1021 if (!found || (first < syntax[i].first) ||
1022 ((first == syntax[i].first) && (last > syntax[i].last)))
1024 syntax[i].color = cl->
pair;
1025 syntax[i].first = first;
1026 syntax[i].last = last;
1033 offset = syntax[i].last;
1042 if ((chunks > 0) && (syntax[0].first > 0))
1047 if (len <= syntax[0].first)
1050 offset = syntax[0].first;
1053 for (i = 0; i < chunks; i++)
1056 attrset(syntax[i].color);
1058 if (len <= syntax[i].last)
1062 if ((i + 1) == chunks)
1068 next =
MIN(len, syntax[i + 1].first);
1072 offset = syntax[i].last;
1127 const char *c_status_format =
1138 const char *c_ts_status_format =
1142 const char *c_ts_icon_format =
1168 bool do_mailbox_notify =
true;
1171 bool in_pager =
false;
1221 if (
tag && (op != OP_TAG_PREFIX) && (op != OP_TAG_PREFIX_COND) && (op != -2))
1275 _(
"Mailbox was externally modified. Flags may be wrong."));
1288 const char *c_new_mail_command =
1290 if (c_new_mail_command)
1294 NONULL(c_new_mail_command));
1308 do_mailbox_notify =
false;
1329 oldcount = newcount;
1331 if (newcount != oldcount)
1333 if (do_mailbox_notify)
1341 const char *c_new_mail_command =
1343 if (c_new_mail_command)
1353 do_mailbox_notify =
true;
1386 const bool c_braille_friendly =
1390 else if (c_braille_friendly)
1406 clearok(stdscr,
true);
1428 if ((op == OP_TAG_PREFIX) || (op == OP_TAG_PREFIX_COND))
1446 if (op == OP_TAG_PREFIX)
1448 else if (op == OP_TAG_PREFIX_COND)
1483 case OP_BOTTOM_PAGE:
1486 case OP_CURRENT_BOTTOM:
1489 case OP_CURRENT_MIDDLE:
1492 case OP_CURRENT_TOP:
1495 case OP_FIRST_ENTRY:
1507 case OP_MIDDLE_PAGE:
1532 case OP_GET_MESSAGE:
1539 if (op == OP_GET_MESSAGE)
1575 mutt_error(
_(
"Message is not visible in limited view"));
1590 mutt_error(
_(
"Article %s not found on the server"), buf);
1596 case OP_GET_CHILDREN:
1597 case OP_RECONSTRUCT_THREAD:
1612 int oldindex = cur.
e->
index;
1617 mutt_error(
_(
"No Message-Id. Unable to perform operation."));
1627 if (op == OP_RECONSTRUCT_THREAD)
1667 op = OP_DISPLAY_MESSAGE;
1683 if (e->
index == oldindex)
1697 mutt_error(
_(
"No deleted messages found in the thread"));
1702 op = OP_DISPLAY_MESSAGE;
1725 mutt_error(
_(
"Argument must be a message number"));
1744 op = OP_DISPLAY_MESSAGE;
1757 case OP_MAIN_DELETE_PATTERN:
1774 case OP_MAIN_FETCH_MAIL:
1782 case OP_SHOW_LOG_MESSAGES:
1784 #ifdef USE_DEBUG_GRAPHVIZ
1809 case OP_MAIN_SHOW_LIMIT:
1823 case OP_LIMIT_CURRENT_THREAD:
1825 case OP_TOGGLE_READ:
1831 if (op == OP_TOGGLE_READ)
1837 snprintf(buf2,
sizeof(buf2),
"!~R!~D~s%s", lmt ?
Context->
pattern :
".*");
1843 snprintf(buf2,
sizeof(buf2),
"~A");
1850 (op == OP_TOGGLE_READ) ||
1851 ((op == OP_MAIN_LIMIT) &&
1877 const bool c_collapse_all =
1928 clearok(stdscr,
true);
1935 case OP_SEARCH_REVERSE:
1936 case OP_SEARCH_NEXT:
1937 case OP_SEARCH_OPPOSITE:
1952 case OP_SORT_REVERSE:
1963 op = OP_DISPLAY_MESSAGE;
1974 if (tag && !c_auto_tag)
1977 for (
size_t i = 0; i < m->
msg_count; i++)
2006 case OP_MAIN_TAG_PATTERN:
2013 case OP_MAIN_UNDELETE_PATTERN:
2029 case OP_MAIN_UNTAG_PATTERN:
2036 case OP_COMPOSE_TO_SENDER:
2053 case OP_MAIN_IMAP_FETCH:
2058 case OP_MAIN_IMAP_LOGOUT_ALL:
2080 case OP_MAIN_SYNC_FOLDER:
2089 struct Email *e = NULL;
2145 op = OP_DISPLAY_MESSAGE;
2152 case OP_MAIN_QUASI_DELETE:
2158 for (
size_t i = 0; i < m->
msg_count; i++)
2180 case OP_MAIN_ENTIRE_THREAD:
2190 mutt_message(
_(
"No virtual folder and no Message-Id, aborting"));
2193 strncpy(buf,
"id:",
sizeof(buf));
2194 int msg_id_offset = 0;
2198 if (buf[strlen(buf) - 1] ==
'>')
2199 buf[strlen(buf) - 1] =
'\0';
2210 mutt_error(
_(
"failed to find message in notmuch database. try "
2211 "running 'notmuch new'."));
2222 if (oldcount < Context->mailbox->msg_count)
2236 op = OP_DISPLAY_MESSAGE;
2243 case OP_MAIN_MODIFY_TAGS:
2244 case OP_MAIN_MODIFY_TAGS_THEN_HIDE:
2251 mutt_message(
_(
"Folder doesn't support tagging, aborting"));
2286 for (
int px = 0, i = 0; i < m->
msg_count; i++)
2297 if (op == OP_MAIN_MODIFY_TAGS_THEN_HIDE)
2299 bool still_queried =
false;
2321 if (op == OP_MAIN_MODIFY_TAGS_THEN_HIDE)
2323 bool still_queried =
false;
2333 op = OP_DISPLAY_MESSAGE;
2355 case OP_CHECK_STATS:
2360 case OP_MAIN_VFOLDER_FROM_QUERY:
2361 case OP_MAIN_VFOLDER_FROM_QUERY_READONLY:
2376 (op == OP_MAIN_VFOLDER_FROM_QUERY_READONLY));
2379 m_query->
name = query_unencoded;
2380 query_unencoded = NULL;
2384 FREE(&query_unencoded);
2390 case OP_MAIN_WINDOWED_VFOLDER_BACKWARD:
2394 const short c_nm_query_window_duration =
2396 if (c_nm_query_window_duration <= 0)
2401 const char *c_nm_query_window_current_search =
2403 if (!c_nm_query_window_current_search)
2410 mutt_str_copy(buf, c_nm_query_window_current_search,
sizeof(buf));
2415 case OP_MAIN_WINDOWED_VFOLDER_FORWARD:
2419 const short c_nm_query_window_duration =
2421 if (c_nm_query_window_duration <= 0)
2426 const char *c_nm_query_window_current_search =
2428 if (!c_nm_query_window_current_search)
2435 mutt_str_copy(buf, c_nm_query_window_current_search,
sizeof(buf));
2442 case OP_SIDEBAR_OPEN:
2450 case OP_MAIN_NEXT_UNREAD_MAILBOX:
2472 case OP_MAIN_CHANGE_FOLDER:
2473 case OP_MAIN_CHANGE_FOLDER_READONLY:
2475 case OP_MAIN_CHANGE_VFOLDER:
2478 bool pager_return =
true;
2485 if (attach_msg || c_read_only || (op == OP_MAIN_CHANGE_FOLDER_READONLY))
2487 cp =
_(
"Open mailbox in read-only mode");
2492 cp =
_(
"Open mailbox");
2496 const bool c_change_folder_next =
2509 goto changefoldercleanup;
2517 goto changefoldercleanup;
2524 pager_return =
false;
2529 &oldcount, &cur, &pager_return, read_only);
2532 changefoldercleanup:
2534 if (in_pager && pager_return)
2536 op = OP_DISPLAY_MESSAGE;
2543 case OP_MAIN_CHANGE_GROUP:
2544 case OP_MAIN_CHANGE_GROUP_READONLY:
2546 bool pager_return =
true;
2554 if (attach_msg || c_read_only || (op == OP_MAIN_CHANGE_GROUP_READONLY))
2556 cp =
_(
"Open newsgroup in read-only mode");
2561 cp =
_(
"Open newsgroup");
2565 const bool c_change_folder_next =
2575 const char *c_news_server =
2578 c_news_server,
false);
2580 goto changefoldercleanup2;
2587 goto changefoldercleanup2;
2595 goto changefoldercleanup2;
2602 pager_return =
false;
2607 &oldcount, &cur, &pager_return, read_only);
2611 changefoldercleanup2:
2613 if (in_pager && pager_return)
2615 op = OP_DISPLAY_MESSAGE;
2622 case OP_DISPLAY_MESSAGE:
2623 case OP_DISPLAY_HEADERS:
2631 if (op == OP_DISPLAY_HEADERS)
2641 const bool c_uncollapse_jump =
2643 if (c_uncollapse_jump)
2647 const bool c_pgp_auto_decode =
2679 if ((!in_pager) && attach_msg)
2698 case OP_MAIN_BREAK_THREAD:
2725 op = OP_DISPLAY_MESSAGE;
2734 _(
"Thread can't be broken, message is not part of a thread"));
2739 case OP_MAIN_LINK_THREADS:
2753 mutt_error(
_(
"No Message-ID: header available to link thread"));
2775 op = OP_DISPLAY_MESSAGE;
2794 op = OP_DISPLAY_MESSAGE;
2802 case OP_MAIN_NEXT_UNDELETED:
2820 op = OP_DISPLAY_MESSAGE;
2839 op = OP_DISPLAY_MESSAGE;
2846 case OP_MAIN_PREV_UNDELETED:
2863 op = OP_DISPLAY_MESSAGE;
2882 op = OP_DISPLAY_MESSAGE;
2889 case OP_DECRYPT_COPY:
2890 case OP_DECRYPT_SAVE:
2894 case OP_COPY_MESSAGE:
2896 case OP_DECODE_COPY:
2897 case OP_DECODE_SAVE:
2905 ((op == OP_SAVE) || (op == OP_DECODE_SAVE) || (op == OP_DECRYPT_SAVE)) ?
2915 if ((rc == 0) && (save_opt ==
SAVE_MOVE))
2939 case OP_MAIN_NEXT_NEW:
2940 case OP_MAIN_NEXT_UNREAD:
2941 case OP_MAIN_PREV_NEW:
2942 case OP_MAIN_PREV_UNREAD:
2943 case OP_MAIN_NEXT_NEW_THEN_UNREAD:
2944 case OP_MAIN_PREV_NEW_THEN_UNREAD:
2949 int first_unread = -1;
2952 const int saved_current = menu->
current;
2957 if ((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_NEXT_UNREAD) ||
2958 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD))
2982 if ((unread != 0) && (first_unread == -1))
2983 first_unread = mcur;
2984 if ((unread == 1) && (first_new == -1))
2989 if (first_unread == -1)
2990 first_unread = mcur;
2991 if (!e->
old && (first_new == -1))
2995 if (((op == OP_MAIN_NEXT_UNREAD) || (op == OP_MAIN_PREV_UNREAD)) &&
2996 (first_unread != -1))
2998 if (((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_PREV_NEW) ||
2999 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD) || (op == OP_MAIN_PREV_NEW_THEN_UNREAD)) &&
3005 if (((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_PREV_NEW) ||
3006 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD) || (op == OP_MAIN_PREV_NEW_THEN_UNREAD)) &&
3011 else if (((op == OP_MAIN_NEXT_UNREAD) || (op == OP_MAIN_PREV_UNREAD) ||
3012 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD) || (op == OP_MAIN_PREV_NEW_THEN_UNREAD)) &&
3013 (first_unread != -1))
3021 if ((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_PREV_NEW))
3024 mutt_error(
_(
"No new messages in this limited view"));
3031 mutt_error(
_(
"No unread messages in this limited view"));
3038 if ((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_NEXT_UNREAD) ||
3039 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD))
3041 if (saved_current > menu->
current)
3046 else if (saved_current < menu->current)
3053 op = OP_DISPLAY_MESSAGE;
3060 case OP_FLAG_MESSAGE:
3071 for (
size_t i = 0; i < m->
msg_count; i++)
3117 for (
size_t i = 0; i < m->
msg_count; i++)
3160 case OP_TOGGLE_WRITE:
3167 op = OP_DISPLAY_MESSAGE;
3175 case OP_MAIN_NEXT_THREAD:
3176 case OP_MAIN_NEXT_SUBTHREAD:
3177 case OP_MAIN_PREV_THREAD:
3178 case OP_MAIN_PREV_SUBTHREAD:
3185 case OP_MAIN_NEXT_THREAD:
3189 case OP_MAIN_NEXT_SUBTHREAD:
3193 case OP_MAIN_PREV_THREAD:
3197 case OP_MAIN_PREV_SUBTHREAD:
3205 if ((op == OP_MAIN_NEXT_THREAD) || (op == OP_MAIN_NEXT_SUBTHREAD))
3212 op = OP_DISPLAY_MESSAGE;
3220 case OP_MAIN_ROOT_MESSAGE:
3221 case OP_MAIN_PARENT_MESSAGE:
3233 op = OP_DISPLAY_MESSAGE;
3241 case OP_MAIN_SET_FLAG:
3242 case OP_MAIN_CLEAR_FLAG:
3275 case OP_MAIN_COLLAPSE_THREAD:
3294 const bool c_uncollapse_jump =
3296 if (c_uncollapse_jump)
3306 mutt_error(
_(
"Thread contains unread or flagged messages"));
3315 case OP_MAIN_COLLAPSE_ALL:
3334 case OP_BOUNCE_MESSAGE:
3345 case OP_CREATE_ALIAS:
3347 struct AddressList *al = NULL;
3348 if (cur.
e && cur.
e->
env)
3361 case OP_PURGE_MESSAGE:
3375 const bool c_delete_untag =
3398 op = OP_DISPLAY_MESSAGE;
3411 case OP_DELETE_THREAD:
3412 case OP_DELETE_SUBTHREAD:
3413 case OP_PURGE_THREAD:
3426 int subthread = (op == OP_DELETE_SUBTHREAD);
3431 if (op == OP_PURGE_THREAD)
3438 const bool c_delete_untag =
3466 case OP_DISPLAY_ADDRESS:
3476 case OP_ENTER_COMMAND:
3484 case OP_EDIT_OR_VIEW_RAW_MESSAGE:
3485 case OP_EDIT_RAW_MESSAGE:
3486 case OP_VIEW_RAW_MESSAGE:
3492 if (op == OP_EDIT_RAW_MESSAGE)
3501 else if (op == OP_EDIT_OR_VIEW_RAW_MESSAGE)
3508 const bool c_pgp_auto_decode =
3526 case OP_FORWARD_MESSAGE:
3534 const bool c_pgp_auto_decode =
3546 case OP_FORGET_PASSPHRASE:
3550 case OP_GROUP_REPLY:
3551 case OP_GROUP_CHAT_REPLY:
3554 if (op == OP_GROUP_REPLY)
3564 const bool c_pgp_auto_decode =
3586 if (num_changed > 0)
3592 mutt_message(ngettext(
"%d label changed",
"%d labels changed", num_changed),
3613 const bool c_pgp_auto_decode =
3642 case OP_EXTRACT_KEYS:
3656 case OP_CHECK_TRADITIONAL:
3674 op = OP_DISPLAY_MESSAGE;
3722 case OP_MAIN_READ_THREAD:
3723 case OP_MAIN_READ_SUBTHREAD:
3735 true, (op != OP_MAIN_READ_THREAD));
3749 op = OP_DISPLAY_MESSAGE;
3776 char str[256], macro[256];
3777 const char *c_mark_macro_prefix =
3779 snprintf(str,
sizeof(str),
"%s%s", c_mark_macro_prefix, buf2);
3780 snprintf(macro,
sizeof(macro),
"<search>~i \"%s\"\n", cur.
e->
env->
message_id);
3788 snprintf(buf2,
sizeof(buf2),
_(
"Message bound to %s"), str);
3802 case OP_RECALL_MESSAGE:
3816 for (
size_t i = 0; i < m->
msg_count; i++)
3835 case OP_FORWARD_TO_GROUP:
3851 _(
"Reply by mail as poster prefers?")) !=
MUTT_YES))
3886 const bool c_pgp_auto_decode =
3898 case OP_SHELL_ESCAPE:
3906 case OP_TAG_SUBTHREAD:
3914 !cur.
e->
tagged, (op != OP_TAG_THREAD));
3920 if (op == OP_TAG_THREAD)
3968 case OP_UNDELETE_THREAD:
3969 case OP_UNDELETE_SUBTHREAD:
3981 false, (op != OP_UNDELETE_THREAD));
3985 false, (op != OP_UNDELETE_THREAD));
3992 if (op == OP_UNDELETE_THREAD)
4009 case OP_MAILBOX_LIST:
4013 case OP_VIEW_ATTACHMENTS:
4032 case OP_SIDEBAR_FIRST:
4033 case OP_SIDEBAR_LAST:
4034 case OP_SIDEBAR_NEXT:
4035 case OP_SIDEBAR_NEXT_NEW:
4036 case OP_SIDEBAR_PAGE_DOWN:
4037 case OP_SIDEBAR_PAGE_UP:
4038 case OP_SIDEBAR_PREV:
4039 case OP_SIDEBAR_PREV_NEW:
4048 case OP_SIDEBAR_TOGGLE_VISIBLE:
4054 #ifdef USE_AUTOCRYPT
4055 case OP_AUTOCRYPT_ACCT_MENU:
4127 panel_index->
focus = win_index;
4163 panel_pager->
focus = win_pager;
long hdr_offset
Offset in stream where the headers begin.
void ctx_free(struct Context **ptr)
Free a Context.
int mutt_search_command(struct Context *ctx, struct Mailbox *m, int cur, int op)
Perform a search.
struct Email * mutt_get_virt_email(struct Mailbox *m, int vnum)
Get a virtual Email.
void mutt_curses_set_cursor(enum MuttCursorState state)
Set the cursor state.
uint16_t SendFlags
Flags for mutt_send_message(), e.g. SEND_REPLY.
int msgno
Number displayed to the user.
#define SEND_GROUP_CHAT_REPLY
Reply to all recipients preserving To/Cc.
void dump_graphviz(const char *title, struct Context *ctx)
static const struct Mapping IndexHelp[]
Help Bar for the Index dialog.
void mutt_beep(bool force)
Irritate the user.
int el_add_tagged(struct EmailList *el, struct Context *ctx, struct Email *e, bool use_tagged)
Get a list of the tagged Emails.
@ WT_PAGER
Window containing paged free-form text.
enum MxStatus mx_mbox_check(struct Mailbox *m)
Check for new mail - Wrapper for MxOps::mbox_check()
void mutt_window_clrtoeol(struct MuttWindow *win)
Clear to the end of the line.
AclFlags rights
ACL bits, see AclFlags.
bool ctx_has_limit(const struct Context *ctx)
Is a limit active?
@ MUTT_FLAG
Flagged messages.
#define MUTT_READONLY
Open in read-only mode.
int mx_path_canon(char *buf, size_t buflen, const char *folder, enum MailboxType *type)
Canonicalise a mailbox path - Wrapper for MxOps::path_canon()
int nntp_check_msgid(struct Mailbox *m, const char *msgid)
Fetch article by Message-ID.
QuadOption
Possible values for a quad-option.
#define SEND_REPLY
Reply to sender.
Data passed to a notification function.
@ WT_PAGER_BAR
Pager Bar containing status info about the Pager.
char * followup_to
List of 'followup-to' fields.
int mutt_window_move(struct MuttWindow *win, int col, int row)
Move the cursor in a Window.
void index_make_entry(struct Menu *menu, char *buf, size_t buflen, int line)
Format a menu item for the index list - Implements Menu::make_entry()
WHERE SIG_ATOMIC_VOLATILE_T SigWinch
true after SIGWINCH is received
MxStatus
Return values from mx_mbox_check(), mx_mbox_sync(), and mx_mbox_close()
regex_t regex
Compiled regex.
int mutt_ev_message(struct Mailbox *m, struct EmailList *el, enum EvMessage action)
Edit or view a message.
struct MuttWindow * MessageWindow
Message Window, ":set", etc.
void mutt_timeout_hook(void)
Execute any timeout hooks.
@ SORT_THREADS
Sort by email threads.
@ TRANSFORM_NONE
No transformation.
bool mutt_check_traditional_pgp(struct Mailbox *m, struct EmailList *el, MuttRedrawFlags *redraw)
Check if a message has inline PGP content.
@ MUTT_WIN_ORIENT_HORIZONTAL
Window uses all available horizontal space.
struct ListHead in_reply_to
in-reply-to header content
char * message_id
Message ID.
void mutt_make_string(char *buf, size_t buflen, int cols, const char *s, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
Create formatted strings using mailbox expandos.
WHERE bool OptNeedResort
(pseudo) used to force a re-sort
int * v2r
Mapping from virtual to real msgno.
struct Email ** emails
Array of Emails.
bool mutt_strn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings (to a maximum), safely.
#define CHECK_VISIBLE
Is the selected message visible in the index?
int mutt_system(const char *cmd)
Run an external command.
bool mutt_mailbox_list(void)
List the mailboxes with new mail.
void nntp_expand_path(char *buf, size_t buflen, struct ConnAccount *acct)
Make fully qualified url from newsgroup name.
@ MT_COLOR_STATUS
Status bar (takes a pattern)
String manipulation buffer.
int mutt_monitor_remove(struct Mailbox *m)
Remove a watch for a mailbox.
struct MuttThread * thread
Thread of Emails.
void nm_query_window_forward(void)
Function to move the current search window forward in time.
int log_queue_save(FILE *fp)
Save the contents of the queue to a temporary file.
void mutt_show_error(void)
Show the user an error message.
struct ConnAccount account
Account details: username, password, etc.
LOFF_T offset
offset where the actual data begins
static int mx_toggle_write(struct Mailbox *m)
Toggle the mailbox's readonly flag.
struct Mailbox * ctx_mailbox(struct Context *ctx)
wrapper to get the mailbox in a Context, or NULL
#define MUTT_ACL_INSERT
Add/copy into the mailbox (used when editing a message)
@ SAVE_COPY
Copy message, making a duplicate in another mailbox.
int mutt_window_addnstr(const char *str, int num)
Write a partial string to a Window.
int mutt_parent_message(struct Email *e, bool find_root)
Find the parent of a message.
void window_set_focus(struct MuttWindow *win)
Set the Window focus.
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
void mutt_buffer_pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
#define mutt_next_thread(e)
bool mutt_buffer_is_empty(const struct Buffer *buf)
Is the Buffer empty?
#define MUTT_ACL_DELETE
Delete a message.
struct MuttWindow * index_pager_init(void)
Allocate the Windows for the Index/Pager.
char * nm_url_from_query(struct Mailbox *m, char *buf, size_t buflen)
Turn a query into a URL.
struct Notify * notify
Notifications handler.
#define CHECK_MSGCOUNT
Are there any messages?
#define SEND_KEY
Mail a PGP public key.
static void change_folder_mailbox(struct Menu *menu, struct Mailbox *m, int *oldcount, const struct CurrentEmail *cur, bool read_only)
Change to a different Mailbox by pointer.
@ NT_GLOBAL
Not object-related, NotifyGlobal.
void mutt_window_clearline(struct MuttWindow *win, int row)
Clear a row of a Window.
int mutt_pattern_func(struct Context *ctx, int op, char *prompt)
Perform some Pattern matching.
struct MuttWindow * dialog_find(struct MuttWindow *win)
Find the parent Dialog of a Window.
#define MUTT_SEL_NO_FLAGS
No flags are set.
#define CHECK_READONLY
Is the mailbox readonly?
@ MUTT_PROGRESS_WRITE
Progress tracks elements, according to $write_inc
int index_color(struct Menu *menu, int line)
Calculate the colour for a line of the index - Implements Menu::color()
struct Notify * notify
Notifications handler.
off_t vsize
Size (in bytes) of the messages shown.
bool message_is_tagged(struct Context *ctx, struct Email *e)
Is a message in the index tagged (and within limit)
int mutt_pattern_exec(struct Pattern *pat, PatternExecFlags flags, struct Mailbox *m, struct Email *e, struct PatternCache *cache)
Match a pattern against an email header.
A division of the screen.
void mutt_folder_hook(const char *path, const char *desc)
Perform a folder hook.
@ EVM_VIEW
View the message.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
LOFF_T offset
Where in the stream does this message begin?
void nntp_mailbox(struct Mailbox *m, char *buf, size_t buflen)
Get first newsgroup with new messages.
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
void mutt_check_rescore(struct Mailbox *m)
Do the emails need to have their scores recalculated?
int mutt_messages_in_thread(struct Mailbox *m, struct Email *e, enum MessageInThread mit)
Count the messages in a thread.
char * mutt_str_dup(const char *str)
Copy a string, safely.
FILE * mutt_file_fopen(const char *path, const char *mode)
Call fopen() safely.
@ LL_DEBUG1
Log at debug level 1.
uint8_t flags
e.g. MB_NORMAL
int mutt_strwidth(const char *s)
Measure a string's width in screen cells.
@ SAVE_MOVE
Move message to another mailbox, removing the original.
bool visible
Window is visible.
#define SORT_REVERSE
Reverse the order of the sort.
#define STAILQ_FIRST(head)
void mutt_draw_statusline(int cols, const char *buf, size_t buflen)
Draw a highlighted status bar.
bool mutt_shell_escape(void)
invoke a command in a subshell
struct MuttWindow * RootWindow
Parent of all Windows.
void mutt_update_index(struct Menu *menu, struct Context *ctx, enum MxStatus check, int oldcount, const struct Email *cur_email)
Update the index.
void mutt_print_message(struct Mailbox *m, struct EmailList *el)
Print a message.
@ MUTT_MAILBOX_ERROR
Error occurred examining Mailbox.
void mutt_draw_tree(struct ThreadsContext *tctx)
Draw a tree of threaded emails.
size_t dsize
Length of data.
#define MUTT_MATCH_FULL_ADDRESS
Match the full address.
#define SORT_MASK
Mask for the sort id.
int help_menu
Menu for key bindings, e.g. MENU_PAGER.
int LastKey
contains the last key the user pressed
static bool is_current_email(const struct CurrentEmail *cur, const struct Email *e)
Check whether an email is the currently selected Email.
void ci_bounce_message(struct Mailbox *m, struct EmailList *el)
Bounce an email.
static void update_index_threaded(struct Context *ctx, enum MxStatus check, int oldcount)
Update the index (if threaded)
struct Mailbox * mutt_mailbox_next(struct Mailbox *m_cur, struct Buffer *s)
incoming folders completion routine
int mutt_change_flag(struct Mailbox *m, struct EmailList *el, bool bf)
Change the flag on a Message.
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
@ MUTT_LIMIT
Messages in limited view.
#define STAILQ_EMPTY(head)
enum MailboxType mx_path_probe(const char *path)
Find a mailbox that understands a path.
int mx_tags_commit(struct Mailbox *m, struct Email *e, char *tags)
Save tags to the Mailbox - Wrapper for MxOps::tags_commit()
@ MUTT_WIN_SIZE_MAXIMISE
Window wants as much space as possible.
uint16_t AclFlags
ACL Rights - These show permission to...
struct Mailbox * mx_path_resolve(const char *path)
Get a Mailbox for a path.
int mutt_str_atoi(const char *str, int *dst)
Convert ASCII string to an integer.
#define STAILQ_FOREACH(var, head, field)
off_t mutt_set_vnum(struct Mailbox *m)
Set the virtual index number of all the messages in a mailbox.
int vcount
The number of virtual messages.
void dlg_select_autocrypt_account(struct Mailbox *m)
Display the Autocrypt account Menu.
@ MT_COLOR_NORMAL
Plain text.
@ MX_STATUS_REOPENED
Mailbox was reopened.
void mutt_buffer_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
size_t sequence
Sequence number assigned on creation.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
@ WT_SIDEBAR
Side panel containing Accounts or groups of data.
@ TRANSFORM_DECODE
Decode message.
int mutt_monitor_add(struct Mailbox *m)
Add a watch for a mailbox.
bool mutt_thread_can_collapse(struct Email *e)
Check whether a thread can be collapsed.
char * tree
Character string to print thread tree.
struct MuttThread * prev
Previous sibling Thread.
int msg_in_pager
Message currently shown in the pager.
struct ThreadsContext * threads
Threads context.
@ MUTT_READ
Messages that have been read.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
bool mutt_mailbox_notify(struct Mailbox *m_cur)
Notify the user if there's new mail.
struct MuttThread * parent
Parent of this Thread.
Mapping between user-readable string and a constant.
void mutt_ts_icon(char *str)
Set the icon in the terminal title bar.
@ MX_STATUS_NEW_MAIL
New mail received in Mailbox.
An Event that happened to a Mailbox.
void alias_create(struct AddressList *al, const struct ConfigSubset *sub)
Create a new Alias from an Address.
enum MxStatus mx_mbox_sync(struct Mailbox *m)
Save changes to mailbox.
int mutt_save_message(struct Mailbox *m, struct EmailList *el, enum MessageSaveOpt save_opt, enum MessageTransformOpt transform_opt)
Save an email.
#define PGP_TRADITIONAL_CHECKED
Email has a traditional (inline) signature.
void mutt_sort_headers(struct Mailbox *m, struct ThreadsContext *threads, bool init, off_t *vsize)
Sort emails by their headers.
#define SEND_NEWS
Reply to a news article.
bool dontwrite
Don't write the mailbox on close.
bool old
Email is seen, but unread.
void mutt_progress_init(struct Progress *progress, const char *msg, enum ProgressType type, size_t size)
Set up a progress bar.
@ MUTT_PURGE
Messages to be purged (bypass trash)
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
@ NT_GLOBAL_SHUTDOWN
NeoMutt is about to close.
int nntp_check_children(struct Mailbox *m, const char *msgid)
Fetch children of article with the Message-ID.
int mutt_resend_message(FILE *fp, struct Context *ctx, struct Email *e_cur, struct ConfigSubset *sub)
Resend an email.
enum QuadOption query_quadoption(enum QuadOption opt, const char *prompt)
Ask the user a quad-question.
#define mutt_previous_subthread(e)
#define SEND_FORWARD
Forward email.
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
struct MuttWindow * focus
Focussed Window.
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
void mutt_ts_status(char *str)
Set the text of the terminal title bar.
enum MailboxType type
Mailbox type.
void * mdata
Driver specific data.
void mutt_paddstr(int n, const char *s)
Display a string on screen, padded if necessary.
struct Notify * notify
Notifications system.
bool mutt_edit_content_type(struct Email *e, struct Body *b, FILE *fp)
Edit the content type of an attachment.
short cs_subset_number(const struct ConfigSubset *sub, const char *name)
Get a number config item by name.
static void set_current_email(struct CurrentEmail *cur, struct Email *e)
Keep track of the currently selected Email.
struct Email * e
Current email.
#define SEND_POSTPONED
Recall a postponed email.
void mutt_help(enum MenuType menu)
Display the help menu.
#define SEND_TO_SENDER
Compose new email to sender.
bool visible
Is this message part of the view?
@ MUTT_WIN_ORIENT_VERTICAL
Window uses all available vertical space.
int mutt_do_pager(const char *banner, const char *tempfile, PagerFlags do_color, struct Pager *info)
Display some page-able text to the user.
int mx_tags_edit(struct Mailbox *m, const char *tags, char *buf, size_t buflen)
start the tag editor of the mailbox
@ MUTT_UNDELETE
Messages to be un-deleted.
bool tagged
Email is tagged.
bool mutt_limit_current_thread(struct Context *ctx, struct Email *e)
Limit the email view to the current thread.
enum CommandResult km_bind(char *s, enum MenuType menu, int op, char *macro, char *desc)
Bind a key to a macro.
enum MxStatus mx_mbox_close(struct Context **ptr)
Save changes and close mailbox.
bool notify_observer_remove(struct Notify *notify, observer_t callback, void *global_data)
Remove an observer from an object.
WHERE bool OptAttachMsg
(pseudo) used by attach-message
LOFF_T length
length (in bytes) of attachment
bool changed
Mailbox has been modified.
char * name
A short name for the Mailbox.
const char * OpStrings[][2]
#define APPLICATION_PGP
Use PGP to encrypt/sign.
MessageSaveOpt
Message save option.
void imap_logout_all(void)
close all open connections
void window_redraw(struct MuttWindow *win, bool force)
Reflow, recalc and repaint a tree of Windows.
struct Email * message
Email this Thread refers to.
@ TRANSFORM_DECRYPT
Decrypt message.
int mutt_thread_set_flag(struct Mailbox *m, struct Email *e, enum MessageType flag, bool bf, bool subthread)
Set a flag on an entire thread.
int msg_count
Total number of messages.
int mutt_mailbox_check(struct Mailbox *m_cur, int force)
Check all all Mailboxes for new mail.
WHERE char * LastFolder
Previously selected mailbox.
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
#define CHECK_IN_MAILBOX
Is there a mailbox open?
@ MUTT_UNKNOWN
Mailbox wasn't recognised.
void mutt_resize_screen(void)
Update NeoMutt's opinion about the window size (CURSES)
void mutt_startup_shutdown_hook(HookFlags type)
Execute any startup/shutdown hooks.
int mutt_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile, struct Context *ctx, struct EmailList *el, struct ConfigSubset *sub)
Send an email.
struct MuttWindow * mutt_window_find(struct MuttWindow *root, enum WindowType type)
Find a Window of a given type.
struct MuttWindow * mutt_window_new(enum WindowType type, enum MuttWindowOrientation orient, enum MuttWindowSize size, int cols, int rows)
Create a new Window.
void * global_data
Data from notify_observer_add()
void dlg_select_attachment(struct Email *e)
Show the attachments in a Menu.
void nm_db_longrun_init(struct Mailbox *m, bool writable)
Start a long transaction.
Keep track of the currently selected Email.
@ NT_MAILBOX_SWITCH
Current Mailbox has changed.
void nm_query_window_backward(void)
Function to move the current search window backward in time.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
@ MUTT_IMAP
'IMAP' Mailbox type
static void collapse_all(struct Context *ctx, struct Menu *menu, int toggle)
Collapse/uncollapse all threads.
int mutt_display_message(struct MuttWindow *win_index, struct MuttWindow *win_ibar, struct MuttWindow *win_pager, struct MuttWindow *win_pbar, struct Mailbox *m, struct Email *e)
Display a message in the pager.
#define mutt_collapse_thread(e)
bool display_subject
Used for threading.
@ WT_DLG_INDEX
Index Dialog, index_pager_init()
int pair
Colour pair index.
void mutt_mem_realloc(void *ptr, size_t size)
Resize a block of memory on the heap.
@ MUTT_MH
'MH' Mailbox type
void nm_db_longrun_done(struct Mailbox *m)
Finish a long transaction.
struct Envelope * env
Envelope information.
void mutt_display_address(struct Envelope *env)
Display the address of a message.
#define mutt_debug(LEVEL,...)
static void update_index(struct Menu *menu, struct Context *ctx, enum MxStatus check, int oldcount, const struct CurrentEmail *cur)
Update the index.
int email_max
Number of pointers in emails.
#define MUTT_OPEN_NO_FLAGS
No flags are set.
#define SEND_GROUP_REPLY
Reply to all.
#define MUTT_WIN_SIZE_UNLIMITED
Use as much space as possible.
static int ci_previous_undeleted(struct Mailbox *m, int msgno)
Find the previous undeleted email.
MessageTransformOpt
Message transformation option.
void mutt_pipe_message(struct Mailbox *m, struct EmailList *el)
Pipe a message.
bool collapsed
Are all threads collapsed?
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
void mutt_set_header_color(struct Mailbox *m, struct Email *e)
Select a colour for a message.
@ MUTT_UNTAG
Messages to be un-tagged.
int bool_str_toggle(struct ConfigSubset *sub, const char *name, struct Buffer *err)
Toggle the value of a bool.
#define SEND_NO_FLAGS
No flags are set.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
void mutt_thread_collapse(struct ThreadsContext *tctx, bool collapse)
toggle collapse
@ MX_STATUS_ERROR
An error occurred.
bool flagged
Marked important?
struct NntpAccountData * nntp_select_server(struct Mailbox *m, const char *server, bool leave_lock)
Open a connection to an NNTP server.
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
bool verbose
Display status messages?
static void resort_index(struct Context *ctx, struct Menu *menu)
Resort the index.
WHERE bool OptRedrawTree
(pseudo) redraw the thread tree
struct NntpAccountData * CurrentNewsSrv
Current NNTP news server.
short rows
Number of rows, can be MUTT_WIN_SIZE_UNLIMITED.
struct MuttWindow * parent
Parent Window.
void pop_fetch_mail(void)
Fetch messages and save them in $spool_file.
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
static void change_folder_string(struct Menu *menu, char *buf, size_t buflen, int *oldcount, const struct CurrentEmail *cur, bool *pager_return, bool read_only)
Change to a different Mailbox by string.
void nm_db_debug_check(struct Mailbox *m)
Check if the database is open.
@ MUTT_CURSOR_INVISIBLE
Hide the cursor.
bool collapsed
Is this message part of a collapsed thread?
#define SLIST_FIRST(head)
void index_add_observers(struct MuttWindow *dlg)
Add Observers to the Index Dialog.
enum QuadOption cs_subset_quad(const struct ConfigSubset *sub, const char *name)
Get a quad-value config item by name.
const struct Mapping * help_data
Data for the Help Bar.
void mutt_enter_command(void)
enter a neomutt command
#define MUTT_ACL_WRITE
Write to a message (for flagging or linking threads)
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
#define mutt_next_subthread(e)
short cs_subset_sort(const struct ConfigSubset *sub, const char *name)
Get a sort config item by name.
#define mutt_uncollapse_thread(e)
bool mutt_link_threads(struct Email *parent, struct EmailList *children, struct Mailbox *m)
Forcibly link threads together.
void mutt_flushinp(void)
Empty all the keyboard buffers.
struct WindowState state
Current state of the Window.
struct PatternList * limit_pattern
Compiled limit pattern.
@ WT_INDEX
An Index Window containing a selection list.
void menu_status_line(char *buf, size_t buflen, struct Menu *menu, struct Mailbox *m, const char *p)
Create the status line.
bool deleted
Email is deleted.
void crypt_forget_passphrase(void)
Forget a passphrase and display a message.
#define STAILQ_HEAD_INITIALIZER(head)
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
bool readonly
Don't allow changes to the mailbox.
static bool check_acl(struct Mailbox *m, AclFlags acl, const char *msg)
Check the ACLs for a function.
#define mutt_mktemp(buf, buflen)
void mutt_what_key(void)
Ask the user to press a key.
char * mutt_str_cat(char *buf, size_t buflen, const char *s)
Concatenate two strings.
struct Mailbox * mailbox_find_name(const char *name)
Find the mailbox with a given name.
#define MUTT_SHUTDOWN_HOOK
shutdown-hook: run when leaving NeoMutt
struct ColorLineList index_list
List of default colours applied to the index.
void * compress_info
Compressed mbox module private data.
void mutt_flush_macro_to_endcond(void)
Drop a macro from the input buffer.
uint8_t OpenMailboxFlags
Flags for mutt_open_mailbox(), e.g. MUTT_NOSORT.
@ WT_CONTAINER
Invisible shaping container Window.
@ MUTT_DELETE
Messages to be deleted.
void index_remove_observers(struct MuttWindow *dlg)
Remove Observers from the Index Dialog.
static int ci_first_message(struct Mailbox *m)
Get index of first new message.
struct HashTable * mutt_make_id_hash(struct Mailbox *m)
Create a Hash Table for message-ids.
@ WT_INDEX_BAR
Index Bar containing status info about the Index.
size_t mutt_wstr_trunc(const char *src, size_t maxlen, size_t maxwid, size_t *width)
Work out how to truncate a widechar string.
void * mutt_mem_malloc(size_t size)
Allocate memory on the heap.
WHERE bool OptSearchInvalid
(pseudo) used to invalidate the search pattern
#define CHECK_ATTACH
Is the user in message-attach mode?
struct TagList tags
For drivers that support server tagging.
#define MUTT_MAILBOX_CHECK_FORCE
static struct Mailbox * change_folder_notmuch(struct Menu *menu, char *buf, int buflen, int *oldcount, const struct CurrentEmail *cur, bool read_only)
Change to a different Notmuch Mailbox by string.
int mutt_select_sort(bool reverse)
Ask the user for a sort method.
bool TsSupported
Terminal Setting is supported.
bool mx_tags_is_supported(struct Mailbox *m)
return true if mailbox support tagging
@ MUTT_TAG
Tagged messages.
@ EVM_EDIT
Edit the message.
static int mailbox_index_observer(struct NotifyCallback *nc)
Listen for Mailbox changes - Implements observer_t.
@ MENU_MAIN
Index panel (list of emails)
Container for Accounts, Notifications.
struct Menu * menu
Needed for pattern compilation.
bool nm_message_is_still_queried(struct Mailbox *m, struct Email *e)
Is a message still visible in the query?
struct Context * mx_mbox_open(struct Mailbox *m, OpenMailboxFlags flags)
Open a mailbox and parse it.
void mutt_curses_set_color(enum ColorId color)
Set the current colour for text.
void km_error_key(enum MenuType menu)
Handle an unbound key sequence.
int vnum
Virtual message number.
static struct MuttWindow * create_panel_index(struct MuttWindow *parent, bool status_on_top)
Create the Windows for the Index panel.
@ MUTT_CURSOR_VISIBLE
Display a normal cursor.
MailboxType
Supported mailbox formats.
@ MUTT_WIN_SIZE_FIXED
Window has a fixed size.
int match
Substring to match, 0 for old behaviour.
A regular expression and a color to highlight a line.
int nm_read_entire_thread(struct Mailbox *m, struct Email *e)
Get the entire thread of an email.
int index
The absolute (unsorted) message number.
void mutt_refresh(void)
Force a refresh of the screen.
#define mutt_previous_thread(e)
struct ConfigSubset * sub
Inherited config items.
struct PatternList * color_pattern
Compiled pattern to speed up index color calculation.
WHERE char * CurrentFolder
Currently selected mailbox.
void mutt_progress_update(struct Progress *progress, size_t pos, int percent)
Update the state of the progress bar.
int mutt_window_mvaddstr(struct MuttWindow *win, int col, int row, const char *str)
Move the cursor and write a fixed string to a Window.
#define SEND_LIST_REPLY
Reply to mailing list.
int msg_tagged
How many messages are tagged?
char * pattern
Limit pattern string.
#define STAILQ_NEXT(elm, field)
static void index_custom_redraw(struct Menu *menu)
Redraw the index - Implements Menu::custom_redraw()
int mutt_get_field(const char *field, char *buf, size_t buflen, CompletionFlags complete, bool multiple, char ***files, int *numfiles)
Ask the user for a string.
@ MUTT_MAILDIR
'Maildir' Mailbox type
void crypt_extract_keys_from_messages(struct Mailbox *m, struct EmailList *el)
Extract keys from a message.
int km_dokey(enum MenuType menu)
Determine what a keypress should do.
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
@ MX_STATUS_FLAGS
Nondestructive flags change (IMAP)
bool attach_del
Has an attachment marked for deletion.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
int mutt_buffer_enter_fname(const char *prompt, struct Buffer *fname, bool mailbox, struct Mailbox *m, bool multiple, char ***files, int *numfiles, SelectFileFlags flags)
Ask the user to select a file.
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
int * defs
Array of all fixed colours, see enum ColorId.
void mx_fastclose_mailbox(struct Mailbox *m)
free up memory associated with the Mailbox
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
void mutt_window_add_child(struct MuttWindow *parent, struct MuttWindow *child)
Add a child to Window.
static void update_index_unthreaded(struct Context *ctx, enum MxStatus check)
Update the index (if unthreaded)
uint8_t CheckFlags
Checks to perform before running a function.
void mutt_break_thread(struct Email *e)
Break the email Thread.
char * data
Pointer to data.
The envelope/body of an email.
#define MUTT_ACL_SEEN
Change the 'seen' status of a message.
struct ColorLineList status_list
List of colours applied to the status bar.
void mailbox_gc_run(void)
@ NT_MAILBOX_CLOSED
Mailbox was closed.
#define mutt_message(...)
#define mutt_set_flag(m, e, flag, bf)
void mutt_unget_event(int ch, int op)
Return a keystroke to the input buffer.
void mutt_browser_select_dir(const char *f)
Remember the last directory selected.
void emaillist_clear(struct EmailList *el)
Drop a private list of Emails.
int mx_msg_padding_size(struct Mailbox *m)
Bytes of padding between messages - Wrapper for MxOps::msg_padding_size()
const char * mutt_make_version(void)
Generate the NeoMutt version string.
struct ListHead references
message references (in reverse order)
static struct MuttWindow * create_panel_pager(struct MuttWindow *parent, bool status_on_top)
Create the Windows for the Pager panel.
void mutt_check_stats(struct Mailbox *m)
Forcibly update mailbox stats.
struct NntpMboxData * mutt_newsgroup_catchup(struct Mailbox *m, struct NntpAccountData *adata, char *group)
Catchup newsgroup.
static const struct Mapping IndexNewsHelp[]
Help Bar for the News Index dialog.
#define MUTT_NM_QUERY
Notmuch query mode.
static bool prereq(struct Context *ctx, struct Menu *menu, CheckFlags checks)
Check the pre-requisites for a function.
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
struct HashTable * id_hash
Hash Table by msg id.
void index_pager_shutdown(struct MuttWindow *dlg)
Clear up any non-Window parts.
struct Mailbox * mailbox
The Mailbox this Event relates to.
void query_index(struct ConfigSubset *sub)
Perform an Alias Query and display the results.
bool quasi_deleted
Deleted from neomutt, but not modified on disk.
size_t sequence
Sequence of the current email.
#define mutt_thread_next_unread(e)
NNTP-specific Mailbox data -.
static int ci_next_undeleted(struct Mailbox *m, int msgno)
Find the next undeleted email.
struct Mailbox * mx_mbox_find2(const char *path)
Find a Mailbox on an Account.
Cache commonly-used patterns.
enum MxStatus imap_check_mailbox(struct Mailbox *m, bool force)
use the NOOP or IDLE command to poll for new mail
void mutt_emails_set_flag(struct Mailbox *m, struct EmailList *el, enum MessageType flag, bool bf)
Set flag on messages.
@ MX_STATUS_OK
No changes.
int pair
Color-pair to use when displaying in the index.
#define mutt_thread_contains_unread(e)
struct Body * body
List of MIME parts.
int mutt_index_menu(struct MuttWindow *dlg)
Display a list of emails.
WHERE bool OptNews
(pseudo) used to change reader mode
void mutt_window_reflow(struct MuttWindow *win)
Resize a Window and its children.
struct AddressList * mutt_get_address(struct Envelope *env, const char **prefix)
Get an Address from an Envelope.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
#define MUTT_COMP_NO_FLAGS
No flags are set.