NeoMutt  2025-12-11-694-ga89709
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
functions.c File Reference

Index functions. More...

#include "config.h"
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "alias/lib.h"
#include "gui/lib.h"
#include "mutt.h"
#include "functions.h"
#include "lib.h"
#include "attach/lib.h"
#include "browser/lib.h"
#include "editor/lib.h"
#include "history/lib.h"
#include "hooks/lib.h"
#include "imap/lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "ncrypt/lib.h"
#include "nntp/lib.h"
#include "pager/lib.h"
#include "pattern/lib.h"
#include "pop/lib.h"
#include "progress/lib.h"
#include "question/lib.h"
#include "send/lib.h"
#include "sidebar/lib.h"
#include "external.h"
#include "globals.h"
#include "mutt_mailbox.h"
#include "muttlib.h"
#include "mx.h"
#include "nntp/mdata.h"
#include "private_data.h"
#include "shared_data.h"
#include "autocrypt/lib.h"
#include "notmuch/lib.h"
#include <libintl.h>
+ Include dependency graph for functions.c:

Go to the source code of this file.

Enumerations

enum  ResolveMethod { RESOLVE_NEXT_EMAIL , RESOLVE_NEXT_UNDELETED , RESOLVE_NEXT_THREAD , RESOLVE_NEXT_SUBTHREAD }
 How to advance the cursor. More...
 

Functions

void index_init_keys (struct SubMenu *sm_generic)
 Initialise the Index Keybindings - Implements ::init_keys_api.
 
static bool resolve_email (struct IndexPrivateData *priv, struct IndexSharedData *shared, enum ResolveMethod rm)
 Pick the next Email to advance the cursor to.
 
bool index_next_undeleted (struct MuttWindow *win_index)
 Select the next undeleted Email (if possible)
 
