88 {
"alias-dialog", OP_ALIAS_DIALOG },
90 {
"autocrypt-acct-menu", OP_AUTOCRYPT_ACCT_MENU },
92 {
"bounce-message", OP_BOUNCE_MESSAGE },
93 {
"break-thread", OP_MAIN_BREAK_THREAD },
94 {
"catchup", OP_CATCHUP },
95 {
"change-folder", OP_MAIN_CHANGE_FOLDER },
96 {
"change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY },
97 {
"change-newsgroup", OP_MAIN_CHANGE_GROUP },
98 {
"change-newsgroup-readonly", OP_MAIN_CHANGE_GROUP_READONLY },
100 {
"change-vfolder", OP_MAIN_CHANGE_VFOLDER },
102 {
"check-traditional-pgp", OP_CHECK_TRADITIONAL },
103 {
"clear-flag", OP_MAIN_CLEAR_FLAG },
104 {
"close-all-threads", OP_MAIN_CLOSE_ALL_THREADS },
105 {
"close-thread", OP_MAIN_CLOSE_THREAD },
106 {
"collapse-all", OP_MAIN_COLLAPSE_ALL },
107 {
"collapse-thread", OP_MAIN_COLLAPSE_THREAD },
108 {
"compose-to-sender", OP_COMPOSE_TO_SENDER },
109 {
"copy-message", OP_COPY_MESSAGE },
110 {
"create-alias", OP_CREATE_ALIAS },
111 {
"decode-copy", OP_DECODE_COPY },
112 {
"decode-save", OP_DECODE_SAVE },
113 {
"decrypt-copy", OP_DECRYPT_COPY },
114 {
"decrypt-save", OP_DECRYPT_SAVE },
115 {
"delete-message", OP_DELETE },
116 {
"delete-pattern", OP_MAIN_DELETE_PATTERN },
117 {
"delete-subthread", OP_DELETE_SUBTHREAD },
118 {
"delete-thread", OP_DELETE_THREAD },
119 {
"display-address", OP_DISPLAY_ADDRESS },
120 {
"display-message", OP_DISPLAY_MESSAGE },
121 {
"display-toggle-weed", OP_DISPLAY_HEADERS },
122 {
"edit", OP_EDIT_RAW_MESSAGE },
123 {
"edit-label", OP_EDIT_LABEL },
124 {
"edit-or-view-raw-message", OP_EDIT_OR_VIEW_RAW_MESSAGE },
125 {
"edit-raw-message", OP_EDIT_RAW_MESSAGE },
126 {
"edit-type", OP_ATTACH_EDIT_TYPE },
128 {
"entire-thread", OP_MAIN_ENTIRE_THREAD },
131 {
"extract-keys", OP_EXTRACT_KEYS },
132 {
"fetch-mail", OP_MAIN_FETCH_MAIL },
133 {
"flag-message", OP_FLAG_MESSAGE },
134 {
"followup-message", OP_FOLLOWUP },
135 {
"forget-passphrase", OP_FORGET_PASSPHRASE },
136 {
"forward-message", OP_FORWARD_MESSAGE },
137 {
"forward-to-group", OP_FORWARD_TO_GROUP },
138 {
"get-children", OP_GET_CHILDREN },
139 {
"get-message", OP_GET_MESSAGE },
140 {
"get-parent", OP_GET_PARENT },
141 {
"group-chat-reply", OP_GROUP_CHAT_REPLY },
142 {
"group-reply", OP_GROUP_REPLY },
143 {
"imap-fetch-mail", OP_MAIN_IMAP_FETCH },
144 {
"imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL },
145 {
"limit", OP_MAIN_LIMIT },
146 {
"limit-current-thread", OP_LIMIT_CURRENT_THREAD },
147 {
"link-threads", OP_MAIN_LINK_THREADS },
148 {
"list-action", OP_LIST_ACTION },
149 {
"list-reply", OP_LIST_REPLY },
150 {
"list-subscribe", OP_LIST_SUBSCRIBE },
151 {
"list-unsubscribe", OP_LIST_UNSUBSCRIBE },
153 {
"mail-key", OP_MAIL_KEY },
154 {
"mailbox-list", OP_MAILBOX_LIST },
155 {
"mark-message", OP_MARK_MSG },
156 {
"modify-labels", OP_MAIN_MODIFY_TAGS },
157 {
"modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
158 {
"modify-tags", OP_MAIN_MODIFY_TAGS },
159 {
"modify-tags-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
160 {
"next-new", OP_MAIN_NEXT_NEW },
161 {
"next-new-then-unread", OP_MAIN_NEXT_NEW_THEN_UNREAD },
162 {
"next-subthread", OP_MAIN_NEXT_SUBTHREAD },
163 {
"next-thread", OP_MAIN_NEXT_THREAD },
164 {
"next-undeleted", OP_MAIN_NEXT_UNDELETED },
165 {
"next-unread", OP_MAIN_NEXT_UNREAD },
166 {
"next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX },
167 {
"open-all-threads", OP_MAIN_OPEN_ALL_THREADS },
168 {
"open-thread", OP_MAIN_OPEN_THREAD },
169 {
"parent-message", OP_MAIN_PARENT_MESSAGE },
170 {
"pipe-entry", OP_PIPE },
171 {
"pipe-message", OP_PIPE },
172 {
"post-message", OP_POST },
173 {
"previous-new", OP_MAIN_PREV_NEW },
174 {
"previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD },
175 {
"previous-subthread", OP_MAIN_PREV_SUBTHREAD },
176 {
"previous-thread", OP_MAIN_PREV_THREAD },
177 {
"previous-undeleted", OP_MAIN_PREV_UNDELETED },
178 {
"previous-unread", OP_MAIN_PREV_UNREAD },
179 {
"previous-unread-mailbox", OP_MAIN_PREV_UNREAD_MAILBOX },
180 {
"print-message", OP_PRINT },
181 {
"purge-message", OP_PURGE_MESSAGE },
182 {
"purge-thread", OP_PURGE_THREAD },
183 {
"quasi-delete", OP_MAIN_QUASI_DELETE },
184 {
"query", OP_QUERY },
186 {
"read-subthread", OP_MAIN_READ_SUBTHREAD },
187 {
"read-thread", OP_MAIN_READ_THREAD },
188 {
"recall-message", OP_RECALL_MESSAGE },
189 {
"reconstruct-thread", OP_RECONSTRUCT_THREAD },
190 {
"reply", OP_REPLY },
191 {
"resend-message", OP_RESEND },
192 {
"root-message", OP_MAIN_ROOT_MESSAGE },
193 {
"save-message", OP_SAVE },
194 {
"set-flag", OP_MAIN_SET_FLAG },
195 {
"show-limit", OP_MAIN_SHOW_LIMIT },
196 {
"sort-mailbox", OP_SORT },
197 {
"sort-reverse", OP_SORT_REVERSE },
198 {
"sync-mailbox", OP_MAIN_SYNC_FOLDER },
199 {
"tag-pattern", OP_MAIN_TAG_PATTERN },
200 {
"tag-subthread", OP_TAG_SUBTHREAD },
201 {
"tag-thread", OP_TAG_THREAD },
202 {
"toggle-new", OP_TOGGLE_NEW },
203 {
"toggle-read", OP_TOGGLE_READ },
204 {
"toggle-write", OP_TOGGLE_WRITE },
205 {
"undelete-message", OP_UNDELETE },
206 {
"undelete-pattern", OP_MAIN_UNDELETE_PATTERN },
207 {
"undelete-subthread", OP_UNDELETE_SUBTHREAD },
208 {
"undelete-thread", OP_UNDELETE_THREAD },
209 {
"untag-pattern", OP_MAIN_UNTAG_PATTERN },
211 {
"vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY },
212 {
"vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY },
213 {
"vfolder-window-backward", OP_MAIN_WINDOWED_VFOLDER_BACKWARD },
214 {
"vfolder-window-forward", OP_MAIN_WINDOWED_VFOLDER_FORWARD },
215 {
"vfolder-window-reset", OP_MAIN_WINDOWED_VFOLDER_RESET },
217 {
"view-attachments", OP_VIEW_ATTACHMENTS },
218 {
"view-raw-message", OP_VIEW_RAW_MESSAGE },
229 {
"list-archive", OP_LIST_ARCHIVE },
230 {
"list-help", OP_LIST_HELP },
231 {
"list-owner", OP_LIST_OWNER },
232 {
"list-post", OP_LIST_POST },
233 {
"list-subscribe", OP_LIST_SUBSCRIBE },
234 {
"list-unsubscribe", OP_LIST_UNSUBSCRIBE },
242 { OP_ATTACH_EDIT_TYPE,
"\005" },
244 { OP_AUTOCRYPT_ACCT_MENU,
"A" },
246 { OP_BOUNCE_MESSAGE,
"b" },
247 { OP_CHECK_TRADITIONAL,
"\033P" },
248 { OP_COPY_MESSAGE,
"C" },
249 { OP_CREATE_ALIAS,
"a" },
250 { OP_DECODE_COPY,
"\033C" },
251 { OP_DECODE_SAVE,
"\033s" },
253 { OP_DELETE_SUBTHREAD,
"\033d" },
254 { OP_DELETE_THREAD,
"\004" },
255 { OP_DISPLAY_ADDRESS,
"@" },
256 { OP_DISPLAY_HEADERS,
"h" },
257 { OP_DISPLAY_MESSAGE,
" " },
258 { OP_DISPLAY_MESSAGE,
"<keypadenter>" },
259 { OP_DISPLAY_MESSAGE,
"\n" },
260 { OP_DISPLAY_MESSAGE,
"\r" },
261 { OP_EDIT_LABEL,
"Y" },
262 { OP_EDIT_OR_VIEW_RAW_MESSAGE,
"e" },
264 { OP_EXTRACT_KEYS,
"\013" },
265 { OP_FLAG_MESSAGE,
"F" },
266 { OP_FORGET_PASSPHRASE,
"\006" },
267 { OP_FORWARD_MESSAGE,
"f" },
268 { OP_GROUP_REPLY,
"g" },
269 { OP_LIST_ACTION,
"\033L" },
270 { OP_LIST_REPLY,
"L" },
272 { OP_MAILBOX_LIST,
"." },
273 { OP_MAIL_KEY,
"\033k" },
274 { OP_MAIN_BREAK_THREAD,
"#" },
275 { OP_MAIN_CHANGE_FOLDER,
"c" },
276 { OP_MAIN_CHANGE_FOLDER_READONLY,
"\033c" },
277 { OP_MAIN_CHANGE_GROUP,
"i" },
278 { OP_MAIN_CHANGE_GROUP_READONLY,
"\033i" },
279 { OP_MAIN_CLEAR_FLAG,
"W" },
280 { OP_MAIN_COLLAPSE_ALL,
"\033V" },
281 { OP_MAIN_COLLAPSE_THREAD,
"\033v" },
282 { OP_MAIN_DELETE_PATTERN,
"D" },
283 { OP_MAIN_FETCH_MAIL,
"G" },
284 { OP_MAIN_LIMIT,
"l" },
285 { OP_MAIN_LINK_THREADS,
"&" },
286 { OP_MAIN_NEXT_NEW_THEN_UNREAD,
"\t" },
287 { OP_MAIN_NEXT_SUBTHREAD,
"\033n" },
288 { OP_MAIN_NEXT_THREAD,
"\016" },
289 { OP_MAIN_NEXT_UNDELETED,
"<down>" },
290 { OP_MAIN_NEXT_UNDELETED,
"j" },
291 { OP_MAIN_PARENT_MESSAGE,
"P" },
292 { OP_MAIN_PREV_NEW_THEN_UNREAD,
"\033\t" },
293 { OP_MAIN_PREV_SUBTHREAD,
"\033p" },
294 { OP_MAIN_PREV_THREAD,
"\020" },
295 { OP_MAIN_PREV_UNDELETED,
"<up>" },
296 { OP_MAIN_PREV_UNDELETED,
"k" },
297 { OP_MAIN_READ_SUBTHREAD,
"\033r" },
298 { OP_MAIN_READ_THREAD,
"\022" },
299 { OP_MAIN_SET_FLAG,
"w" },
300 { OP_MAIN_SHOW_LIMIT,
"\033l" },
301 { OP_MAIN_SYNC_FOLDER,
"$" },
302 { OP_MAIN_TAG_PATTERN,
"T" },
303 { OP_MAIN_UNDELETE_PATTERN,
"U" },
304 { OP_MAIN_UNTAG_PATTERN,
"\024" },
305 { OP_MARK_MSG,
"~" },
306 { OP_NEXT_ENTRY,
"J" },
308 { OP_PREV_ENTRY,
"K" },
312 { OP_RECALL_MESSAGE,
"R" },
314 { OP_RESEND,
"\033e" },
316 { OP_SHOW_LOG_MESSAGES,
"M" },
318 { OP_SORT_REVERSE,
"O" },
319 { OP_TAG_THREAD,
"\033t" },
320 { OP_TOGGLE_NEW,
"N" },
321 { OP_TOGGLE_WRITE,
"%" },
322 { OP_UNDELETE,
"u" },
323 { OP_UNDELETE_SUBTHREAD,
"\033u" },
324 { OP_UNDELETE_THREAD,
"\025" },
325 { OP_VIEW_ATTACHMENTS,
"v" },
334 { OP_LIST_ARCHIVE,
"a" },
335 { OP_LIST_HELP,
"h" },
336 { OP_LIST_OWNER,
"o" },
337 { OP_LIST_POST,
"p" },
338 { OP_LIST_SUBSCRIBE,
"s" },
339 { OP_LIST_UNSUBSCRIBE,
"u" },
362 struct SubMenu *sm_index = NULL;
363 struct SubMenu *sm_list = NULL;
403 count =
MAX(count, 1);
409 index = index + count;
415 for (
int i = 0; i < count; i++)
426 for (
int i = 0; i < count; i++)
439 for (
int i = 0; i < count; i++)
503 struct Email *e,
bool use_tagged,
int count)
514 const int index = e->
vnum;
518 int n = (count > 1) ? count : 1;
522 for (
int i = 0; i < n; i++)
569 struct Email **ep = NULL;
592 bool use_tagged,
bool subthread,
int count)
606 const int n = (count > 1) ? count : 1;
727 struct AddressList *al = NULL;
786 if (!priv || !priv->
menu || !email)
789 int index = email->
vnum;
823 bool changed =
false;
824 bool blocked =
false;
825 struct Email **ep = NULL;
828 struct Email *e = *ep;
874 mutt_warning(
_(
"Thread contains unread or flagged messages"));
908 const int op =
event->op;
909 const bool subthread = (op == OP_DELETE_SUBTHREAD);
915 struct Email **ep = NULL;
922 if (op == OP_PURGE_THREAD)
977 if (event->
count > 0)
985 if (op == OP_DISPLAY_HEADERS)
1000 if (c_uncollapse_jump)
1005 if (c_pgp_auto_decode &&
1062 if (num_changed > 0)
1068 mutt_message(ngettext(
"%d label changed",
"%d labels changed", num_changed), num_changed);
1096 const int op =
event->op;
1097 if (op == OP_EDIT_RAW_MESSAGE)
1104 else if (op == OP_EDIT_OR_VIEW_RAW_MESSAGE)
1116 if (c_pgp_auto_decode &&
1204 struct Email **ep = NULL;
1244 if (c_pgp_auto_decode &&
1270 if (event->
op == OP_GROUP_REPLY)
1279 if (c_pgp_auto_decode &&
1303 int num =
event->count;
1314 if (!mutt_str_atoi_full(
buf_string(buf), &num))
1373 if (c_pgp_auto_decode &&
1458 const bool has_repeat_count = (
event->count > 0);
1474 bool changed =
false;
1475 struct Email **ep = NULL;
1498 else if (!has_repeat_count)
1500 mutt_error(
_(
"Thread can't be broken, message is not part of a thread"));
1525 const int op =
event->op;
1526 if (shared->
attach_msg || c_read_only || (op == OP_MAIN_CHANGE_FOLDER_READONLY))
1528 cp =
_(
"Open mailbox in read-only mode");
1533 cp =
_(
"Open mailbox");
1537 const bool c_change_folder_next =
cs_subset_bool(shared->
sub,
"change_folder_next");
1549 goto changefoldercleanup;
1558 goto changefoldercleanup;
1721 const int op =
event->op;
1722 if (op == OP_TOGGLE_READ)
1743 if (((op == OP_LIMIT_CURRENT_THREAD) &&
1745 (op == OP_TOGGLE_READ) ||
1747 _(
"Limit to messages matching: ")) == 0)))
1759 if (e->
index == old_index)
1811 mutt_error(
_(
"No Message-ID: header available to link thread"));
1820 const bool tag_prefix = (
event->count < 1);
1826 if (ep && (*ep == e))
1864 struct Buffer *buf = NULL;
1872 mutt_message(
_(
"Folder doesn't support tagging, aborting"));
1881 const int op =
event->op;
1905 struct Progress *progress = NULL;
1917 struct Email **ep = NULL;
1921 struct Email *e = *ep;
1926 if (op == OP_MAIN_MODIFY_TAGS_THEN_HIDE)
1928 bool still_queried =
false;
1945 (op == OP_MAIN_MODIFY_TAGS_THEN_HIDE) ? 1 : num);
1955 if (op == OP_MAIN_MODIFY_TAGS_THEN_HIDE)
1957 bool still_queried =
false;
1967 (op == OP_MAIN_MODIFY_TAGS_THEN_HIDE) ? 1 : num);
1999 int first_unread = -1;
2004 for (
int i = 0; i < m->
vcount; i++)
2009 if (mcur > (m->
vcount - 1))
2025 if ((unread != 0) && (first_unread == -1))
2026 first_unread = mcur;
2027 if ((unread == 1) && (first_new == -1))
2032 if (first_unread == -1)
2033 first_unread = mcur;
2034 if (!e->
old && (first_new == -1))
2038 if (((op == OP_MAIN_NEXT_UNREAD) || (op == OP_MAIN_PREV_UNREAD)) && (first_unread != -1))
2040 if (((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_PREV_NEW) ||
2041 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD) || (op == OP_MAIN_PREV_NEW_THEN_UNREAD)) &&
2048 if (((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_PREV_NEW) ||
2049 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD) || (op == OP_MAIN_PREV_NEW_THEN_UNREAD)) &&
2054 if (((op == OP_MAIN_NEXT_UNREAD) || (op == OP_MAIN_PREV_UNREAD) ||
2055 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD) || (op == OP_MAIN_PREV_NEW_THEN_UNREAD)) &&
2056 (first_unread != -1))
2058 return first_unread;
2070 const int op =
event->op;
2071 const bool forwards = (op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_NEXT_UNREAD) ||
2072 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD);
2073 const int count =
event->count;
2077 int cur = saved_current;
2078 int last_good = saved_current;
2079 for (
int i = 0; i < count; i++)
2087 if (last_good != saved_current)
2097 if ((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_PREV_NEW))
2100 mutt_error(
_(
"No new messages in this limited view"));
2107 mutt_error(
_(
"No unread messages in this limited view"));
2120 if (saved_current > index)
2125 else if (saved_current < index)
2146 const int op =
event->op;
2147 const int count =
event->count;
2148 const bool forwards = (op == OP_MAIN_NEXT_THREAD) || (op == OP_MAIN_NEXT_SUBTHREAD);
2149 const bool subthreads = (op == OP_MAIN_NEXT_SUBTHREAD) || (op == OP_MAIN_PREV_SUBTHREAD);
2153 for (
int i = 0; i < count; i++)
2189 const int count =
event->count;
2195 int last_good = index;
2196 for (
int i = 0; i < count; i++)
2297 const int count =
event->count;
2303 int last_good = index;
2304 for (
int i = 0; i < count; i++)
2366 struct Email **ep = NULL;
2398 const int op =
event->op;
2399 const bool subthread = (op != OP_MAIN_READ_THREAD);
2406 struct Email **ep = NULL;
2445 int count =
event->op == OP_MAIN_ROOT_MESSAGE ? 0 :
MAX(event->
count, 1);
2526 struct Email *e = NULL;
2627 _(
"Undelete messages matching: ")) == 0)
2667 NULL, NULL) == 0) &&
2670 const char *
const c_mark_macro_prefix =
cs_subset_string(shared->
sub,
"mark_macro_prefix");
2671 char str[256] = { 0 };
2672 snprintf(str,
sizeof(str),
"%s%s", c_mark_macro_prefix,
buf_string(buf));
2676 char macro[256] = { 0 };
2677 snprintf(macro,
sizeof(macro),
"<search>~i '%s'\n",
buf_string(msg_id));
2717 if (event->
count == 0)
2764 if (event->
count == 0)
2882 if (c_pgp_auto_decode &&
2907 for (
size_t i = 0; i < m->
msg_count; i++)
2940 const int op =
event->op;
2941 if (((op == OP_DECRYPT_COPY) || (op == OP_DECRYPT_SAVE)) && !
WithCrypto)
2954 const enum MessageSaveOpt save_opt = ((op == OP_SAVE) || (op == OP_DECODE_SAVE) ||
2955 (op == OP_DECRYPT_SAVE)) ?
2997 case OP_SEARCH_REVERSE:
3001 case OP_SEARCH_NEXT:
3003 case OP_SEARCH_OPPOSITE:
3054 for (
size_t i = 0; i < m->
msg_count; i++)
3072 for (
int i = 0; i < count && current_index + i < shared->
mailbox->
vcount; i++)
3099 const int op =
event->op;
3135 struct Email **ep = NULL;
3138 if ((*ep)->read || (*ep)->old)
3226 const int op =
event->op;
3227 const bool subthread = (op != OP_UNDELETE_THREAD);
3234 struct Email **ep = NULL;
3387 int oldindex = e->
index;
3392 mutt_error(
_(
"No Message-ID. Unable to perform operation."));
3401 const int op =
event->op;
3403 if (op == OP_RECONSTRUCT_THREAD)
3450 if (e2->
index == oldindex)
3463 mutt_error(
_(
"No deleted messages found in the thread"));
3488 const int op =
event->op;
3489 if (op == OP_GET_MESSAGE)
3525 mutt_error(
_(
"Message is not visible in limited view"));
3571 const int op =
event->op;
3572 if (shared->
attach_msg || c_read_only || (op == OP_MAIN_CHANGE_GROUP_READONLY))
3574 cp =
_(
"Open newsgroup in read-only mode");
3579 cp =
_(
"Open newsgroup");
3583 const bool c_change_folder_next =
cs_subset_bool(shared->
sub,
"change_folder_next");
3595 goto changefoldercleanup2;
3602 goto changefoldercleanup2;
3611 goto changefoldercleanup2;
3626changefoldercleanup2:
3646 const int op =
event->op;
3650 "followup_to_poster") !=
MUTT_YES))
3654 (
query_quadoption(
_(
"Posting to this group not allowed, may be moderated. Continue?"),
3668 NULL, NULL, shared->
mailbox, &ea, shared->
sub);
3675 struct KeyEvent event_r = { 0, OP_REPLY };
3692 mutt_message(
_(
"No virtual folder and no Message-ID, aborting"));
3700 int msg_id_offset = 0;
3708 if (buf->
data[len - 1] ==
'>')
3709 buf->
data[len - 1] =
'\0';
3724 mutt_error(
_(
"failed to find message in notmuch database. try running 'notmuch new'."));
3786 const int op =
event->op;
3789 (op == OP_MAIN_VFOLDER_FROM_QUERY_READONLY));
3793 m_query->
name = query_unencoded;
3794 query_unencoded = NULL;
3799 FREE(&query_unencoded);
3827 if (!c_nm_query_window_current_search)
3836 case OP_MAIN_WINDOWED_VFOLDER_BACKWARD:
3839 case OP_MAIN_WINDOWED_VFOLDER_FORWARD:
3842 case OP_MAIN_WINDOWED_VFOLDER_RESET:
3849 mutt_str_copy(buf, c_nm_query_window_current_search,
sizeof(buf));
3912 mutt_error(
_(
"Function not permitted in attach-message mode"));
4077 const int op =
event->op;
void alias_create(struct AddressList *al, const struct ConfigSubset *sub)
Create a new Alias from an Address.
struct AddressList * mutt_get_address(struct Envelope *env, const char **prefix)
Get an Address from an Envelope.
#define ARRAY_ADD(head, elem)
Add an element at the end of the array.
#define ARRAY_REMOVE(head, elem)
Remove an entry from the array, shifting down the subsequent entries.
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
#define ARRAY_EMPTY(head)
Check if an array is empty.
#define ARRAY_SIZE(head)
The number of elements stored.
#define ARRAY_FREE(head)
Release all memory.
#define ARRAY_GET(head, idx)
Return the element at index.
#define ARRAY_HEAD_INITIALIZER
Static initializer for arrays.
GUI display the mailboxes in a side panel.
Autocrypt end-to-end encryption.
int bool_str_toggle(struct ConfigSubset *sub, const char *name, struct Buffer *err)
Toggle the value of a bool.
Select a Mailbox from a list.
@ MUTT_SEL_NONE
No flags are set.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
size_t buf_len(const struct Buffer *buf)
Calculate the length of a Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
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_SHUTDOWN_HOOK
:shutdown-hook
@ CMD_MESSAGE_HOOK
:message-hook
void mutt_pattern_free(struct PatternList **pat)
Free a Pattern.
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.
void mailbox_free(struct Mailbox **ptr)
Free a Mailbox.
@ NT_MAILBOX_CHANGE
Mailbox has been changed.
@ MUTT_ACL_WRITE
Write to a message (for flagging or linking threads)
@ MUTT_ACL_INSERT
Add/copy into the mailbox (used when editing a message)
@ MUTT_ACL_DELETE
Delete a message.
@ MUTT_ACL_SEEN
Change the 'seen' status of a message.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
@ MUTT_MH
'MH' Mailbox type
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
@ MUTT_IMAP
'IMAP' Mailbox type
@ MUTT_MAILDIR
'Maildir' Mailbox type
void crypt_extract_keys_from_messages(struct Mailbox *m, struct EmailArray *ea)
Extract keys from a message.
void crypt_forget_passphrase(void)
Forget a passphrase and display a message.
struct MuttWindow * dialog_find(struct MuttWindow *win)
Find the parent Dialog of a Window.
const char * dispatcher_get_retval_name(int rv)
Get the name of a return value.
void dispatcher_flush_on_error(int rv)
Flush pending keys after a dispatch error.
FunctionRetval
Possible return values for NeoMutt functions.
@ FR_SUCCESS
Valid function - successfully performed.
@ FR_DONE
Exit the Dialog.
@ FR_UNKNOWN
Unknown function.
@ FR_ERROR
Valid function - error occurred.
@ FR_NOT_IMPL
Invalid function - feature not enabled.
@ FR_NO_ACTION
Valid function - no action performed.
void alias_dialog(struct Mailbox *m, struct ConfigSubset *sub)
Open the aliases dialog.
void mutt_browser_select_dir(const char *f)
Remember the last directory selected.
bool check_acl(struct Mailbox *m, AclFlags acl, const char *msg)
Check the ACLs for a function.
const struct Mapping IndexNewsHelp[]
Help Bar for the News Index dialog.
void change_folder_mailbox(struct Menu *menu, struct Mailbox *m, int *oldcount, struct IndexSharedData *shared, bool read_only)
Change to a different Mailbox by pointer.
struct Mailbox * change_folder_notmuch(struct Menu *menu, char *buf, int buflen, int *oldcount, struct IndexSharedData *shared, bool read_only)
Change to a different Notmuch Mailbox by string.
void update_index(struct Menu *menu, struct MailboxView *mv, enum MxStatus check, int oldcount, const struct IndexSharedData *shared)
Update the index.
int find_first_message(struct MailboxView *mv)
Get index of first new message.
void resort_index(struct MailboxView *mv, struct Menu *menu)
Resort the index.
int find_next_undeleted(struct MailboxView *mv, int msgno, bool uncollapse)
Find the next undeleted email.
void change_folder_string(struct Menu *menu, struct Buffer *buf, int *oldcount, struct IndexSharedData *shared, bool read_only)
Change to a different Mailbox by string.
int find_previous_undeleted(struct MailboxView *mv, int msgno, bool uncollapse)
Find the previous undeleted email.
void collapse_all(struct MailboxView *mv, struct Menu *menu, enum CollapseMode mode)
Collapse/uncollapse all threads.
void query_index(struct Mailbox *m, struct ConfigSubset *sub)
Perform an Alias Query and display the results.
int mutt_ev_message(struct Mailbox *m, struct EmailArray *ea, enum EvMessage action)
Edit or view a message.
@ MUTT_COMP_NONE
No flags are set.
Structs that make up an email.
void mutt_sort_headers(struct MailboxView *mv, bool init)
Sort emails by their headers.
bool OptNeedResort
(pseudo) used to force a re-sort
void mutt_break_thread(struct Email *e)
Break the email Thread.
struct Email * find_virtual(struct MuttThread *cur, bool reverse)
Find an email with a Virtual message number.
bool mutt_select_sort(bool reverse)
Ask the user for a sort method.
void mutt_pipe_message(struct Mailbox *m, struct EmailArray *ea)
Pipe a message.
bool mutt_check_traditional_pgp(struct Mailbox *m, struct EmailArray *ea)
Check if a message has inline PGP content.
void index_bounce_message(struct Mailbox *m, struct EmailArray *ea)
Bounce an email.
int mutt_save_message(struct Mailbox *m, struct EmailArray *ea, enum MessageSaveOpt save_opt, enum MessageTransformOpt transform_opt)
Save an email.
bool mutt_edit_content_type(struct Email *e, struct Body *b, FILE *fp)
Edit the content type of an attachment.
bool mutt_print_message(struct Mailbox *m, struct EmailArray *ea)
Print a message.
void mutt_display_address(struct Envelope *env)
Display the address of a message.
Manage where the email is piped to external commands.
MessageTransformOpt
Message transformation option.
@ TRANSFORM_NONE
No transformation.
@ TRANSFORM_DECODE
Decode message.
@ TRANSFORM_DECRYPT
Decrypt message.
MessageSaveOpt
Message save option.
@ SAVE_MOVE
Move message to another mailbox, removing the original.
@ SAVE_COPY
Copy message, making a duplicate in another mailbox.
int mutt_file_sanitize_regex(struct Buffer *dest, const char *src)
Escape any regex-magic characters in a string.
void mutt_set_flag(struct Mailbox *m, struct Email *e, enum MessageType flag, bool bf, bool upd_mbox)
Set a flag on an email.
void mutt_emails_set_flag(struct Mailbox *m, struct EmailArray *ea, enum MessageType flag, bool bf)
Set flag on messages.
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.
void mutt_flushinp(void)
MacroEvents moved to KeyModuleData UngetKeyEvents moved to KeyModuleData.
@ MFF_DEPRECATED
Function is deprecated.
bool OptNews
(pseudo) used to change reader mode
static int op_main_limit(struct AliasFunctionData *fdata, const struct KeyEvent *event)
show only messages matching a pattern - Implements alias_function_t -
static int op_query(struct AliasFunctionData *fdata, const struct KeyEvent *event)
query external program for addresses - Implements alias_function_t -
static int op_create_alias(struct AliasFunctionData *fdata, const struct KeyEvent *event)
create an alias from a message sender - Implements alias_function_t -
static int op_jump(struct AliasFunctionData *fdata, const struct KeyEvent *event)
Jump to an index number - Implements alias_function_t -.
static int op_main_untag_pattern(struct AliasFunctionData *fdata, const struct KeyEvent *event)
Untag messages matching a pattern - Implements alias_function_t -.
static int op_main_tag_pattern(struct AliasFunctionData *fdata, const struct KeyEvent *event)
Tag messages matching a pattern - Implements alias_function_t -.
static int op_exit(struct AliasFunctionData *fdata, const struct KeyEvent *event)
exit this menu - Implements alias_function_t -
static int op_mail(struct AliasFunctionData *fdata, const struct KeyEvent *event)
mail the selected entries - Implements alias_function_t -
static int op_delete(struct AliasFunctionData *fdata, const struct KeyEvent *event)
delete the current entry - Implements alias_function_t -
static int op_search(struct AliasFunctionData *fdata, const struct KeyEvent *event)
search for a regular expression - Implements alias_function_t -
static int op_sort(struct AliasFunctionData *fdata, const struct KeyEvent *event)
sort aliases - Implements alias_function_t -
static int op_list_unsubscribe(struct AttachFunctionData *fdata, const struct KeyEvent *event)
unsubscribe from a mailing list - Implements attach_function_t -
static int op_attach_edit_type(struct AttachFunctionData *fdata, const struct KeyEvent *event)
edit attachment content type - Implements attach_function_t -
static int op_resend(struct AttachFunctionData *fdata, const struct KeyEvent *event)
use the current message as a template for a new one - Implements attach_function_t -
static int op_forward_message(struct AttachFunctionData *fdata, const struct KeyEvent *event)
forward a message with comments - Implements attach_function_t -
static int op_compose_to_sender(struct AttachFunctionData *fdata, const struct KeyEvent *event)
compose new message to the current message sender - Implements attach_function_t -
static int op_list_subscribe(struct AttachFunctionData *fdata, const struct KeyEvent *event)
subscribe to a mailing list - Implements attach_function_t -
static int op_check_traditional(struct AttachFunctionData *fdata, const struct KeyEvent *event)
check for classic PGP - Implements attach_function_t -
static int op_extract_keys(struct AttachFunctionData *fdata, const struct KeyEvent *event)
extract supported public keys - Implements attach_function_t -
static int op_reply(struct AttachFunctionData *fdata, const struct KeyEvent *event)
reply to a message - Implements attach_function_t -
static int op_bounce_message(struct AttachFunctionData *fdata, const struct KeyEvent *event)
remail a message to another user - Implements attach_function_t -
static int op_forget_passphrase(struct AttachFunctionData *fdata, const struct KeyEvent *event)
wipe passphrases from memory - Implements attach_function_t -
static int op_mailbox_list(struct BrowserPrivateData *priv, const struct KeyEvent *event)
List mailboxes with new mail - Implements browser_function_t -.
static int op_catchup(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Mark all articles in newsgroup as read - Implements browser_function_t -.
int index_function_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
Perform an Index function - Implements function_dispatcher_t -.
void dlg_list(struct Mailbox *m, struct Email *e)
Display mailing-list actions for an email -.
void dlg_attach(struct ConfigSubset *sub, struct MailboxView *mv, struct Email *e, FILE *fp, bool attach_msg)
Show the attachments in a Menu -.
void dlg_autocrypt(void)
Display the Autocrypt account Menu -.
int mw_change_flag(struct Mailbox *m, struct EmailArray *ea, bool bf)
Change the flag on a Message -.
int mw_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 mw_get_field(const char *prompt, struct Buffer *buf, CompletionFlags complete, enum HistoryClass hclass, const struct CompleteOps *comp_api, void *cdata)
Ask the user for a string -.
static int op_quit(struct HistoryData *hd, const struct KeyEvent *event)
Quit this menu - Implements history_function_t -.
static int op_edit_label(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Add, change, or delete a message's label - Implements index_function_t -.
static int op_display_address(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Display full address of sender - Implements index_function_t -.
static int op_next_entry(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Move to the next entry - Implements index_function_t -.
static int op_main_undelete_pattern(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Undelete messages matching a pattern - Implements index_function_t -.
static int op_main_link_threads(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Link tagged message to the current one - Implements index_function_t -.
static int op_get_children(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Get all children of the current message - Implements index_function_t -.
static int op_main_prev_undeleted(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Move to the previous undeleted message - Implements index_function_t -.
static int op_main_imap_fetch(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Force retrieval of mail from IMAP server - Implements index_function_t -.
static int op_display_message(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Display a message - Implements index_function_t -.
static int op_list_reply(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Reply to specified mailing list - Implements index_function_t -.
static int op_main_vfolder_from_query(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Generate virtual folder from query - Implements index_function_t -.
static int op_save(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Make decrypted copy - Implements index_function_t -.
static int op_main_next_unread_mailbox(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Open next mailbox with unread mail - Implements index_function_t -.
static int op_list_action(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Show mailing-list actions - Implements index_function_t -.
static int op_mail_key(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Mail a PGP public key - Implements index_function_t -.
static int op_alias_dialog(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Open the aliases dialog - Implements index_function_t -.
static int op_main_show_limit(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Show currently active limit pattern - Implements index_function_t -.
static int op_recall_message(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Recall a postponed message - Implements index_function_t -.
static int op_main_sync_folder(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Save changes to mailbox - Implements index_function_t -.
static int op_main_windowed_vfolder(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Shifts virtual folder time window - Implements index_function_t -.
static int op_tag_thread(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Tag the current thread - Implements index_function_t -.
static int op_edit_raw_message(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Edit the raw message (edit and edit-raw-message are synonyms) - Implements index_function_t -.
static int op_post(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Followup to newsgroup - Implements index_function_t -.
static int op_get_message(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Get parent of the current message - Implements index_function_t -.
static int op_delete_thread(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Delete all messages in thread - Implements index_function_t -.
static int op_pipe(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Pipe message/attachment to a shell command - Implements index_function_t -.
static int op_main_break_thread(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Break the thread in two - Implements index_function_t -.
static int op_group_reply(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Reply to all recipients - Implements index_function_t -.
static int op_toggle_new(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Toggle a message's 'new' flag - Implements index_function_t -.
static int op_main_imap_logout_all(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Logout from all IMAP servers - Implements index_function_t -.
static int op_main_close_all_threads(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Collapse all threads - Implements index_function_t -.
static int op_main_open_all_threads(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Open all threads - Implements index_function_t -.
static int op_end_cond(struct IndexFunctionData *fdata, const struct KeyEvent *event)
End of conditional execution (noop) - Implements index_function_t -.
static int op_print(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Print the current entry - Implements index_function_t -.
static int op_view_attachments(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Show MIME attachments - Implements index_function_t -.
static int op_toggle_write(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Toggle whether the mailbox will be rewritten - Implements index_function_t -.
static int op_main_change_folder(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Open a different folder - Implements index_function_t -.
static int op_main_fetch_mail(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Retrieve mail from POP server - Implements index_function_t -.
static int op_main_prev_unread_mailbox(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Open previous mailbox with unread mail - Implements index_function_t -.
static int op_main_collapse_all(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Collapse/uncollapse all threads - Implements index_function_t -.
static int op_main_next_undeleted(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Move to the next undeleted message - Implements index_function_t -.
static int find_next_new_email(struct Mailbox *m, int start, bool forwards, int op)
Jump to next new message - Implements index_function_t -.
static int op_autocrypt_acct_menu(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Manage autocrypt accounts - Implements index_function_t -.
static int op_tag(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Tag the current entry - Implements index_function_t -.
static int op_main_open_thread(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Open current thread - Implements index_function_t -.
static int op_undelete(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Undelete the current entry - Implements index_function_t -.
static int op_main_collapse_thread(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Collapse/uncollapse current thread - Implements index_function_t -.
static int op_main_next_thread(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Jump to the next thread - Implements index_function_t -.
static int op_main_delete_pattern(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Delete messages matching a pattern - Implements index_function_t -.
static int op_main_entire_thread(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Read entire thread of the current message - Implements index_function_t -.
static int op_mark_msg(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Create a hotkey macro for the current message - Implements index_function_t -.
static int op_main_quasi_delete(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Delete from NeoMutt, don't touch on disk - Implements index_function_t -.
static int op_undelete_thread(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Undelete all messages in thread - Implements index_function_t -.
static int op_main_set_flag(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Set a status flag on a message - Implements index_function_t -.
static int op_main_root_message(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Jump to root message in thread - Implements index_function_t -.
static int op_main_read_thread(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Mark the current thread as read - Implements index_function_t -.
static int op_main_change_group(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Open a different newsgroup - Implements index_function_t -.
static int op_main_close_thread(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Collapse current thread - Implements index_function_t -.
static int op_prev_entry(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Move to the previous entry - Implements index_function_t -.
static int op_flag_message(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Toggle a message's 'important' flag - Implements index_function_t -.
static int op_main_modify_tags(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Modify (notmuch/imap) tags - Implements index_function_t -.
#define mutt_warning(...)
#define mutt_message(...)
#define mutt_debug(LEVEL,...)
Convenience wrapper for the gui headers.
int mutt_parent_message(struct Email *e, bool find_root, int count)
Find the parent of a message.
bool mutt_link_threads(struct Email *parent, struct EmailArray *children, struct Mailbox *m)
Forcibly link threads together.
void mutt_draw_tree(struct ThreadsContext *tctx)
Draw a tree of threaded emails.
int mutt_messages_in_thread(struct Mailbox *m, struct Email *e, enum MessageInThread mit)
Count the messages in a thread.
off_t mutt_set_vnum(struct Mailbox *m)
Set the virtual index number of all the messages in a mailbox.
int mutt_aside_thread(struct Email *e, bool forwards, bool subthreads)
Find the next/previous (sub)thread.
bool mutt_thread_can_collapse(struct Email *e)
Check whether a thread can be collapsed.
struct HashTable * mutt_make_id_hash(struct Mailbox *m)
Create a Hash Table for Message-IDs.
#define mutt_thread_next_unread(e)
#define mutt_using_threads()
#define mutt_uncollapse_thread(e)
@ MIT_POSITION
Our position in the thread.
#define mutt_next_subthread(e)
#define mutt_thread_contains_unread(e)
#define mutt_next_thread(e)
#define mutt_collapse_thread(e)
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
Read/write command history from/to a file.
@ HC_OTHER
Miscellaneous strings.
void exec_startup_shutdown_hook(enum CommandId id)
Execute any startup/shutdown hooks.
void exec_message_hook(struct Mailbox *m, struct Email *e, enum CommandId id)
Perform a message hook.
void imap_logout_all(void)
Close all open connections.
enum MxStatus imap_check_mailbox(struct Mailbox *m, bool force)
Use the NOOP or IDLE command to poll for new mail.
static int op_main_change_thread(struct IndexFunctionData *fdata, struct EmailArray *ea, enum CollapseMode mode)
Open/close/collapse a working set of threads.
static void update_thread_email(struct IndexPrivateData *priv, struct Email *email)
Focus a visible email in the current thread.
static const struct MenuFuncOp OpIndex[]
Functions for the Index Menu.
static bool ea_contains_thread_target(struct EmailArray *ea, struct Email *e, bool subthread)
Does the array already include this thread target?
static int ea_add_selection(struct EmailArray *ea, struct MailboxView *mv, struct Email *e, bool use_tagged, int count)
Build a working set of Emails for an action.
static int ea_add_selection_threads(struct EmailArray *ea, struct MailboxView *mv, struct Email *e, bool use_tagged, bool subthread, int count)
Build a working set of threads/subthreads.
static const struct MenuFuncOp OpList[]
Functions for the List Dialog.
void index_init_keys(struct NeoMutt *n, struct SubMenu *sm_generic)
Initialise the Index Keybindings - Implements ::init_keys_api.
bool index_next_undeleted(struct MuttWindow *win_index)
Select the next undeleted Email (if possible)
struct MenuDefinition * index_get_menu_definition(void)
Get the Index Menu Definition.
static bool resolve_email(struct IndexPrivateData *priv, struct IndexSharedData *shared, enum ResolveMethod rm, int count)
Pick the next Email to advance the cursor to.
static const struct MenuOpSeq ListDefaultBindings[]
Key bindings for the List Dialog.
static const struct MenuOpSeq IndexDefaultBindings[]
Key bindings for the Index Menu.
static struct MuttThread * thread_target(struct Email *e, bool subthread)
Get the thread/subthread target for an email.
static bool prereq(struct IndexSharedData *shared, struct Menu *menu, CheckFlags checks)
Check the pre-requisites for a function.
static const struct IndexFunction IndexFunctions[]
All the NeoMutt functions that the Index supports.
ResolveMethod
How to advance the cursor.
@ RESOLVE_NEXT_SUBTHREAD
Next sibling sub-thread.
@ RESOLVE_NEXT_UNDELETED
Next undeleted email.
@ RESOLVE_NEXT_EMAIL
Next email, whatever its state.
@ RESOLVE_NEXT_THREAD
Next top-level thread.
static int op_main_next_new(struct IndexFunctionData *fdata, const struct KeyEvent *event)
GUI manage the main index (list of emails)
@ NT_INDEX_EMAIL
Email has changed.
CollapseMode
Action to perform on a Thread.
@ COLLAPSE_MODE_TOGGLE
Toggle collapsed state.
@ COLLAPSE_MODE_CLOSE
Collapse all threads.
@ COLLAPSE_MODE_OPEN
Open all threads.
@ CHECK_VISIBLE
Is the selected message visible in the index?
@ CHECK_NONE
No flags are set.
@ CHECK_READONLY
Is the mailbox readonly?
@ CHECK_MSGCOUNT
Are there any messages?
@ CHECK_IN_MAILBOX
Is there a mailbox open?
@ CHECK_ATTACH
Is the user in message-attach mode?
Index private Module data.
Private state data for the Index.
void index_shared_data_set_email(struct IndexSharedData *shared, struct Email *e)
Set the current Email for the Index and friends.
Data shared between Index, Pager and Sidebar.
void km_menu_add_submenu(struct MenuDefinition *md, struct SubMenu *sm)
Add a SubMenu to a Menu Definition.
struct SubMenu * km_register_submenu(const struct MenuFuncOp functions[])
Register a submenu.
struct MenuDefinition * km_register_menu(int menu, const char *name)
Register a menu.
void km_menu_add_bindings(struct MenuDefinition *md, const struct MenuOpSeq bindings[])
Add Keybindings to a Menu.
enum CommandResult km_bind(struct MenuDefinition *md, const char *key_str, int op, char *macro, char *desc, struct Buffer *err)
Set up a key binding.
@ LL_DEBUG1
Log at debug level 1.
@ LL_NOTIFY
Log of notifications.
#define FREE(x)
Free memory and set the pointer to NULL.
#define MAX(a, b)
Return the maximum of two values.
@ MODULE_ID_INDEX
ModuleIndex, Index
@ MODULE_ID_NNTP
ModuleNntp, Nntp
void msgwin_clear_text(struct MuttWindow *win)
Clear the text in the Message Window.
Convenience wrapper for the library headers.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
bool mutt_strn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings (to a maximum), safely.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
Many unsorted constants and some structs.
@ EVM_VIEW
View the message.
@ EVM_EDIT
Edit the message.
@ MUTT_UNDELETE
Messages to be un-deleted.
@ MUTT_LIMIT
Messages in limited view.
@ MUTT_UNTAG
Messages to be un-tagged.
@ MUTT_READ
Messages that have been read.
@ MUTT_PURGE
Messages to be purged (bypass trash)
@ MUTT_TAG
Tagged messages.
@ MUTT_FLAG
Flagged messages.
@ MUTT_DELETE
Messages to be deleted.
struct Mailbox * mutt_mailbox_next_unread(struct Mailbox *m_cur, struct Buffer *s)
Find next mailbox with unread mail.
struct Mailbox * mutt_mailbox_next(struct Mailbox *m_cur, struct Buffer *s)
Incoming folders completion routine.
bool mutt_mailbox_list(void)
Show a message with the list of mailboxes with new mail.
struct Mailbox * mutt_mailbox_prev_unread(struct Mailbox *m_cur, struct Buffer *s)
Find previous mailbox with unread mail.
Mailbox helper functions.
bool window_is_focused(const struct MuttWindow *win)
Does the given Window have the focus?
struct MuttWindow * window_set_focus(struct MuttWindow *win)
Set the Window focus.
void pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
Some miscellaneous functions.
struct Email * mutt_get_virt_email(struct Mailbox *m, int vnum)
Get a virtual Email.
bool mutt_limit_current_thread(struct MailboxView *mv, struct Email *e)
Limit the email view to the current thread.
void mview_free(struct MailboxView **ptr)
Free a MailboxView.
bool message_is_tagged(struct Email *e)
Is a message in the index tagged (and within limit)
bool mview_has_limit(const struct MailboxView *mv)
Is a limit active?
int ea_add_tagged(struct EmailArray *ea, struct MailboxView *mv, struct Email *e, bool use_tagged)
Get an array of the tagged Emails.
int mx_tags_edit(struct Mailbox *m, const char *tags, struct Buffer *buf)
Start the tag editor of the mailbox.
int mx_msg_close(struct Mailbox *m, struct Message **ptr)
Close a message.
void mx_fastclose_mailbox(struct Mailbox *m, bool keep_account)
Free up memory associated with the Mailbox.
struct Mailbox * mx_mbox_find2(const char *path)
Find a Mailbox on an Account.
struct Message * mx_msg_open(struct Mailbox *m, struct Email *e)
Return a stream pointer for a message.
bool mx_tags_is_supported(struct Mailbox *m)
Return true if mailbox support tagging.
int mx_tags_commit(struct Mailbox *m, struct Email *e, const char *tags)
Save tags to the Mailbox - Wrapper for MxOps::tags_commit()
int mx_toggle_write(struct Mailbox *m)
Toggle the mailbox's readonly flag.
enum MxStatus mx_mbox_sync(struct Mailbox *m)
Save changes to mailbox.
enum MxStatus mx_mbox_close(struct Mailbox *m)
Save changes and close mailbox.
MxStatus
Return values from mbox_check(), mbox_check_stats(), mbox_sync(), and mbox_close()
@ MX_STATUS_OK
No changes.
@ MX_STATUS_REOPENED
Mailbox was reopened.
@ MX_STATUS_NEW_MAIL
New mail received in Mailbox.
API for encryption/signing of emails.
#define PGP_TRADITIONAL_CHECKED
Email has a traditional (inline) signature.
#define APPLICATION_PGP
Use PGP to encrypt/sign.
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
@ NT_GLOBAL_SHUTDOWN
NeoMutt is about to close.
Usenet network mailbox type; talk to an NNTP server.
int nntp_check_msgid(struct Mailbox *m, const char *msgid)
Fetch article by Message-ID.
int nntp_check_children(struct Mailbox *m, const char *msgid)
Fetch children of article with the Message-ID.
void nntp_mailbox(struct Mailbox *m, char *buf, size_t buflen)
Get first newsgroup with new messages.
struct NntpMboxData * mutt_newsgroup_catchup(struct Mailbox *m, struct NntpAccountData *adata, char *group)
Catchup newsgroup.
struct NntpAccountData * nntp_select_server(struct Mailbox *m, const char *server, bool leave_lock)
Open a connection to an NNTP server.
Nntp-specific Mailbox data.
Nntp private Module data.
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
@ NT_INDEX
Index data has changed, NotifyIndex, IndexSharedData.
@ NT_GLOBAL
Not object-related, NotifyGlobal.
const struct CompleteOps CompleteNmQueryOps
Auto-Completion of NmQuerys.
void nm_db_longrun_done(struct Mailbox *m)
Finish a long transaction.
void nm_db_longrun_init(struct Mailbox *m, bool writable)
Start a long transaction.
Notmuch virtual mailbox type.
void nm_query_window_reset(void)
Resets the vfolder window position to the present.
int nm_read_entire_thread(struct Mailbox *m, struct Email *e)
Get the entire thread of an email.
void nm_query_window_backward(void)
Function to move the current search window backward in time.
bool nm_query_window_available(void)
Are windowed queries enabled for use?
bool nm_message_is_still_queried(struct Mailbox *m, struct Email *e)
Is a message still visible in the query?
void nm_query_window_forward(void)
Function to move the current search window forward in time.
const char * opcodes_get_name(int op)
Get the name of an opcode.
Match patterns to emails.
int mutt_search_command(struct MailboxView *mv, struct Menu *menu, int cur, struct SearchState *state, SearchFlags flags)
Perform a search.
int mutt_pattern_func(struct MailboxView *mv, int op, char *prompt)
Perform some Pattern matching.
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.
void pop_fetch_mail(void)
Fetch messages and save them in $spool_file.
@ MUTT_PROGRESS_WRITE
Progress tracks elements, according to $write_inc
struct Progress * progress_new(enum ProgressType type, size_t size)
Create a new Progress Bar.
void progress_free(struct Progress **ptr)
Free a Progress Bar.
void progress_set_message(struct Progress *progress, const char *fmt,...) __attribute__((__format__(__printf__
bool progress_update(struct Progress *progress, size_t pos, int percent)
Update the state of the progress bar.
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
enum QuadOption query_quadoption(const char *prompt, struct ConfigSubset *sub, const char *name)
Ask the user a quad-question.
#define STAILQ_FIRST(head)
#define STAILQ_FOREACH(var, head, field)
#define STAILQ_EMPTY(head)
#define STAILQ_NEXT(elm, field)
@ SEARCH_NONE
No flags are set.
@ SEARCH_PROMPT
Ask for search input.
@ SEARCH_OPPOSITE
Search in the opposite direction.
Convenience wrapper for the send headers.
int mutt_resend_message(FILE *fp, struct Mailbox *m, struct Email *e_cur, struct ConfigSubset *sub)
Resend an email.
bool mutt_send_list_unsubscribe(struct Mailbox *m, struct Email *e)
Send a mailing-list unsubscription email.
int mutt_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile, struct Mailbox *m, struct EmailArray *ea, struct ConfigSubset *sub)
Send an email.
bool mutt_send_list_subscribe(struct Mailbox *m, struct Email *e)
Send a mailing-list subscription email.
@ SEND_KEY
Mail a PGP public key.
@ SEND_GROUP_CHAT_REPLY
Reply to all recipients preserving To/Cc.
@ SEND_REPLY
Reply to sender.
@ SEND_NONE
No flags are set.
@ SEND_FORWARD
Forward email.
@ SEND_GROUP_REPLY
Reply to all.
@ SEND_TO_SENDER
Compose new email to sender.
@ SEND_LIST_REPLY
Reply to mailing list.
@ SEND_NEWS
Reply to a news article.
@ SEND_POSTPONED
Recall a postponed email.
String manipulation buffer.
size_t dsize
Length of data.
char * data
Pointer to data.
The envelope/body of an email.
bool visible
Is this message part of the view?
struct Envelope * env
Envelope information.
bool collapsed
Is this message part of a collapsed thread?
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
struct Body * body
List of MIME parts.
bool old
Email is seen, but unread.
bool changed
Email has been edited.
bool attach_del
Has an attachment marked for deletion.
bool threaded
Used for threading.
const struct AttrColor * attr_color
Color-pair to use when displaying in the index.
int vnum
Virtual message number.
struct TagList tags
For drivers that support server tagging.
bool deleted
Email is deleted.
int index
The absolute (unsorted) message number.
bool quasi_deleted
Deleted from neomutt, but not modified on disk.
bool tagged
Email is tagged.
struct MuttThread * thread
Thread of Emails.
char * followup_to
List of 'followup-to' fields.
char * message_id
Message ID.
struct ListHead references
message references (in reverse order)
struct ListHead in_reply_to
in-reply-to header content
An Event that happened to a Mailbox.
Data passed to Index worker functions.
struct IndexSharedData * shared
Shared Index data.
struct IndexPrivateData * priv
Private Index data.
struct IndexModuleData * mod_data
Index module data.
struct NeoMutt * n
NeoMutt application data.
int op
Op code, e.g. OP_MAIN_LIMIT.
index_function_t function
Function to call.
int flags
Prerequisites for the function, e.g. CHECK_IN_MAILBOX.
Index private Module data.
struct MenuDefinition * menu_index
Index menu definition.
struct MenuDefinition * menu_list
Mailing-list action menu definition.
Private state data for the Index.
struct MuttWindow * win_index
Window for the Index.
struct IndexSharedData * shared
Shared Index data.
bool tag_prefix
tag-prefix has been pressed
struct Menu * menu
Menu controlling the index.
int oldcount
Old count of mails in the mailbox.
Data shared between Index, Pager and Sidebar.
struct Email * email
Currently selected Email.
struct Mailbox * mailbox
Current Mailbox.
bool attach_msg
Are we in "attach message" mode?
struct ConfigSubset * sub
Config set to use.
struct MailboxView * mailbox_view
Current Mailbox view.
struct SearchState * search_state
State of the current search.
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
An event such as a keypress.
int count
Optional count prefix, e.g. 3 for 3j
int op
Function opcode, e.g. OP_HELP.
bool collapsed
Are all threads collapsed?
struct Menu * menu
Needed for pattern compilation.
struct ThreadsContext * threads
Threads context.
struct Mailbox * mailbox
Current Mailbox.
char * pattern
Limit pattern string.
int vcount
The number of virtual messages.
bool changed
Mailbox has been modified.
int msg_count
Total number of messages.
AclFlags rights
ACL bits, see AclFlags.
enum MailboxType type
Mailbox type.
void * mdata
Driver specific data.
struct Email ** emails
Array of Emails.
char * name
A short name for the Mailbox.
struct Notify * notify
Notifications: NotifyMailbox, EventMailbox.
struct HashTable * id_hash
Hash Table: "Message-ID" -> Email.
struct Buffer pathbuf
Path of the Mailbox.
bool readonly
Don't allow changes to the mailbox.
bool verbose
Display status messages?
A local copy of an email.
FILE * fp
pointer to the message data
struct MuttThread * parent
Parent of this Thread.
const struct Mapping * help_data
Data for the Help Bar.
void * wdata
Private data.
struct MuttWindow * parent
Parent Window.
Container for Accounts, Notifications.
struct Notify * notify
Notifications handler.
struct ConfigSubset * sub
Inherited config items.
NNTP-specific Mailbox data -.
Nntp private Module data.
struct NntpAccountData * current_news_srv
Current NNTP news server.
bool reverse
search backwards
struct PatternList * pattern
compiled search pattern
@ MENU_INDEX
Index panel (list of emails)
@ MENU_LIST
Mailing-list actions.