NeoMutt  2025-09-05-43-g177ed6
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
functions.c File Reference

Alias functions. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "address/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "mutt.h"
#include "lib.h"
#include "editor/lib.h"
#include "history/lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "pattern/lib.h"
#include "question/lib.h"
#include "alias.h"
#include "functions.h"
#include "gui.h"
#include "sort.h"
+ Include dependency graph for functions.c:

Go to the source code of this file.

Functions

static int op_create_alias (struct AliasMenuData *mdata, int op)
 create an alias from a message sender - Implements alias_function_t -
 
static int op_delete (struct AliasMenuData *mdata, int op)
 delete the current entry - Implements alias_function_t -
 
static int op_exit (struct AliasMenuData *mdata, int op)
 exit this menu - Implements alias_function_t -
 
static int op_generic_select_entry (struct AliasMenuData *mdata, int op)
 select the current entry - Implements alias_function_t -
 
static int op_main_limit (struct AliasMenuData *mdata, int op)
 show only messages matching a pattern - Implements alias_function_t -
 
static int op_main_tag_pattern (struct AliasMenuData *mdata, int op)
 Tag messages matching a pattern - Implements alias_function_t -.
 
static int op_main_untag_pattern (struct AliasMenuData *mdata, int op)
 Untag messages matching a pattern - Implements alias_function_t -.
 
static int op_query (struct AliasMenuData *mdata, int op)
 query external program for addresses - Implements alias_function_t -
 
static int op_search (struct AliasMenuData *mdata, int op)
 search for a regular expression - Implements alias_function_t -
 
static int op_sort (struct AliasMenuData *mdata, int op)
 sort aliases - Implements alias_function_t -
 
int alias_function_dispatcher (struct MuttWindow *win, int op)
 Perform a Alias function - Implements function_dispatcher_t -.
 

Variables

const struct MenuFuncOp OpAlias []
 Functions for the Alias Menu.
 
const struct MenuFuncOp OpQuery []
 Functions for the external Query Menu.
 
const struct MenuOpSeq AliasDefaultBindings []
 Key bindings for the Alias Menu.
 
const struct MenuOpSeq QueryDefaultBindings []
 Key bindings for the external Query Menu.
 
static const struct AliasFunction AliasFunctions []
 All the NeoMutt functions that the Alias supports.
 

Detailed Description

Alias functions.

Authors
  • 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.

Variable Documentation

◆ OpAlias

const struct MenuFuncOp OpAlias[]
Initial value:
= {
{ "delete-entry", OP_DELETE },
{ "exit", OP_EXIT },
{ "limit", OP_MAIN_LIMIT },
{ "mail", OP_MAIL },
{ "sort-alias", OP_SORT },
{ "sort-alias-reverse", OP_SORT_REVERSE },
{ "tag-pattern", OP_MAIN_TAG_PATTERN },
{ "undelete-entry", OP_UNDELETE },
{ "untag-pattern", OP_MAIN_UNTAG_PATTERN },
{ NULL, 0 },
}

Functions for the Alias Menu.

Definition at line 60 of file functions.c.

60 { /* map: alias */
61 { "delete-entry", OP_DELETE },
62 { "exit", OP_EXIT },
63 { "limit", OP_MAIN_LIMIT },
64 { "mail", OP_MAIL },
65 { "sort-alias", OP_SORT },
66 { "sort-alias-reverse", OP_SORT_REVERSE },
67 { "tag-pattern", OP_MAIN_TAG_PATTERN },
68 { "undelete-entry", OP_UNDELETE },
69 { "untag-pattern", OP_MAIN_UNTAG_PATTERN },
70 { NULL, 0 },
71};

◆ OpQuery

const struct MenuFuncOp OpQuery[]
Initial value:
= {
{ "create-alias", OP_CREATE_ALIAS },
{ "exit", OP_EXIT },
{ "limit", OP_MAIN_LIMIT },
{ "mail", OP_MAIL },
{ "query", OP_QUERY },
{ "query-append", OP_QUERY_APPEND },
{ "sort", OP_SORT },
{ "sort-reverse", OP_SORT_REVERSE },
{ "tag-pattern", OP_MAIN_TAG_PATTERN },
{ "untag-pattern", OP_MAIN_UNTAG_PATTERN },
{ NULL, 0 },
}

Functions for the external Query Menu.

Definition at line 76 of file functions.c.

76 { /* map: query */
77 { "create-alias", OP_CREATE_ALIAS },
78 { "exit", OP_EXIT },
79 { "limit", OP_MAIN_LIMIT },
80 { "mail", OP_MAIL },
81 { "query", OP_QUERY },
82 { "query-append", OP_QUERY_APPEND },
83 { "sort", OP_SORT },
84 { "sort-reverse", OP_SORT_REVERSE },
85 { "tag-pattern", OP_MAIN_TAG_PATTERN },
86 { "untag-pattern", OP_MAIN_UNTAG_PATTERN },
87 { NULL, 0 },
88};

◆ AliasDefaultBindings

const struct MenuOpSeq AliasDefaultBindings[]
Initial value:
= {
{ OP_DELETE, "d" },
{ OP_EXIT, "q" },
{ OP_MAIL, "m" },
{ OP_MAIN_LIMIT, "l" },
{ OP_MAIN_TAG_PATTERN, "T" },
{ OP_MAIN_UNTAG_PATTERN, "\024" },
{ OP_SORT, "o" },
{ OP_SORT_REVERSE, "O" },
{ OP_TAG, "<space>" },
{ OP_UNDELETE, "u" },
{ 0, NULL },
}

Key bindings for the Alias Menu.

