268 struct AddressList *al = NULL;
332 int subthread = (op == OP_DELETE_SUBTHREAD);
336 if (op == OP_PURGE_THREAD)
379 if (op == OP_DISPLAY_HEADERS)
394 if (c_uncollapse_jump)
452 mutt_message(ngettext(
"%d label changed",
"%d labels changed", num_changed), num_changed);
479 if (op == OP_EDIT_RAW_MESSAGE)
486 else if (op == OP_EDIT_OR_VIEW_RAW_MESSAGE)
571 for (
size_t i = 0; i < m->
msg_count; i++)
639 if (op == OP_GROUP_REPLY)
669 const int digit = op - OP_JUMP;
677 false, NULL, NULL, NULL) != 0) ||
818 mutt_error(
_(
"Thread can't be broken, message is not part of a thread"));
841 if (priv->
attach_msg || c_read_only || (op == OP_MAIN_CHANGE_FOLDER_READONLY))
843 cp =
_(
"Open mailbox in read-only mode");
848 cp =
_(
"Open mailbox");
852 const bool c_change_folder_next =
cs_subset_bool(shared->
sub,
"change_folder_next");
853 if (c_change_folder_next && shared->
mailbox &&
865 goto changefoldercleanup;
874 goto changefoldercleanup;
885 &priv->
oldcount, shared, read_only);
931 if (c_uncollapse_jump)
942 mutt_error(
_(
"Thread contains unread or flagged messages"));
982 if (op == OP_TOGGLE_READ)
988 snprintf(buf2,
sizeof(buf2),
"!~R!~D~s%s", lmt ? shared->
mailboxview->
pattern :
".*");
994 snprintf(buf2,
sizeof(buf2),
"~A");
1000 if (((op == OP_LIMIT_CURRENT_THREAD) &&
1002 (op == OP_TOGGLE_READ) ||
1004 _(
"Limit to messages matching: ")) == 0)))
1016 if (e->
index == old_index)
1056 mutt_error(
_(
"No Message-ID: header available to link thread"));
1096 struct Buffer *buf = NULL;
1103 mutt_message(
_(
"Folder doesn't support tagging, aborting"));
1130 struct Progress *progress = NULL;
1141 for (
int px = 0, i = 0; i < m->
msg_count; i++)
1153 if (op == OP_MAIN_MODIFY_TAGS_THEN_HIDE)
1155 bool still_queried =
false;
1179 if (op == OP_MAIN_MODIFY_TAGS_THEN_HIDE)
1181 bool still_queried =
false;
1213 int first_unread = -1;
1217 int mcur = saved_current;
1222 if ((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_NEXT_UNREAD) ||
1223 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD))
1246 if ((unread != 0) && (first_unread == -1))
1247 first_unread = mcur;
1248 if ((unread == 1) && (first_new == -1))
1253 if (first_unread == -1)
1254 first_unread = mcur;
1255 if (!e->
old && (first_new == -1))
1259 if (((op == OP_MAIN_NEXT_UNREAD) || (op == OP_MAIN_PREV_UNREAD)) && (first_unread != -1))
1263 if (((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_PREV_NEW) ||
1264 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD) || (op == OP_MAIN_PREV_NEW_THEN_UNREAD)) &&
1270 if (((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_PREV_NEW) ||
1271 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD) || (op == OP_MAIN_PREV_NEW_THEN_UNREAD)) &&
1276 else if (((op == OP_MAIN_NEXT_UNREAD) || (op == OP_MAIN_PREV_UNREAD) ||
1277 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD) || (op == OP_MAIN_PREV_NEW_THEN_UNREAD)) &&
1278 (first_unread != -1))
1280 index = first_unread;
1286 if ((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_PREV_NEW))
1289 mutt_error(
_(
"No new messages in this limited view"));
1296 mutt_error(
_(
"No unread messages in this limited view"));
1309 if ((op == OP_MAIN_NEXT_NEW) || (op == OP_MAIN_NEXT_UNREAD) ||
1310 (op == OP_MAIN_NEXT_NEW_THEN_UNREAD))
1312 if (saved_current >
index)
1317 else if (saved_current <
index)
1340 case OP_MAIN_NEXT_THREAD:
1344 case OP_MAIN_NEXT_SUBTHREAD:
1348 case OP_MAIN_PREV_THREAD:
1352 case OP_MAIN_PREV_SUBTHREAD:
1362 if ((op == OP_MAIN_NEXT_THREAD) || (op == OP_MAIN_NEXT_SUBTHREAD))
1471 for (
size_t i = 0; i < m->
msg_count; i++)
1512 (op != OP_MAIN_READ_THREAD));
1601 struct Email *e = NULL;
1605 if (index < shared->mailbox->vcount)
1688 _(
"Undelete messages matching: ")) == 0)
1726 false, NULL, NULL, NULL) == 0) &&
1729 const char *
const c_mark_macro_prefix =
cs_subset_string(shared->
sub,
"mark_macro_prefix");
1730 char str[256] = { 0 };
1735 char macro[256] = { 0 };
1931 for (
size_t i = 0; i < m->
msg_count; i++)
1962 if (((op == OP_DECRYPT_COPY) || (op == OP_DECRYPT_SAVE)) && !
WithCrypto)
1968 const enum MessageSaveOpt save_opt = ((op == OP_SAVE) || (op == OP_DECODE_SAVE) ||
1969 (op == OP_DECRYPT_SAVE)) ?
1979 if ((rc == 0) && (save_opt ==
SAVE_MOVE))
2044 if (priv->
tag && !c_auto_tag)
2047 for (
size_t i = 0; i < m->
msg_count; i++)
2105 for (
size_t i = 0; i < m->
msg_count; i++)
2191 false, (op != OP_UNDELETE_THREAD));
2195 (op != OP_UNDELETE_THREAD));
2333 mutt_error(
_(
"No Message-Id. Unable to perform operation."));
2343 if (op == OP_RECONSTRUCT_THREAD)
2387 if (e->
index == oldindex)
2400 mutt_error(
_(
"No deleted messages found in the thread"));
2422 if (op == OP_GET_MESSAGE)
2425 false, NULL, NULL, NULL) != 0) ||
2458 mutt_error(
_(
"Message is not visible in limited view"));
2502 if (priv->
attach_msg || c_read_only || (op == OP_MAIN_CHANGE_GROUP_READONLY))
2504 cp =
_(
"Open newsgroup in read-only mode");
2509 cp =
_(
"Open newsgroup");
2513 const bool c_change_folder_next =
cs_subset_bool(shared->
sub,
"change_folder_next");
2514 if (c_change_folder_next && shared->
mailbox &&
2525 goto changefoldercleanup2;
2532 goto changefoldercleanup2;
2541 goto changefoldercleanup2;
2552 &priv->
oldcount, shared, read_only);
2557changefoldercleanup2:
2582 (
query_quadoption(c_post_moderated,
_(
"Posting to this group not allowed, may be moderated. Continue?")) !=
2594 NULL, NULL, shared->
mailbox, &el, shared->
sub);
2601 return op_reply(shared, priv, OP_REPLY);
2617 mutt_message(
_(
"No virtual folder and no Message-Id, aborting"));
2621 strncpy(buf,
"id:",
sizeof(buf));
2622 int msg_id_offset = 0;
2626 if (buf[strlen(buf) - 1] ==
'>')
2627 buf[strlen(buf) - 1] =
'\0';
2638 mutt_error(
_(
"failed to find message in notmuch database. try running 'notmuch new'."));
2697 (op == OP_MAIN_VFOLDER_FROM_QUERY_READONLY));
2701 m_query->
name = query_unencoded;
2702 query_unencoded = NULL;
2707 FREE(&query_unencoded);
2732 const char *
const c_nm_query_window_current_search =
cs_subset_string(shared->
sub,
"nm_query_window_current_search");
2733 if (!c_nm_query_window_current_search)
2742 case OP_MAIN_WINDOWED_VFOLDER_BACKWARD:
2745 case OP_MAIN_WINDOWED_VFOLDER_FORWARD:
2748 case OP_MAIN_WINDOWED_VFOLDER_RESET:
2755 mutt_str_copy(buf, c_nm_query_window_current_search,
sizeof(buf));
2818 mutt_error(
_(
"Function not permitted in attach-message mode"));
2844 if (!dlg || !dlg->
wdata)
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.
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.
#define MUTT_SEL_NO_FLAGS
No flags are set.
void mutt_browser_select_dir(const char *f)
Remember the last directory selected.
void mutt_buffer_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
bool mutt_buffer_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
char * mutt_buffer_strdup(const struct Buffer *buf)
Copy a Buffer's string.
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
bool mutt_select_sort(bool reverse)
Ask the user for a sort method.
void mutt_print_message(struct Mailbox *m, struct EmailList *el)
Print a message.
int mutt_save_message(struct Mailbox *m, struct EmailList *el, enum MessageSaveOpt save_opt, enum MessageTransformOpt transform_opt)
Save an email.
void ci_bounce_message(struct Mailbox *m, struct EmailList *el)
Bounce an email.
bool mutt_edit_content_type(struct Email *e, struct Body *b, FILE *fp)
Edit the content type of an attachment.
bool mutt_check_traditional_pgp(struct Mailbox *m, struct EmailList *el)
Check if a message has inline PGP content.
void mutt_pipe_message(struct Mailbox *m, struct EmailList *el)
Pipe 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.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
enum QuadOption cs_subset_quad(const struct ConfigSubset *sub, const char *name)
Get a quad-value 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 crypt_forget_passphrase(void)
Forget a passphrase and display a message.
void crypt_extract_keys_from_messages(struct Mailbox *m, struct EmailList *el)
Extract keys from a message.
void mutt_flushinp(void)
Empty all the keyboard buffers.
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.
void mutt_unget_ch(int ch)
Return a keystroke to the input buffer.
struct MuttWindow * dialog_find(struct MuttWindow *win)
Find the parent Dialog of a Window.
const char * dispacher_get_retval_name(int rv)
Get the name of a return value.
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 dlg_select_attachment(struct ConfigSubset *sub, struct Mailbox *m, struct Email *e, FILE *fp)
Show the attachments in a Menu.
void dlg_select_autocrypt_account(void)
Display the Autocrypt account Menu.
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.
int ci_next_undeleted(struct Mailbox *m, int msgno, bool uncollapse)
Find the next undeleted email.
int ci_previous_undeleted(struct Mailbox *m, int msgno, bool uncollapse)
Find the previous undeleted email.
void update_index(struct Menu *menu, struct MailboxView *mv, enum MxStatus check, int oldcount, const struct IndexSharedData *shared)
Update the index.
void change_folder_string(struct Menu *menu, char *buf, size_t buflen, int *oldcount, struct IndexSharedData *shared, bool read_only)
Change to a different Mailbox by string.
void resort_index(struct MailboxView *mv, struct Menu *menu)
Resort the index.
int ci_first_message(struct Mailbox *m)
Get index of first new message.
void collapse_all(struct MailboxView *mv, struct Menu *menu, int toggle)
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 EmailList *el, enum EvMessage action)
Edit or view a message.
void emaillist_clear(struct EmailList *el)
Drop a private list of Emails.
Structs that make up an email.
int mutt_buffer_get_field(const char *field, struct Buffer *buf, CompletionFlags complete, bool multiple, struct Mailbox *m, char ***files, int *numfiles)
Ask the user for a string.
int mutt_file_sanitize_regex(struct Buffer *dest, const char *src)
Escape any regex-magic characters in a string.
void mutt_emails_set_flag(struct Mailbox *m, struct EmailList *el, enum MessageType flag, bool bf)
Set flag on messages.
int mutt_change_flag(struct Mailbox *m, struct EmailList *el, bool bf)
Change the flag on a 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 index_function_dispatcher(struct MuttWindow *win, int op)
Perform an Index function - Implements function_dispatcher_t -.
static int op_main_link_threads(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Link tagged message to the current one - Implements index_function_t -.
static int op_main_break_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Break the thread in two - Implements index_function_t -.
static int op_main_limit(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Limit view to current thread - Implements index_function_t -.
static int op_main_root_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Jump to root message in thread - Implements index_function_t -.
static int op_main_delete_pattern(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Delete messages matching a pattern - Implements index_function_t -.
static int op_toggle_new(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Toggle a message's 'new' flag - Implements index_function_t -.
static int op_mail_key(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Mail a PGP public key - Implements index_function_t -.
static int op_display_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Display a message - Implements index_function_t -.
static int op_main_next_undeleted(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Move to the next undeleted message - Implements index_function_t -.
static int op_main_fetch_mail(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Retrieve mail from POP server - Implements index_function_t -.
static int op_list_reply(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Reply to specified mailing list - Implements index_function_t -.
static int op_delete_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Delete all messages in thread - Implements index_function_t -.
static int op_main_next_unread_mailbox(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Open next mailbox with unread mail - Implements index_function_t -.
static int op_pipe(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Pipe message/attachment to a shell command - Implements index_function_t -.
static int op_main_prev_undeleted(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Move to the previous undeleted message - Implements index_function_t -.
static int op_prev_entry(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Move to the previous entry - Implements index_function_t -.
static int op_next_entry(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Move to the next entry - Implements index_function_t -.
static int op_main_modify_tags(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Modify (notmuch/imap) tags - Implements index_function_t -.
static int op_main_sync_folder(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Save changes to mailbox - Implements index_function_t -.
static int op_autocrypt_acct_menu(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Manage autocrypt accounts - Implements index_function_t -.
static int op_end_cond(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
End of conditional execution (noop) - Implements index_function_t -.
static int op_edit_raw_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Edit the raw message (edit and edit-raw-message are synonyms) - Implements index_function_t -.
static int op_search(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Search for a regular expression - Implements index_function_t -.
static int op_get_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Get parent of the current message - Implements index_function_t -.
static int op_list_subscribe(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Subscribe to a mailing list - Implements index_function_t -.
static int op_extract_keys(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Extract supported public keys - Implements index_function_t -.
static int op_main_next_new(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Jump to the next new message - Implements index_function_t -.
static int op_main_change_group(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Open a different newsgroup - Implements index_function_t -.
static int op_delete(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Delete the current entry - Implements index_function_t -.
static int op_view_attachments(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Show MIME attachments - Implements index_function_t -.
static int op_sort(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Sort messages - Implements index_function_t -.
static int op_main_vfolder_from_query(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Generate virtual folder from query - Implements index_function_t -.
static int op_reply(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Reply to a message - Implements index_function_t -.
static int op_flag_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Toggle a message's 'important' flag - Implements index_function_t -.
static int op_main_imap_logout_all(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Logout from all IMAP servers - Implements index_function_t -.
static int op_main_read_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Mark the current thread as read - Implements index_function_t -.
static int op_recall_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Recall a postponed message - Implements index_function_t -.
static int op_get_children(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Get all children of the current message - Implements index_function_t -.
static int op_toggle_write(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Toggle whether the mailbox will be rewritten - Implements index_function_t -.
static int op_save(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Make decrypted copy - Implements index_function_t -.
static int op_undelete_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Undelete all messages in thread - Implements index_function_t -.
static int op_main_tag_pattern(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Tag messages matching a pattern - Implements index_function_t -.
static int op_resend(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Use the current message as a template for a new one - Implements index_function_t -.
static int op_main_untag_pattern(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Untag messages matching a pattern - Implements index_function_t -.
static int op_edit_label(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Add, change, or delete a message's label - Implements index_function_t -.
static int op_bounce_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Remail a message to another user - Implements index_function_t -.
static int op_compose_to_sender(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Compose new message to the current message sender - Implements index_function_t -.
static int op_forward_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Forward a message with comments - Implements index_function_t -.
static int op_main_entire_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Read entire thread of the current message - Implements index_function_t -.
static int op_display_address(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Display full address of sender - Implements index_function_t -.
static int op_post(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Followup to newsgroup - Implements index_function_t -.
static int op_tag(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Tag the current entry - Implements index_function_t -.
static int op_tag_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Tag the current thread - Implements index_function_t -.
static int op_main_collapse_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Collapse/uncollapse current thread - Implements index_function_t -.
static int op_attachment_edit_type(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Edit attachment content type - Implements index_function_t -.
static int op_alias_dialog(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Open the aliases dialog - Implements index_function_t -.
static int op_main_imap_fetch(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Force retrieval of mail from IMAP server - Implements index_function_t -.
static int op_main_quasi_delete(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Delete from NeoMutt, don't touch on disk - Implements index_function_t -.
static int op_list_unsubscribe(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Unsubscribe from mailing list - Implements index_function_t -.
static int op_undelete(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Undelete the current entry - Implements index_function_t -.
static int op_main_collapse_all(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Collapse/uncollapse all threads - Implements index_function_t -.
static int op_exit(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Exit this menu - Implements index_function_t -.
static int op_jump(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Jump to an index number - Implements index_function_t -.
static int op_main_undelete_pattern(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Undelete messages matching a pattern - Implements index_function_t -.
static int op_mark_msg(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Create a hotkey macro for the current message - Implements index_function_t -.
static int op_check_traditional(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Check for classic PGP - Implements index_function_t -.
static int op_main_windowed_vfolder(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Shifts virtual folder time window - Implements index_function_t -.
static int op_mailbox_list(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
List mailboxes with new mail - Implements index_function_t -.
static int op_query(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Query external program for addresses - Implements index_function_t -.
static int op_main_set_flag(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Set a status flag on a message - Implements index_function_t -.
static int op_forget_passphrase(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Wipe passphrases from memory - Implements index_function_t -.
static int op_catchup(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Mark all articles in newsgroup as read - Implements index_function_t -.
static int op_quit(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Save changes to mailbox and quit - Implements index_function_t -.
static int op_main_next_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Jump to the next thread - Implements index_function_t -.
static int op_group_reply(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Reply to all recipients - Implements index_function_t -.
static int op_main_show_limit(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Show currently active limit pattern - Implements index_function_t -.
static int op_create_alias(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Create an alias from a message sender - Implements index_function_t -.
static int op_main_change_folder(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Open a different folder - Implements index_function_t -.
static int op_mail(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Compose a new mail message - Implements index_function_t -.
static int op_print(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Print the current entry - Implements index_function_t -.
#define mutt_warning(...)
#define mutt_message(...)
#define mutt_debug(LEVEL,...)
Convenience wrapper for the gui headers.
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
void mutt_startup_shutdown_hook(HookFlags type)
Execute any startup/shutdown hooks.
Parse and execute user-defined hooks.
#define MUTT_SHUTDOWN_HOOK
shutdown-hook: run when leaving NeoMutt
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 const char * Not_available_in_this_menu
bool index_next_undeleted(struct MuttWindow *win_index)
Select the next undeleted Email (if possible)
static bool resolve_email(struct IndexPrivateData *priv, struct IndexSharedData *shared, enum ResolveMethod rm)
Pick the next Email to advance the cursor to.
struct IndexFunction IndexFunctions[]
All the NeoMutt functions that the Index supports.
bool prereq(struct MailboxView *mv, struct Menu *menu, CheckFlags checks)
Check the pre-requisites for a function.
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.
uint8_t CheckFlags
Flags, e.g. CHECK_IN_MAILBOX.
#define CHECK_NO_FLAGS
No flags are set.
#define CHECK_ATTACH
Is the user in message-attach mode?
#define CHECK_VISIBLE
Is the selected message visible in the index?
#define CHECK_IN_MAILBOX
Is there a mailbox open?
#define CHECK_READONLY
Is the mailbox readonly?
#define CHECK_MSGCOUNT
Are there any messages?
#define NT_INDEX_EMAIL
Email has changed.
int mx_toggle_write(struct Mailbox *m)
Toggle the mailbox's readonly flag.
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.
enum CommandResult km_bind(char *s, enum MenuType mtype, int op, char *macro, char *desc)
Bind a key to a macro.
@ LL_DEBUG1
Log at debug level 1.
@ LL_NOTIFY
Log of notifications.
void mailbox_free(struct Mailbox **ptr)
Free a Mailbox.
#define MUTT_ACL_INSERT
Add/copy into the mailbox (used when editing a message)
#define MUTT_ACL_DELETE
Delete a message.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
#define MUTT_ACL_WRITE
Write to a message (for flagging or linking threads)
@ 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
#define MUTT_ACL_SEEN
Change the 'seen' status of a message.
void msgwin_clear_text(void)
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_str_equal(const char *a, const char *b)
Compare two strings.
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.
char * mutt_str_cat(char *buf, size_t buflen, const char *s)
Concatenate two strings.
Many unsorted constants and some structs.
#define MUTT_COMP_NO_FLAGS
No flags are set.
@ 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.
#define MUTT_COMP_NM_QUERY
Notmuch query mode.
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)
List the mailboxes with new mail.
Mailbox helper functions.
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.
bool mutt_link_threads(struct Email *parent, struct EmailList *children, struct Mailbox *m)
Forcibly link threads together.
off_t mutt_set_vnum(struct Mailbox *m)
Set the virtual index number of all the messages in a mailbox.
bool mutt_thread_can_collapse(struct Email *e)
Check whether a thread can be collapsed.
int mutt_parent_message(struct Email *e, bool find_root)
Find the parent of a message.
struct HashTable * mutt_make_id_hash(struct Mailbox *m)
Create a Hash Table for message-ids.
Create/manipulate threading in emails.
#define mutt_thread_next_unread(e)
#define mutt_using_threads()
#define mutt_previous_thread(e)
#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_previous_subthread(e)
#define mutt_next_thread(e)
#define mutt_collapse_thread(e)
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 mutt_buffer_pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
Some miscellaneous functions.
int el_add_tagged(struct EmailList *el, struct MailboxView *mv, struct Email *e, bool use_tagged)
Get a list of the tagged Emails.
struct Email * mutt_get_virt_email(struct Mailbox *m, int vnum)
Get a virtual Email.
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?
The "currently-open" mailbox.
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 **msg)
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.
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()
struct Message * mx_msg_open(struct Mailbox *m, int msgno)
Return a stream pointer for a message.
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_snc(), 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.
@ 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 * CurrentNewsSrv
Current NNTP news server.
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.
@ NT_INDEX
Index data has changed, NotifyIndex, IndexSharedData.
@ NT_GLOBAL
Not object-related, NotifyGlobal.
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.
All user-callable functions.
Handling of global boolean variables.
bool OptNews
(pseudo) used to change reader mode
bool OptAttachMsg
(pseudo) used by attach-message
bool OptSearchInvalid
(pseudo) used to invalidate the search pattern
bool OptNeedResort
(pseudo) used to force a re-sort
Match patterns to emails.
bool mutt_limit_current_thread(struct MailboxView *mv, struct Email *e)
Limit the email view to the current thread.
int mutt_pattern_func(struct MailboxView *mv, int op, char *prompt)
Perform some Pattern matching.
int mutt_search_command(struct Mailbox *m, struct Menu *menu, int cur, int op)
Perform a search.
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from 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
void progress_free(struct Progress **ptr)
Free a Progress Bar.
bool progress_update(struct Progress *progress, size_t pos, int percent)
Update the state of the progress bar.
struct Progress * progress_new(const char *msg, enum ProgressType type, size_t size)
Create a new Progress Bar.
Prototypes for many functions.
@ EVM_VIEW
View the message.
@ EVM_EDIT
Edit the message.
#define mutt_set_flag(m, e, flag, bf)
QuadOption
Possible values for a quad-option.
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
enum QuadOption query_quadoption(enum QuadOption opt, const char *prompt)
Ask the user a quad-question.
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FIRST(head)
#define STAILQ_FOREACH(var, head, field)
#define STAILQ_EMPTY(head)
#define STAILQ_NEXT(elm, field)
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.
int mutt_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile, struct Mailbox *m, struct EmailList *el, struct ConfigSubset *sub)
Send an email.
bool mutt_send_list_unsubscribe(struct Mailbox *m, struct Email *e)
Send a mailing-list unsubscription email.
bool mutt_send_list_subscribe(struct Mailbox *m, struct Email *e)
Send a mailing-list subscription email.
#define SEND_GROUP_CHAT_REPLY
Reply to all recipients preserving To/Cc.
#define SEND_GROUP_REPLY
Reply to all.
#define SEND_LIST_REPLY
Reply to mailing list.
#define SEND_KEY
Mail a PGP public key.
#define SEND_POSTPONED
Recall a postponed email.
#define SEND_TO_SENDER
Compose new email to sender.
#define SEND_NO_FLAGS
No flags are set.
#define SEND_REPLY
Reply to sender.
#define SEND_NEWS
Reply to a news article.
#define SEND_FORWARD
Forward email.
uint16_t SendFlags
Flags for mutt_send_message(), e.g. SEND_REPLY.
void mutt_sort_headers(struct Mailbox *m, struct ThreadsContext *threads, bool init, off_t *vsize)
Sort emails by their headers.
Assorted sorting methods.
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.
struct AttrColor * attr_color
Color-pair to use when displaying in the index.
bool attach_del
Has an attachment marked for deletion.
bool flagged
Marked important?
bool threaded
Used for threading.
int vnum
Virtual message number.
struct TagList tags
For drivers that support server tagging.
int msgno
Number displayed to the user.
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.
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
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.
Private state data for the Index.
struct MuttWindow * win_index
Window for the Index.
struct IndexSharedData * shared
Shared Index data.
bool attach_msg
Are we in "attach message" mode?
bool tag
tag-prefix has been pressed
struct Menu * menu
Menu controlling the index.
int oldcount
Old count of Emails in the Mailbox.
Data shared between Index, Pager and Sidebar.
struct MailboxView * mailboxview
Current Mailbox view.
struct Email * email
Currently selected Email.
struct Mailbox * mailbox
Current Mailbox.
struct ConfigSubset * sub
Config set to use.
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
bool collapsed
Are all threads collapsed?
off_t vsize
Size (in bytes) of the messages shown.
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 HashTable * id_hash
Hash Table by msg id.
struct Buffer pathbuf
Path of the Mailbox.
bool readonly
Don't allow changes to the mailbox.
int msg_tagged
How many messages are tagged?
bool verbose
Display status messages?
A local copy of an email.
FILE * fp
pointer to the message data
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 -.
void mutt_break_thread(struct Email *e)
Break the email Thread.
@ MENU_INDEX
Index panel (list of emails)