static int op_alias_dialog (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Open the aliases dialog - Implements index_function_t -.
 
static int op_attach_edit_type (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Edit attachment content type - Implements index_function_t -.
 
static int op_bounce_message (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Remail a message to another user - Implements index_function_t -.
 
static int op_check_traditional (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Check for classic PGP - Implements index_function_t -.
 
static int op_compose_to_sender (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Compose new message to the current message sender - Implements index_function_t -.
 
static int op_create_alias (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Create an alias from a message sender - Implements index_function_t -.
 
static int op_delete (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Delete the current entry - Implements index_function_t -.
 
static int op_delete_thread (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Delete all messages in thread - Implements index_function_t -.
 
static int op_display_address (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Display full address of sender - Implements index_function_t -.
 
static int op_display_message (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Display a message - Implements index_function_t -.
 
static int op_edit_label (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Add, change, or delete a message's label - Implements index_function_t -.
 
static int op_edit_raw_message (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Edit the raw message (edit and edit-raw-message are synonyms) - Implements index_function_t -.
 
static int op_end_cond (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 End of conditional execution (noop) - Implements index_function_t -.
 
static int op_exit (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Exit this menu - Implements index_function_t -.
 
static int op_extract_keys (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Extract supported public keys - Implements index_function_t -.
 
static int op_flag_message (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Toggle a message's 'important' flag - Implements index_function_t -.
 
static int op_forget_passphrase (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Wipe passphrases from memory - Implements index_function_t -.
 
static int op_forward_message (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Forward a message with comments - Implements index_function_t -.
 
static int op_group_reply (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Reply to all recipients - Implements index_function_t -.
 
static int op_jump (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Jump to an index number - Implements index_function_t -.
 
static int op_list_reply (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Reply to specified mailing list - Implements index_function_t -.
 
static int op_list_subscribe (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Subscribe to a mailing list - Implements index_function_t -.
 
static int op_list_unsubscribe (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Unsubscribe from mailing list - Implements index_function_t -.
 
static int op_mail (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Compose a new mail message - Implements index_function_t -.
 
static int op_mailbox_list (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 List mailboxes with new mail - Implements index_function_t -.
 
static int op_mail_key (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Mail a PGP public key - Implements index_function_t -.
 
static int op_main_break_thread (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Break the thread in two - Implements index_function_t -.
 
static int op_main_change_folder (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Open a different folder - Implements index_function_t -.
 
static int op_main_collapse_all (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Collapse/uncollapse all threads - Implements index_function_t -.
 
static int op_main_close_all_threads (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Collapse all threads - Implements index_function_t -.
 
static int op_main_close_thread (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Collapse current thread - Implements index_function_t -.
 
static int op_main_collapse_thread (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Collapse/uncollapse current thread - Implements index_function_t -.
 
static int op_main_open_all_threads (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Open all threads - Implements index_function_t -.
 
static int op_main_open_thread (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Open current thread - Implements index_function_t -.
 
static int op_main_delete_pattern (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Delete messages matching a pattern - Implements index_function_t -.
 
static int op_main_limit (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Limit view to a pattern/thread - Implements index_function_t -.
 
static int op_main_link_threads (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Link tagged message to the current one - Implements index_function_t -.
 
static int op_main_modify_tags (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Modify (notmuch/imap) tags - Implements index_function_t -.
 
static int op_main_next_new (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Jump to the next new message - Implements index_function_t -.
 
static int op_main_next_thread (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Jump to the next thread - Implements index_function_t -.
 
static int op_main_next_undeleted (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Move to the next undeleted message - Implements index_function_t -.
 
static int op_main_next_unread_mailbox (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Open next mailbox with unread mail - Implements index_function_t -.
 
static int op_main_prev_undeleted (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Move to the previous undeleted message - Implements index_function_t -.
 
static int op_main_quasi_delete (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Delete from NeoMutt, don't touch on disk - Implements index_function_t -.
 
static int op_main_read_thread (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Mark the current thread as read - Implements index_function_t -.
 
static int op_main_root_message (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Jump to root message in thread - Implements index_function_t -.
 
static int op_main_set_flag (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Set a status flag on a message - Implements index_function_t -.
 
static int op_main_show_limit (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Show currently active limit pattern - Implements index_function_t -.
 
static int op_main_sync_folder (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Save changes to mailbox - Implements index_function_t -.
 
static int op_main_tag_pattern (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Tag messages matching a pattern - Implements index_function_t -.
 
static int op_main_undelete_pattern (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Undelete messages matching a pattern - Implements index_function_t -.
 
static int op_main_untag_pattern (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Untag messages matching a pattern - Implements index_function_t -.
 
static int op_mark_msg (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Create a hotkey macro for the current message - Implements index_function_t -.
 
static int op_next_entry (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Move to the next entry - Implements index_function_t -.
 
static int op_pipe (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Pipe message/attachment to a shell command - Implements index_function_t -.
 
static int op_prev_entry (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Move to the previous entry - Implements index_function_t -.
 
static int op_print (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Print the current entry - Implements index_function_t -.
 
static int op_query (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Query external program for addresses - Implements index_function_t -.
 
static int op_quit (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Save changes to mailbox and quit - Implements index_function_t -.
 
static int op_recall_message (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Recall a postponed message - Implements index_function_t -.
 
static int op_reply (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Reply to a message - Implements index_function_t -.
 
static int op_resend (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Use the current message as a template for a new one - Implements index_function_t -.
 
static int op_save (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Make decrypted copy - Implements index_function_t -.
 
static int op_search (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Search for a regular expression - Implements index_function_t -.
 
static int op_sort (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Sort messages - Implements index_function_t -.
 
static int op_tag (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Tag the current entry - Implements index_function_t -.
 
static int op_tag_thread (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Tag the current thread - Implements index_function_t -.
 
static int op_toggle_new (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Toggle a message's 'new' flag - Implements index_function_t -.
 
static int op_toggle_write (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Toggle whether the mailbox will be rewritten - Implements index_function_t -.
 
static int op_undelete (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Undelete the current entry - Implements index_function_t -.
 
static int op_undelete_thread (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Undelete all messages in thread - Implements index_function_t -.
 
static int op_view_attachments (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Show MIME attachments - Implements index_function_t -.
 
static int op_autocrypt_acct_menu (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Manage autocrypt accounts - Implements index_function_t -.
 
static int op_main_imap_fetch (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Force retrieval of mail from IMAP server - Implements index_function_t -.
 
static int op_main_imap_logout_all (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Logout from all IMAP servers - Implements index_function_t -.
 
static int op_catchup (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Mark all articles in newsgroup as read - Implements index_function_t -.
 
static int op_get_children (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Get all children of the current message - Implements index_function_t -.
 
static int op_get_message (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Get parent of the current message - Implements index_function_t -.
 
static int op_main_change_group (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Open a different newsgroup - Implements index_function_t -.
 
static int op_post (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Followup to newsgroup - Implements index_function_t -.
 
static int op_main_entire_thread (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Read entire thread of the current message - Implements index_function_t -.
 
static int op_main_vfolder_from_query (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Generate virtual folder from query - Implements index_function_t -.
 
static int op_main_windowed_vfolder (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Shifts virtual folder time window - Implements index_function_t -.
 
static int op_main_fetch_mail (struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
 Retrieve mail from POP server - Implements index_function_t -.
 
static bool prereq (struct IndexSharedData *shared, struct Menu *menu, CheckFlags checks)
 Check the pre-requisites for a function.
 
int index_function_dispatcher (struct MuttWindow *win, const struct KeyEvent *event)
 Perform an Index function - Implements function_dispatcher_t -.
 

Variables

struct MenuDefinitionMdIndex = NULL
 Index Menu Definition.
 
static const struct MenuFuncOp OpIndex []
 Functions for the Index Menu.
 
static const struct MenuOpSeq IndexDefaultBindings []
 Key bindings for the Index Menu.
 
static const struct IndexFunction IndexFunctions []
 All the NeoMutt functions that the Index supports.
 

Detailed Description

Index functions.

Authors
  • Pietro Cerutti
  • Richard Russon
  • Dennis Schön

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file functions.c.

Enumeration Type Documentation

◆ ResolveMethod

How to advance the cursor.

Enumerator
RESOLVE_NEXT_EMAIL 

Next email, whatever its state.

RESOLVE_NEXT_UNDELETED 

Next undeleted email.

RESOLVE_NEXT_THREAD 

Next top-level thread.

RESOLVE_NEXT_SUBTHREAD 

Next sibling sub-thread.

Definition at line 315 of file functions.c.

316{
321};
@ RESOLVE_NEXT_SUBTHREAD
Next sibling sub-thread.
Definition functions.c:320
@ RESOLVE_NEXT_UNDELETED
Next undeleted email.
Definition functions.c:318
@ RESOLVE_NEXT_EMAIL
Next email, whatever its state.
Definition functions.c:317
@ RESOLVE_NEXT_THREAD
Next top-level thread.
Definition functions.c:319

Function Documentation

◆ index_init_keys()

void index_init_keys ( struct SubMenu * sm_generic)

Initialise the Index Keybindings - Implements ::init_keys_api.

Definition at line 326 of file functions.c.

327{
328 struct MenuDefinition *md = NULL;
329 struct SubMenu *sm_index = NULL;
330 struct SubMenu *sm_sidebar = sidebar_get_submenu();
331
332 sm_index = km_register_submenu(OpIndex);
333 md = km_register_menu(MENU_INDEX, "index");
334 km_menu_add_submenu(md, sm_index);
335 km_menu_add_submenu(md, sm_sidebar);
336 km_menu_add_submenu(md, sm_generic);
338
339 MdIndex = md;
340}
static const struct MenuFuncOp OpIndex[]
Functions for the Index Menu.
Definition functions.c:86
static const struct MenuOpSeq IndexDefaultBindings[]
Key bindings for the Index Menu.
Definition functions.c:224
struct MenuDefinition * MdIndex
Index Menu Definition.
Definition functions.c:80
void km_menu_add_submenu(struct MenuDefinition *md, struct SubMenu *sm)
Add a SubMenu to a Menu Definition.
Definition init.c:123
struct SubMenu * km_register_submenu(const struct MenuFuncOp functions[])
Register a submenu.
Definition init.c:91
struct MenuDefinition * km_register_menu(int menu, const char *name)
Register a menu.
Definition init.c:107
void km_menu_add_bindings(struct MenuDefinition *md, const struct MenuOpSeq bindings[])
Add Keybindings to a Menu.
Definition init.c:136
struct SubMenu * sidebar_get_submenu(void)
Get the Sidebar SubMenu.
Definition functions.c:106
Functions for a Dialog or Window.
Definition menu.h:80
Collection of related functions.
Definition menu.h:68
@ MENU_INDEX
Index panel (list of emails)
Definition type.h:44
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolve_email()

static bool resolve_email ( struct IndexPrivateData * priv,
struct IndexSharedData * shared,
enum ResolveMethod rm )
static

Pick the next Email to advance the cursor to.

Parameters
privPrivate Index data
sharedShared Index data
rmHow to advance the cursor, e.g. RESOLVE_NEXT_EMAIL
Return values
trueResolve succeeded

Definition at line 349 of file functions.c.

351{
352 if (!priv || !priv->menu || !shared || !shared->mailbox || !shared->email)
353 return false;
354
355 const bool c_resolve = cs_subset_bool(shared->sub, "resolve");
356 if (!c_resolve)
357 return false;
358
359 int index = -1;
360 switch (rm)
361 {
363 index = menu_get_index(priv->menu) + 1;
364 break;
365
367 {
368 const bool uncollapse = mutt_using_threads() && !window_is_focused(priv->win_index);
369 index = find_next_undeleted(shared->mailbox_view, menu_get_index(priv->menu), uncollapse);
370 break;
371 }
372
374 index = mutt_next_thread(shared->email);
375 break;
376
378 index = mutt_next_subthread(shared->email);
379 break;
380 }
381
382 if ((index < 0) || (index >= shared->mailbox->vcount))
383 {
384 // Resolve failed
385 notify_send(shared->notify, NT_INDEX, NT_INDEX_EMAIL, NULL);
386 return false;
387 }
388
389 menu_set_index(priv->menu, index);
390 return true;
391}
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition helpers.c:47
int find_next_undeleted(struct MailboxView *mv, int msgno, bool uncollapse)
Find the next undeleted email.
Definition dlg_index.c:257
#define mutt_using_threads()
Definition thread.h:113
#define mutt_next_subthread(e)
Definition thread.h:120
#define mutt_next_thread(e)
Definition thread.h:118
#define NT_INDEX_EMAIL
Email has changed.
Definition lib.h:76
int menu_get_index(struct Menu *menu)
Get the current selection in the Menu.
Definition menu.c:164
MenuRedrawFlags menu_set_index(struct Menu *menu, int index)
Set the current selection in the Menu.
Definition menu.c:178
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition notify.c:173
bool window_is_focused(const struct MuttWindow *win)
Does the given Window have the focus?
@ NT_INDEX
Index data has changed, NotifyIndex, IndexSharedData.
Definition notify_type.h:48
struct MuttWindow * win_index
Window for the Index.
struct Menu * menu
Menu controlling the index.
struct Email * email
Currently selected Email.
Definition shared_data.h:42
struct Mailbox * mailbox
Current Mailbox.
Definition shared_data.h:41
struct ConfigSubset * sub
Config set to use.
Definition shared_data.h:38
struct MailboxView * mailbox_view
Current Mailbox view.
Definition shared_data.h:40
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition shared_data.h:44
int vcount
The number of virtual messages.
Definition mailbox.h:98
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ index_next_undeleted()

bool index_next_undeleted ( struct MuttWindow * win_index)

Select the next undeleted Email (if possible)

Parameters
win_indexIndex Window
Return values
trueSelection succeeded

Definition at line 398 of file functions.c.

399{
400 struct MuttWindow *dlg = dialog_find(win_index);
401 if (!dlg)
402 return false;
403
404 struct Menu *menu = win_index->wdata;
405 struct IndexSharedData *shared = dlg->wdata;
406 if (!shared)
407 return false;
408
409 struct IndexPrivateData *priv = win_index->parent->wdata;
410 const bool uncollapse = mutt_using_threads() && !window_is_focused(priv->win_index);
411
412 int index = find_next_undeleted(shared->mailbox_view, menu_get_index(menu), uncollapse);
413 if ((index < 0) || (index >= shared->mailbox->vcount))
414 {
415 // Selection failed
417 return false;
418 }
419
420 menu_set_index(menu, index);
421 return true;
422}
struct MuttWindow * dialog_find(struct MuttWindow *win)
Find the parent Dialog of a Window.
Definition dialog.c:89
Private state data for the Index.
struct IndexSharedData * shared
Shared Index data.
Data shared between Index, Pager and Sidebar.
Definition shared_data.h:37
Definition lib.h:80
void * wdata
Private data.
struct MuttWindow * parent
Parent Window.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prereq()

static bool prereq ( struct IndexSharedData * shared,
struct Menu * menu,
CheckFlags checks )
static

Check the pre-requisites for a function.

Parameters
sharedIndex shared data
menuCurrent Menu
checksChecks to perform, see CheckFlags
Return values
trueThe checks pass successfully

Definition at line 3250 of file functions.c.

3251{
3252 bool result = true;
3253 struct MailboxView *mv = shared->mailbox_view;
3254
3255 if (checks & (CHECK_MSGCOUNT | CHECK_VISIBLE | CHECK_READONLY))
3256 checks |= CHECK_IN_MAILBOX;
3257
3258 if ((checks & CHECK_IN_MAILBOX) && (!mv || !mv->mailbox))
3259 {
3260 mutt_error(_("No mailbox is open"));
3261 result = false;
3262 }
3263
3264 if (result && (checks & CHECK_MSGCOUNT) && (mv->mailbox->msg_count == 0))
3265 {
3266 mutt_error(_("There are no messages"));
3267 result = false;
3268 }
3269
3270 int index = menu_get_index(menu);
3271 if (result && (checks & CHECK_VISIBLE) &&
3272 ((index < 0) || (index >= mv->mailbox->vcount)))
3273 {
3274 mutt_error(_("No visible messages"));
3275 result = false;
3276 }
3277
3278 if (result && (checks & CHECK_READONLY) && mv->mailbox->readonly)
3279 {
3280 mutt_error(_("Mailbox is read-only"));
3281 result = false;
3282 }
3283
3284 if (result && (checks & CHECK_ATTACH) && shared->attach_msg)
3285 {
3286 mutt_error(_("Function not permitted in attach-message mode"));
3287 result = false;
3288 }
3289
3290 if (!result)
3291 mutt_flushinp();
3292
3293 return result;
3294}
void mutt_flushinp(void)
Empty all the keyboard buffers.
Definition get.c:65
#define mutt_error(...)
Definition logging2.h:94
#define CHECK_ATTACH
Is the user in message-attach mode?
Definition lib.h:84
#define CHECK_VISIBLE
Is the selected message visible in the index?
Definition lib.h:82
#define CHECK_IN_MAILBOX
Is there a mailbox open?
Definition lib.h:80
#define CHECK_READONLY
Is the mailbox readonly?
Definition lib.h:83
#define CHECK_MSGCOUNT
Are there any messages?
Definition lib.h:81
#define _(a)
Definition message.h:28
bool attach_msg
Are we in "attach message" mode?
Definition shared_data.h:46
View of a Mailbox.
Definition mview.h:40
struct Menu * menu
Needed for pattern compilation.
Definition mview.h:47
struct Mailbox * mailbox
Current Mailbox.
Definition mview.h:51
int msg_count
Total number of messages.
Definition mailbox.h:87
bool readonly
Don't allow changes to the mailbox.
Definition mailbox.h:115
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ MdIndex

struct MenuDefinition* MdIndex = NULL

Index Menu Definition.

Definition at line 80 of file functions.c.

◆ OpIndex

const struct MenuFuncOp OpIndex[]
static

Functions for the Index Menu.

Definition at line 86 of file functions.c.

86 { /* map: index */
87 { "alias-dialog", OP_ALIAS_DIALOG },
88#ifdef USE_AUTOCRYPT
89 { "autocrypt-acct-menu", OP_AUTOCRYPT_ACCT_MENU },
90#endif
91 { "bounce-message", OP_BOUNCE_MESSAGE },
92 { "break-thread", OP_MAIN_BREAK_THREAD },
93 { "catchup", OP_CATCHUP },
94 { "change-folder", OP_MAIN_CHANGE_FOLDER },
95 { "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY },
96 { "change-newsgroup", OP_MAIN_CHANGE_GROUP },
97 { "change-newsgroup-readonly", OP_MAIN_CHANGE_GROUP_READONLY },
98#ifdef USE_NOTMUCH
99 { "change-vfolder", OP_MAIN_CHANGE_VFOLDER },
100#endif
101 { "check-traditional-pgp", OP_CHECK_TRADITIONAL },
102 { "clear-flag", OP_MAIN_CLEAR_FLAG },
103 { "close-all-threads", OP_MAIN_CLOSE_ALL_THREADS },
104 { "close-thread", OP_MAIN_CLOSE_THREAD },
105 { "collapse-all", OP_MAIN_COLLAPSE_ALL },
106 { "collapse-thread", OP_MAIN_COLLAPSE_THREAD },
107 { "compose-to-sender", OP_COMPOSE_TO_SENDER },
108 { "copy-message", OP_COPY_MESSAGE },
109 { "create-alias", OP_CREATE_ALIAS },
110 { "decode-copy", OP_DECODE_COPY },
111 { "decode-save", OP_DECODE_SAVE },
112 { "decrypt-copy", OP_DECRYPT_COPY },
113 { "decrypt-save", OP_DECRYPT_SAVE },
114 { "delete-message", OP_DELETE },
115 { "delete-pattern", OP_MAIN_DELETE_PATTERN },
116 { "delete-subthread", OP_DELETE_SUBTHREAD },
117 { "delete-thread", OP_DELETE_THREAD },
118 { "display-address", OP_DISPLAY_ADDRESS },
119 { "display-message", OP_DISPLAY_MESSAGE },
120 { "display-toggle-weed", OP_DISPLAY_HEADERS },
121 { "edit", OP_EDIT_RAW_MESSAGE },
122 { "edit-label", OP_EDIT_LABEL },
123 { "edit-or-view-raw-message", OP_EDIT_OR_VIEW_RAW_MESSAGE },
124 { "edit-raw-message", OP_EDIT_RAW_MESSAGE },
125 { "edit-type", OP_ATTACH_EDIT_TYPE },
126#ifdef USE_NOTMUCH
127 { "entire-thread", OP_MAIN_ENTIRE_THREAD },
128#endif
129 { "exit", OP_EXIT },
130 { "extract-keys", OP_EXTRACT_KEYS },
131 { "fetch-mail", OP_MAIN_FETCH_MAIL },
132 { "flag-message", OP_FLAG_MESSAGE },
133 { "followup-message", OP_FOLLOWUP },
134 { "forget-passphrase", OP_FORGET_PASSPHRASE },
135 { "forward-message", OP_FORWARD_MESSAGE },
136 { "forward-to-group", OP_FORWARD_TO_GROUP },
137 { "get-children", OP_GET_CHILDREN },
138 { "get-message", OP_GET_MESSAGE },
139 { "get-parent", OP_GET_PARENT },
140 { "group-chat-reply", OP_GROUP_CHAT_REPLY },
141 { "group-reply", OP_GROUP_REPLY },
142 { "imap-fetch-mail", OP_MAIN_IMAP_FETCH },
143 { "imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL },
144 { "limit", OP_MAIN_LIMIT },
145 { "limit-current-thread", OP_LIMIT_CURRENT_THREAD },
146 { "link-threads", OP_MAIN_LINK_THREADS },
147 { "list-reply", OP_LIST_REPLY },
148 { "list-subscribe", OP_LIST_SUBSCRIBE },
149 { "list-unsubscribe", OP_LIST_UNSUBSCRIBE },
150 { "mail", OP_MAIL },
151 { "mail-key", OP_MAIL_KEY },
152 { "mailbox-list", OP_MAILBOX_LIST },
153 { "mark-message", OP_MARK_MSG },
154 { "modify-labels", OP_MAIN_MODIFY_TAGS },
155 { "modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
156 { "modify-tags", OP_MAIN_MODIFY_TAGS },
157 { "modify-tags-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
158 { "next-new", OP_MAIN_NEXT_NEW },
159 { "next-new-then-unread", OP_MAIN_NEXT_NEW_THEN_UNREAD },
160 { "next-subthread", OP_MAIN_NEXT_SUBTHREAD },
161 { "next-thread", OP_MAIN_NEXT_THREAD },
162 { "next-undeleted", OP_MAIN_NEXT_UNDELETED },
163 { "next-unread", OP_MAIN_NEXT_UNREAD },
164 { "next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX },
165 { "open-all-threads", OP_MAIN_OPEN_ALL_THREADS },
166 { "open-thread", OP_MAIN_OPEN_THREAD },
167 { "parent-message", OP_MAIN_PARENT_MESSAGE },
168 { "pipe-entry", OP_PIPE },
169 { "pipe-message", OP_PIPE },
170 { "post-message", OP_POST },
171 { "previous-new", OP_MAIN_PREV_NEW },
172 { "previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD },
173 { "previous-subthread", OP_MAIN_PREV_SUBTHREAD },
174 { "previous-thread", OP_MAIN_PREV_THREAD },
175 { "previous-undeleted", OP_MAIN_PREV_UNDELETED },
176 { "previous-unread", OP_MAIN_PREV_UNREAD },
177 { "print-message", OP_PRINT },
178 { "purge-message", OP_PURGE_MESSAGE },
179 { "purge-thread", OP_PURGE_THREAD },
180 { "quasi-delete", OP_MAIN_QUASI_DELETE },
181 { "query", OP_QUERY },
182 { "quit", OP_QUIT },
183 { "read-subthread", OP_MAIN_READ_SUBTHREAD },
184 { "read-thread", OP_MAIN_READ_THREAD },
185 { "recall-message", OP_RECALL_MESSAGE },
186 { "reconstruct-thread", OP_RECONSTRUCT_THREAD },
187 { "reply", OP_REPLY },
188 { "resend-message", OP_RESEND },
189 { "root-message", OP_MAIN_ROOT_MESSAGE },
190 { "save-message", OP_SAVE },
191 { "set-flag", OP_MAIN_SET_FLAG },
192 { "show-limit", OP_MAIN_SHOW_LIMIT },
193 { "sort-mailbox", OP_SORT },
194 { "sort-reverse", OP_SORT_REVERSE },
195 { "sync-mailbox", OP_MAIN_SYNC_FOLDER },
196 { "tag-pattern", OP_MAIN_TAG_PATTERN },
197 { "tag-subthread", OP_TAG_SUBTHREAD },
198 { "tag-thread", OP_TAG_THREAD },
199 { "toggle-new", OP_TOGGLE_NEW },
200 { "toggle-read", OP_TOGGLE_READ },
201 { "toggle-write", OP_TOGGLE_WRITE },
202 { "undelete-message", OP_UNDELETE },
203 { "undelete-pattern", OP_MAIN_UNDELETE_PATTERN },
204 { "undelete-subthread", OP_UNDELETE_SUBTHREAD },
205 { "undelete-thread", OP_UNDELETE_THREAD },
206 { "untag-pattern", OP_MAIN_UNTAG_PATTERN },
207#ifdef USE_NOTMUCH
208 { "vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY },
209 { "vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY },
210 { "vfolder-window-backward", OP_MAIN_WINDOWED_VFOLDER_BACKWARD },
211 { "vfolder-window-forward", OP_MAIN_WINDOWED_VFOLDER_FORWARD },
212 { "vfolder-window-reset", OP_MAIN_WINDOWED_VFOLDER_RESET },
213#endif
214 { "view-attachments", OP_VIEW_ATTACHMENTS },
215 { "view-raw-message", OP_VIEW_RAW_MESSAGE },
216 // Deprecated
217 { "buffy-list", OP_MAILBOX_LIST, MFF_DEPRECATED },
218 { NULL, 0 },
219};
#define MFF_DEPRECATED
Redraw the pager.
Definition get.h:44

◆ IndexDefaultBindings

const struct MenuOpSeq IndexDefaultBindings[]
static

Key bindings for the Index Menu.

Definition at line 224 of file functions.c.

224 { /* map: index */
225 { OP_ATTACH_EDIT_TYPE, "\005" }, // <Ctrl-E>
226#ifdef USE_AUTOCRYPT
227 { OP_AUTOCRYPT_ACCT_MENU, "A" },
228#endif
229 { OP_BOUNCE_MESSAGE, "b" },
230 { OP_CHECK_TRADITIONAL, "\033P" }, // <Alt-P>
231 { OP_COPY_MESSAGE, "C" },
232 { OP_CREATE_ALIAS, "a" },
233 { OP_DECODE_COPY, "\033C" }, // <Alt-C>
234 { OP_DECODE_SAVE, "\033s" }, // <Alt-s>
235 { OP_DELETE, "d" },
236 { OP_DELETE_SUBTHREAD, "\033d" }, // <Alt-d>
237 { OP_DELETE_THREAD, "\004" }, // <Ctrl-D>
238 { OP_DISPLAY_ADDRESS, "@" },
239 { OP_DISPLAY_HEADERS, "h" },
240 { OP_DISPLAY_MESSAGE, " " }, // <Space>
241 { OP_DISPLAY_MESSAGE, "<keypadenter>" },
242 { OP_DISPLAY_MESSAGE, "\n" }, // <Enter>
243 { OP_DISPLAY_MESSAGE, "\r" }, // <Return>
244 { OP_EDIT_LABEL, "Y" },
245 { OP_EDIT_OR_VIEW_RAW_MESSAGE, "e" },
246 { OP_EXIT, "x" },
247 { OP_EXTRACT_KEYS, "\013" }, // <Ctrl-K>
248 { OP_FLAG_MESSAGE, "F" },
249 { OP_FORGET_PASSPHRASE, "\006" }, // <Ctrl-F>
250 { OP_FORWARD_MESSAGE, "f" },
251 { OP_GROUP_REPLY, "g" },
252 { OP_LIST_REPLY, "L" },
253 { OP_MAIL, "m" },
254 { OP_MAILBOX_LIST, "." },
255 { OP_MAIL_KEY, "\033k" }, // <Alt-k>
256 { OP_MAIN_BREAK_THREAD, "#" },
257 { OP_MAIN_CHANGE_FOLDER, "c" },
258 { OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" }, // <Alt-c>
259 { OP_MAIN_CHANGE_GROUP, "i" },
260 { OP_MAIN_CHANGE_GROUP_READONLY, "\033i" }, // <Alt-i>
261 { OP_MAIN_CLEAR_FLAG, "W" },
262 { OP_MAIN_COLLAPSE_ALL, "\033V" }, // <Alt-V>
263 { OP_MAIN_COLLAPSE_THREAD, "\033v" }, // <Alt-v>
264 { OP_MAIN_DELETE_PATTERN, "D" },
265 { OP_MAIN_FETCH_MAIL, "G" },
266 { OP_MAIN_LIMIT, "l" },
267 { OP_MAIN_LINK_THREADS, "&" },
268 { OP_MAIN_NEXT_NEW_THEN_UNREAD, "\t" }, // <Tab>
269 { OP_MAIN_NEXT_SUBTHREAD, "\033n" }, // <Alt-n>
270 { OP_MAIN_NEXT_THREAD, "\016" }, // <Ctrl-N>
271 { OP_MAIN_NEXT_UNDELETED, "<down>" },
272 { OP_MAIN_NEXT_UNDELETED, "j" },
273 { OP_MAIN_PARENT_MESSAGE, "P" },
274 { OP_MAIN_PREV_NEW_THEN_UNREAD, "\033\t" }, // <Alt-Tab>
275 { OP_MAIN_PREV_SUBTHREAD, "\033p" }, // <Alt-p>
276 { OP_MAIN_PREV_THREAD, "\020" }, // <Ctrl-P>
277 { OP_MAIN_PREV_UNDELETED, "<up>" },
278 { OP_MAIN_PREV_UNDELETED, "k" },
279 { OP_MAIN_READ_SUBTHREAD, "\033r" }, // <Alt-r>
280 { OP_MAIN_READ_THREAD, "\022" }, // <Ctrl-R>
281 { OP_MAIN_SET_FLAG, "w" },
282 { OP_MAIN_SHOW_LIMIT, "\033l" }, // <Alt-l>
283 { OP_MAIN_SYNC_FOLDER, "$" },
284 { OP_MAIN_TAG_PATTERN, "T" },
285 { OP_MAIN_UNDELETE_PATTERN, "U" },
286 { OP_MAIN_UNTAG_PATTERN, "\024" }, // <Ctrl-T>
287 { OP_MARK_MSG, "~" },
288 { OP_NEXT_ENTRY, "J" },
289 { OP_PIPE, "|" },
290 { OP_PREV_ENTRY, "K" },
291 { OP_PRINT, "p" },
292 { OP_QUERY, "Q" },
293 { OP_QUIT, "q" },
294 { OP_RECALL_MESSAGE, "R" },
295 { OP_REPLY, "r" },
296 { OP_RESEND, "\033e" }, // <Alt-e>
297 { OP_SAVE, "s" },
298 { OP_SHOW_LOG_MESSAGES, "M" },
299 { OP_SORT, "o" },
300 { OP_SORT_REVERSE, "O" },
301 { OP_TAG_THREAD, "\033t" }, // <Alt-t>
302 { OP_TOGGLE_NEW, "N" },
303 { OP_TOGGLE_WRITE, "%" },
304 { OP_UNDELETE, "u" },
305 { OP_UNDELETE_SUBTHREAD, "\033u" }, // <Alt-u>
306 { OP_UNDELETE_THREAD, "\025" }, // <Ctrl-U>
307 { OP_VIEW_ATTACHMENTS, "v" },
308 { 0, NULL },
309};

◆ IndexFunctions

const struct IndexFunction IndexFunctions[]
static

All the NeoMutt functions that the Index supports.

Definition at line 3299 of file functions.c.

3299 {
3300 // clang-format off
3301 { OP_ALIAS_DIALOG, op_alias_dialog, CHECK_NO_FLAGS },
3307 { OP_COPY_MESSAGE, op_save, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3308 { OP_CREATE_ALIAS, op_create_alias, CHECK_NO_FLAGS },
3309 { OP_DECODE_COPY, op_save, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3310 { OP_DECODE_SAVE, op_save, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3311 { OP_DECRYPT_COPY, op_save, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3312 { OP_DECRYPT_SAVE, op_save, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3320 { OP_EDIT_OR_VIEW_RAW_MESSAGE, op_edit_raw_message, CHECK_ATTACH | CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3322 { OP_END_COND, op_end_cond, CHECK_NO_FLAGS },
3323 { OP_EXIT, op_exit, CHECK_NO_FLAGS },
3327 { OP_FORGET_PASSPHRASE, op_forget_passphrase, CHECK_NO_FLAGS },
3329 { OP_FORWARD_TO_GROUP, op_post, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3333 { OP_GENERIC_SELECT_ENTRY, op_display_message, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3336 { OP_JUMP, op_jump, CHECK_IN_MAILBOX },
3337 { OP_JUMP_1, op_jump, CHECK_IN_MAILBOX },
3338 { OP_JUMP_2, op_jump, CHECK_IN_MAILBOX },
3339 { OP_JUMP_3, op_jump, CHECK_IN_MAILBOX },
3340 { OP_JUMP_4, op_jump, CHECK_IN_MAILBOX },
3341 { OP_JUMP_5, op_jump, CHECK_IN_MAILBOX },
3342 { OP_JUMP_6, op_jump, CHECK_IN_MAILBOX },
3343 { OP_JUMP_7, op_jump, CHECK_IN_MAILBOX },
3344 { OP_JUMP_8, op_jump, CHECK_IN_MAILBOX },
3345 { OP_JUMP_9, op_jump, CHECK_IN_MAILBOX },
3346 { OP_LIMIT_CURRENT_THREAD, op_main_limit, CHECK_IN_MAILBOX },
3350 { OP_MAIL, op_mail, CHECK_ATTACH },
3351 { OP_MAILBOX_LIST, op_mailbox_list, CHECK_NO_FLAGS },
3352 { OP_MAIL_KEY, op_mail_key, CHECK_ATTACH },
3354 { OP_MAIN_CHANGE_FOLDER, op_main_change_folder, CHECK_NO_FLAGS },
3355 { OP_MAIN_CHANGE_FOLDER_READONLY, op_main_change_folder, CHECK_NO_FLAGS },
3356 { OP_MAIN_CHANGE_GROUP, op_main_change_group, CHECK_NO_FLAGS },
3357 { OP_MAIN_CHANGE_GROUP_READONLY, op_main_change_group, CHECK_NO_FLAGS },
3359 { OP_MAIN_CLOSE_ALL_THREADS, op_main_close_all_threads, CHECK_IN_MAILBOX },
3361 { OP_MAIN_COLLAPSE_ALL, op_main_collapse_all, CHECK_IN_MAILBOX },
3362 { OP_MAIN_COLLAPSE_THREAD, op_main_collapse_thread, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3363 { OP_MAIN_DELETE_PATTERN, op_main_delete_pattern, CHECK_ATTACH | CHECK_IN_MAILBOX | CHECK_READONLY },
3364 { OP_MAIN_FETCH_MAIL, op_main_fetch_mail, CHECK_ATTACH },
3365 { OP_MAIN_IMAP_FETCH, op_main_imap_fetch, CHECK_NO_FLAGS },
3366 { OP_MAIN_IMAP_LOGOUT_ALL, op_main_imap_logout_all, CHECK_NO_FLAGS },
3367 { OP_MAIN_LIMIT, op_main_limit, CHECK_IN_MAILBOX },
3370 { OP_MAIN_MODIFY_TAGS_THEN_HIDE, op_main_modify_tags, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_READONLY | CHECK_VISIBLE },
3372 { OP_MAIN_NEXT_NEW_THEN_UNREAD, op_main_next_new, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3373 { OP_MAIN_NEXT_SUBTHREAD, op_main_next_thread, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3376 { OP_MAIN_NEXT_UNREAD, op_main_next_new, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3377 { OP_MAIN_NEXT_UNREAD_MAILBOX, op_main_next_unread_mailbox, CHECK_IN_MAILBOX },
3378 { OP_MAIN_OPEN_ALL_THREADS, op_main_open_all_threads, CHECK_IN_MAILBOX },
3380 { OP_MAIN_PARENT_MESSAGE, op_main_root_message, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3382 { OP_MAIN_PREV_NEW_THEN_UNREAD, op_main_next_new, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3383 { OP_MAIN_PREV_SUBTHREAD, op_main_next_thread, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3386 { OP_MAIN_PREV_UNREAD, op_main_next_new, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3392 { OP_MAIN_SHOW_LIMIT, op_main_show_limit, CHECK_IN_MAILBOX },
3393 { OP_MAIN_SYNC_FOLDER, op_main_sync_folder, CHECK_NO_FLAGS },
3394 { OP_MAIN_TAG_PATTERN, op_main_tag_pattern, CHECK_IN_MAILBOX },
3395 { OP_MAIN_UNDELETE_PATTERN, op_main_undelete_pattern, CHECK_IN_MAILBOX | CHECK_READONLY },
3396 { OP_MAIN_UNTAG_PATTERN, op_main_untag_pattern, CHECK_IN_MAILBOX },
3400 { OP_POST, op_post, CHECK_ATTACH | CHECK_IN_MAILBOX },
3405 { OP_QUERY, op_query, CHECK_ATTACH },
3406 { OP_QUIT, op_quit, CHECK_NO_FLAGS },
3407 { OP_RECALL_MESSAGE, op_recall_message, CHECK_ATTACH },
3412 { OP_SEARCH, op_search, CHECK_IN_MAILBOX },
3413 { OP_SEARCH_NEXT, op_search, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3414 { OP_SEARCH_OPPOSITE, op_search, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3415 { OP_SEARCH_REVERSE, op_search, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE },
3416 { OP_SORT, op_sort, CHECK_NO_FLAGS },
3417 { OP_SORT_REVERSE, op_sort, CHECK_NO_FLAGS },
3422 { OP_TOGGLE_READ, op_main_limit, CHECK_IN_MAILBOX },
3423 { OP_TOGGLE_WRITE, op_toggle_write, CHECK_IN_MAILBOX },
3429#ifdef USE_AUTOCRYPT
3430 { OP_AUTOCRYPT_ACCT_MENU, op_autocrypt_acct_menu, CHECK_NO_FLAGS },
3431#endif
3432#ifdef USE_NOTMUCH
3433 { OP_MAIN_CHANGE_VFOLDER, op_main_change_folder, CHECK_NO_FLAGS },
3435 { OP_MAIN_VFOLDER_FROM_QUERY, op_main_vfolder_from_query, CHECK_NO_FLAGS },
3436 { OP_MAIN_VFOLDER_FROM_QUERY_READONLY, op_main_vfolder_from_query, CHECK_NO_FLAGS },
3437 { OP_MAIN_WINDOWED_VFOLDER_BACKWARD, op_main_windowed_vfolder, CHECK_IN_MAILBOX },
3438 { OP_MAIN_WINDOWED_VFOLDER_FORWARD, op_main_windowed_vfolder, CHECK_IN_MAILBOX },
3439 { OP_MAIN_WINDOWED_VFOLDER_RESET, op_main_windowed_vfolder, CHECK_IN_MAILBOX },
3440#endif
3441 { 0, NULL, CHECK_NO_FLAGS },
3442 // clang-format on
3443};
static int op_search(struct AliasMenuData *mdata, const struct KeyEvent *event)
search for a regular expression - Implements alias_function_t -
Definition functions.c:386
static int op_main_untag_pattern(struct AliasMenuData *mdata, const struct KeyEvent *event)
Untag messages matching a pattern - Implements alias_function_t -.
Definition functions.c:313
static int op_sort(struct AliasMenuData *mdata, const struct KeyEvent *event)
sort aliases - Implements alias_function_t -
Definition functions.c:423
static int op_create_alias(struct AliasMenuData *mdata, const struct KeyEvent *event)
create an alias from a message sender - Implements alias_function_t -
Definition functions.c:153
static int op_main_limit(struct AliasMenuData *mdata, const struct KeyEvent *event)
show only messages matching a pattern - Implements alias_function_t -
Definition functions.c:278
static int op_exit(struct AliasMenuData *mdata, const struct KeyEvent *event)
exit this menu - Implements alias_function_t -
Definition functions.c:234
static int op_query(struct AliasMenuData *mdata, const struct KeyEvent *event)
query external program for addresses - Implements alias_function_t -
Definition functions.c:333
static int op_delete(struct AliasMenuData *mdata, const struct KeyEvent *event)
delete the current entry - Implements alias_function_t -
Definition functions.c:197
static int op_main_tag_pattern(struct AliasMenuData *mdata, const struct KeyEvent *event)
Tag messages matching a pattern - Implements alias_function_t -.
Definition functions.c:297
static int op_forward_message(struct AttachPrivateData *priv, const struct KeyEvent *event)
forward a message with comments - Implements attach_function_t -
Definition functions.c:578
static int op_reply(struct AttachPrivateData *priv, const struct KeyEvent *event)
reply to a message - Implements attach_function_t -
Definition functions.c:612
static int op_forget_passphrase(struct AttachPrivateData *priv, const struct KeyEvent *event)
wipe passphrases from memory - Implements attach_function_t -
Definition functions.c:569
static int op_compose_to_sender(struct AttachPrivateData *priv, const struct KeyEvent *event)
compose new message to the current message sender - Implements attach_function_t -
Definition functions.c:521
static int op_list_subscribe(struct AttachPrivateData *priv, const struct KeyEvent *event)
subscribe to a mailing list - Implements attach_function_t -
Definition functions.c:592
static int op_check_traditional(struct AttachPrivateData *priv, const struct KeyEvent *event)
check for classic PGP - Implements attach_function_t -
Definition functions.c:507
static int op_list_unsubscribe(struct AttachPrivateData *priv, const struct KeyEvent *event)
unsubscribe from a mailing list - Implements attach_function_t -
Definition functions.c:602
static int op_extract_keys(struct AttachPrivateData *priv, const struct KeyEvent *event)
extract supported public keys - Implements attach_function_t -
Definition functions.c:555
static int op_resend(struct AttachPrivateData *priv, const struct KeyEvent *event)
use the current message as a template for a new one - Implements attach_function_t -
Definition functions.c:636
static int op_bounce_message(struct AttachPrivateData *priv, const struct KeyEvent *event)
remail a message to another user - Implements attach_function_t -
Definition functions.c:493
static int op_attach_edit_type(struct AttachPrivateData *priv, const struct KeyEvent *event)
edit attachment content type - Implements attach_function_t -
Definition functions.c:359
static int op_mailbox_list(struct BrowserPrivateData *priv, const struct KeyEvent *event)
List mailboxes with new mail - Implements browser_function_t -.
Definition functions.c:857
static int op_catchup(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Mark all articles in newsgroup as read - Implements browser_function_t -.
Definition functions.c:318
static int op_quit(struct HistoryData *hd, const struct KeyEvent *event)
Quit this menu - Implements history_function_t -.
Definition functions.c:57
static int op_main_next_undeleted(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Move to the next undeleted message - Implements index_function_t -.
Definition functions.c:1770
static int op_view_attachments(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Show MIME attachments - Implements index_function_t -.
Definition functions.c:2651
static int op_main_link_threads(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Link tagged message to the current one - Implements index_function_t -.
Definition functions.c:1418
static int op_main_set_flag(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Set a status flag on a message - Implements index_function_t -.
Definition functions.c:1944
static int op_pipe(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Pipe message/attachment to a shell command - Implements index_function_t -.
Definition functions.c:2194
static int op_undelete(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Undelete the current entry - Implements index_function_t -.
Definition functions.c:2586
static int op_print(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Print the current entry - Implements index_function_t -.
Definition functions.c:2233
static int op_display_address(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Display full address of sender - Implements index_function_t -.
Definition functions.c:598
static int op_alias_dialog(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Open the aliases dialog - Implements index_function_t -.
Definition functions.c:429
static int op_main_vfolder_from_query(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Generate virtual folder from query - Implements index_function_t -.
Definition functions.c:3141
static int op_toggle_write(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Toggle whether the mailbox will be rewritten - Implements index_function_t -.
Definition functions.c:2576
static int op_main_break_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Break the thread in two - Implements index_function_t -.
Definition functions.c:1053
static int op_main_open_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Open current thread - Implements index_function_t -.
Definition functions.c:1297
static int op_toggle_new(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Toggle a message's 'new' flag - Implements index_function_t -.
Definition functions.c:2533
static int op_list_reply(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Reply to specified mailing list - Implements index_function_t -.
Definition functions.c:974
static int op_autocrypt_acct_menu(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Manage autocrypt accounts - Implements index_function_t -.
Definition functions.c:2680
static int op_main_delete_pattern(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Delete messages matching a pattern - Implements index_function_t -.
Definition functions.c:1324
static int op_tag_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Tag the current thread - Implements index_function_t -.
Definition functions.c:2510
static int op_main_change_group(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Open a different newsgroup - Implements index_function_t -.
Definition functions.c:2942
static int op_main_sync_folder(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Save changes to mailbox - Implements index_function_t -.
Definition functions.c:1991
static int op_main_imap_fetch(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Force retrieval of mail from IMAP server - Implements index_function_t -.
Definition functions.c:2691
static int op_main_root_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Jump to root message in thread - Implements index_function_t -.
Definition functions.c:1927
static int op_main_close_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Collapse current thread - Implements index_function_t -.
Definition functions.c:1205
static int op_main_fetch_mail(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Retrieve mail from POP server - Implements index_function_t -.
Definition functions.c:3233
static int op_main_close_all_threads(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Collapse all threads - Implements index_function_t -.
Definition functions.c:1183
static int op_main_imap_logout_all(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Logout from all IMAP servers - Implements index_function_t -.
Definition functions.c:2704
static int op_flag_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Toggle a message's 'important' flag - Implements index_function_t -.
Definition functions.c:817
static int op_prev_entry(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Move to the previous entry - Implements index_function_t -.
Definition functions.c:2216
static int op_main_next_new(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Jump to the next new message - Implements index_function_t -.
Definition functions.c:1598
static int op_main_change_folder(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Open a different folder - Implements index_function_t -.
Definition functions.c:1101
static int op_edit_label(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Add, change, or delete a message's label - Implements index_function_t -.
Definition functions.c:687
static int op_delete_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Delete all messages in thread - Implements index_function_t -.
Definition functions.c:562
static int op_main_show_limit(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Show currently active limit pattern - Implements index_function_t -.
Definition functions.c:1969
static int op_get_children(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Get all children of the current message - Implements index_function_t -.
Definition functions.c:2758
static int op_main_next_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Jump to the next thread - Implements index_function_t -.
Definition functions.c:1727
static int op_main_collapse_all(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Collapse/uncollapse all threads - Implements index_function_t -.
Definition functions.c:1166
static int op_edit_raw_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Edit the raw message (edit and edit-raw-message are synonyms) - Implements index_function_t -.
Definition functions.c:723
static int op_group_reply(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Reply to all recipients - Implements index_function_t -.
Definition functions.c:892
static int op_main_undelete_pattern(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Undelete messages matching a pattern - Implements index_function_t -.
Definition functions.c:2086
static int op_get_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Get parent of the current message - Implements index_function_t -.
Definition functions.c:2860
static int op_mark_msg(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Create a hotkey macro for the current message - Implements index_function_t -.
Definition functions.c:2121
static int op_main_quasi_delete(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Delete from NeoMutt, don't touch on disk - Implements index_function_t -.
Definition functions.c:1860
static int op_display_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Display a message - Implements index_function_t -.
Definition functions.c:615
static int op_main_windowed_vfolder(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Shifts virtual folder time window - Implements index_function_t -.
Definition functions.c:3190
static int op_save(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Make decrypted copy - Implements index_function_t -.
Definition functions.c:2375
static int op_post(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Followup to newsgroup - Implements index_function_t -.
Definition functions.c:3019
static int op_main_open_all_threads(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Open all threads - Implements index_function_t -.
Definition functions.c:1275
static int op_main_entire_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Read entire thread of the current message - Implements index_function_t -.
Definition functions.c:3062
static int op_jump(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Jump to an index number - Implements index_function_t -.
Definition functions.c:922
static int op_mail(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Compose a new mail message - Implements index_function_t -.
Definition functions.c:1017
static int op_main_collapse_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Collapse/uncollapse current thread - Implements index_function_t -.
Definition functions.c:1233
static int op_main_modify_tags(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Modify (notmuch/imap) tags - Implements index_function_t -.
Definition functions.c:1476
static int op_main_prev_undeleted(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Move to the previous undeleted message - Implements index_function_t -.
Definition functions.c:1827
static int op_main_next_unread_mailbox(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Open next mailbox with unread mail - Implements index_function_t -.
Definition functions.c:1803
static int op_mail_key(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Mail a PGP public key - Implements index_function_t -.
Definition functions.c:1039
static int op_end_cond(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
End of conditional execution (noop) - Implements index_function_t -.
Definition functions.c:769
static int op_main_read_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Mark the current thread as read - Implements index_function_t -.
Definition functions.c:1896
static int op_next_entry(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Move to the next entry - Implements index_function_t -.
Definition functions.c:2177
static int op_tag(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Tag the current entry - Implements index_function_t -.
Definition functions.c:2475
static int op_undelete_thread(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Undelete all messages in thread - Implements index_function_t -.
Definition functions.c:2619
static int op_recall_message(struct IndexSharedData *shared, struct IndexPrivateData *priv, const struct KeyEvent *event)
Recall a postponed message - Implements index_function_t -.
Definition functions.c:2302
#define CHECK_NO_FLAGS
No flags are set.
Definition lib.h:79