Definition at line 93 of file functions.c.

93 { /* map: alias */
94 { OP_DELETE, "d" },
95 { OP_EXIT, "q" },
96 { OP_MAIL, "m" },
97 { OP_MAIN_LIMIT, "l" },
98 { OP_MAIN_TAG_PATTERN, "T" },
99 { OP_MAIN_UNTAG_PATTERN, "\024" }, // <Ctrl-T>
100 { OP_SORT, "o" },
101 { OP_SORT_REVERSE, "O" },
102 { OP_TAG, "<space>" },
103 { OP_UNDELETE, "u" },
104 { 0, NULL },
105};

◆ QueryDefaultBindings

const struct MenuOpSeq QueryDefaultBindings[]
Initial value:
= {
{ OP_CREATE_ALIAS, "a" },
{ OP_EXIT, "q" },
{ OP_MAIL, "m" },
{ OP_MAIN_LIMIT, "l" },
{ OP_MAIN_TAG_PATTERN, "T" },
{ OP_MAIN_UNTAG_PATTERN, "\024" },
{ OP_QUERY, "Q" },
{ OP_QUERY_APPEND, "A" },
{ OP_SORT, "o" },
{ OP_SORT_REVERSE, "O" },
{ OP_TAG, "<space>" },
{ 0, NULL },
}

Key bindings for the external Query Menu.

Definition at line 110 of file functions.c.

110 { /* map: query */
111 { OP_CREATE_ALIAS, "a" },
112 { OP_EXIT, "q" },
113 { OP_MAIL, "m" },
114 { OP_MAIN_LIMIT, "l" },
115 { OP_MAIN_TAG_PATTERN, "T" },
116 { OP_MAIN_UNTAG_PATTERN, "\024" }, // <Ctrl-T>
117 { OP_QUERY, "Q" },
118 { OP_QUERY_APPEND, "A" },
119 { OP_SORT, "o" },
120 { OP_SORT_REVERSE, "O" },
121 { OP_TAG, "<space>" },
122 { 0, NULL },
123};

◆ AliasFunctions

const struct AliasFunction AliasFunctions[]
static
Initial value:
= {
{ OP_CREATE_ALIAS, op_create_alias },
{ OP_DELETE, op_delete },
{ OP_EXIT, op_exit },
{ OP_GENERIC_SELECT_ENTRY, op_generic_select_entry },
{ OP_MAIN_LIMIT, op_main_limit },
{ OP_MAIN_TAG_PATTERN, op_main_tag_pattern },
{ OP_MAIN_UNTAG_PATTERN, op_main_untag_pattern },
{ OP_QUERY, op_query },
{ OP_QUERY_APPEND, op_query },
{ OP_SEARCH, op_search },
{ OP_SEARCH_NEXT, op_search },
{ OP_SEARCH_OPPOSITE, op_search },
{ OP_SEARCH_REVERSE, op_search },
{ OP_SORT, op_sort },
{ OP_SORT_REVERSE, op_sort },
{ OP_UNDELETE, op_delete },
{ 0, NULL },
}
static int op_delete(struct AliasMenuData *mdata, int op)
delete the current entry - Implements alias_function_t -
Definition functions.c:169
static int op_generic_select_entry(struct AliasMenuData *mdata, int op)
select the current entry - Implements alias_function_t -
Definition functions.c:215
static int op_main_tag_pattern(struct AliasMenuData *mdata, int op)
Tag messages matching a pattern - Implements alias_function_t -.
Definition functions.c:264
static int op_main_limit(struct AliasMenuData *mdata, int op)
show only messages matching a pattern - Implements alias_function_t -
Definition functions.c:245
static int op_exit(struct AliasMenuData *mdata, int op)
exit this menu - Implements alias_function_t -
Definition functions.c:201
static int op_main_untag_pattern(struct AliasMenuData *mdata, int op)
Untag messages matching a pattern - Implements alias_function_t -.
Definition functions.c:280
static int op_query(struct AliasMenuData *mdata, int op)
query external program for addresses - Implements alias_function_t -
Definition functions.c:300
static int op_search(struct AliasMenuData *mdata, int op)
search for a regular expression - Implements alias_function_t -
Definition functions.c:353
static int op_create_alias(struct AliasMenuData *mdata, int op)
create an alias from a message sender - Implements alias_function_t -
Definition functions.c:129
static int op_sort(struct AliasMenuData *mdata, int op)
sort aliases - Implements alias_function_t -
Definition functions.c:390

All the NeoMutt functions that the Alias supports.

Definition at line 441 of file functions.c.

441 {
442 // clang-format off
443 { OP_CREATE_ALIAS, op_create_alias },
444 { OP_DELETE, op_delete },
445 { OP_EXIT, op_exit },
446 { OP_GENERIC_SELECT_ENTRY, op_generic_select_entry },
447 { OP_MAIL, op_generic_select_entry },
448 { OP_MAIN_LIMIT, op_main_limit },
449 { OP_MAIN_TAG_PATTERN, op_main_tag_pattern },
450 { OP_MAIN_UNTAG_PATTERN, op_main_untag_pattern },
451 { OP_QUERY, op_query },
452 { OP_QUERY_APPEND, op_query },
453 { OP_SEARCH, op_search },
454 { OP_SEARCH_NEXT, op_search },
455 { OP_SEARCH_OPPOSITE, op_search },
456 { OP_SEARCH_REVERSE, op_search },
457 { OP_SORT, op_sort },
458 { OP_SORT_REVERSE, op_sort },
459 { OP_UNDELETE, op_delete },
460 { 0, NULL },
461 // clang-format on
462};