NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
config.c
Go to the documentation of this file.
1
24
30
31
#include "config.h"
32
#include <stdbool.h>
33
#include <stddef.h>
34
#include "
mutt/lib.h
"
35
#include "
config/lib.h
"
36
#include "
expando/lib.h
"
37
#include "
shared_data.h
"
38
45
static
const
struct
ExpandoDefinition
ComposeFormatDef
[] = {
46
// clang-format off
47
{
"*"
,
"padding-soft"
,
ED_GLOBAL
,
ED_GLO_PADDING_SOFT
,
node_padding_parse
},
48
{
">"
,
"padding-hard"
,
ED_GLOBAL
,
ED_GLO_PADDING_HARD
,
node_padding_parse
},
49
{
"|"
,
"padding-eol"
,
ED_GLOBAL
,
ED_GLO_PADDING_EOL
,
node_padding_parse
},
50
{
"a"
,
"attach-count"
,
ED_COMPOSE
,
ED_COM_ATTACH_COUNT
, NULL },
51
{
"h"
,
"hostname"
,
ED_GLOBAL
,
ED_GLO_HOSTNAME
, NULL },
52
{
"l"
,
"attach-size"
,
ED_COMPOSE
,
ED_COM_ATTACH_SIZE
, NULL },
53
{
"v"
,
"version"
,
ED_GLOBAL
,
ED_GLO_VERSION
, NULL },
54
{ NULL, NULL, 0, -1, NULL }
55
// clang-format on
56
};
57
64
static
const
struct
ExpandoDefinition
SpellingCommandFormatDef
[] = {
65
// clang-format off
66
{
"f"
,
"file"
,
ED_COMPOSE
,
ED_COM_SPELLING_FILE
, NULL },
67
{ NULL, NULL, 0, -1, NULL }
68
// clang-format on
69
};
70
74
struct
ConfigDef
ComposeVars
[] = {
75
// clang-format off
76
{
"compose_confirm_detach_first"
,
DT_BOOL
,
true
, 0, NULL,
77
"Prevent the accidental deletion of the composed message"
78
},
79
// L10N: $compose_format default format
80
{
"compose_format"
,
DT_EXPANDO
|
D_L10N_STRING
,
IP
N_
(
"-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-"
),
IP
&
ComposeFormatDef
, NULL,
81
"printf-like format string for the Compose panel's status bar"
82
},
83
{
"compose_show_preview"
,
DT_BOOL
,
true
, 0, NULL,
84
"Display a preview of the message body in the Compose window"
85
},
86
{
"compose_show_user_headers"
,
DT_BOOL
,
true
, 0, NULL,
87
"Controls whether or not custom headers are shown in the compose envelope"
88
},
89
{
"compose_preview_min_rows"
,
DT_NUMBER
|
D_INTEGER_NOT_NEGATIVE
, 5, 0, NULL,
90
"Hide the preview if it has fewer than this number of rows"
91
},
92
{
"compose_preview_above_attachments"
,
DT_BOOL
,
false
, 0, NULL,
93
"Show the message preview above the attachments list. By default it is shown below it."
94
},
95
{
"copy"
,
DT_QUAD
,
MUTT_YES
, 0, NULL,
96
"Save outgoing emails to $record"
97
},
98
{
"edit_headers"
,
DT_BOOL
,
false
, 0, NULL,
99
"Let the user edit the email headers whilst editing an email"
100
},
101
{
"spelling_command"
,
DT_EXPANDO
|
D_STRING_COMMAND
,
IP
"ispell -x %f"
,
IP
&
SpellingCommandFormatDef
, NULL,
102
"External command to perform spell-checking"
103
},
104
{
"postpone"
,
DT_QUAD
,
MUTT_ASKYES
, 0, NULL,
105
"Save messages to the `$postponed` folder"
106
},
107
108
{
"edit_hdrs"
,
DT_SYNONYM
,
IP
"edit_headers"
,
IP
"2021-03-21"
},
109
{
"ispell"
,
DT_SYNONYM
,
IP
"spelling_command"
,
IP
"2026-07-14"
},
110
{ NULL },
111
// clang-format on
112
};
ComposeVars
struct ConfigDef ComposeVars[]
Config definitions for compose.
Definition
config.c:74
ComposeFormatDef
static const struct ExpandoDefinition ComposeFormatDef[]
Expando definitions.
Definition
config.c:45
SpellingCommandFormatDef
static const struct ExpandoDefinition SpellingCommandFormatDef[]
Expando definitions.
Definition
config.c:64
shared_data.h
Compose Shared Data.
ED_COM_SPELLING_FILE
@ ED_COM_SPELLING_FILE
Spelling command's filename.
Definition
shared_data.h:59
ED_COM_ATTACH_COUNT
@ ED_COM_ATTACH_COUNT
ComposeAttachData, num_attachments().
Definition
shared_data.h:57
ED_COM_ATTACH_SIZE
@ ED_COM_ATTACH_SIZE
ComposeAttachData, cum_attachs_size().
Definition
shared_data.h:58
lib.h
Convenience wrapper for the config headers.
IP
#define IP
Definition
set.h:55
ED_COMPOSE
@ ED_COMPOSE
Compose ED_COM_ ExpandoDataCompose.
Definition
domain.h:39
ED_GLOBAL
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition
domain.h:44
lib.h
Parse Expando string.
node_padding_parse
struct ExpandoNode * node_padding_parse(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Padding Expando - Implements ExpandoDefinition::parse() -.
Definition
node_padding.c:234
lib.h
Convenience wrapper for the library headers.
N_
#define N_(a)
Definition
message.h:32
MUTT_ASKYES
@ MUTT_ASKYES
Ask the user, defaulting to 'Yes'.
Definition
quad.h:41
MUTT_YES
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
Definition
quad.h:39
ConfigDef
Definition
set.h:65
ExpandoDefinition
Definition of a format string.
Definition
definition.h:49
D_STRING_COMMAND
#define D_STRING_COMMAND
A command.
Definition
types.h:99
D_L10N_STRING
#define D_L10N_STRING
String can be localised.
Definition
types.h:82
DT_NUMBER
@ DT_NUMBER
a number
Definition
types.h:38
DT_BOOL
@ DT_BOOL
boolean option
Definition
types.h:32
DT_QUAD
@ DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
Definition
types.h:40
DT_SYNONYM
@ DT_SYNONYM
synonym for another variable
Definition
types.h:45
DT_EXPANDO
@ DT_EXPANDO
an expando
Definition
types.h:34
D_INTEGER_NOT_NEGATIVE
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition
types.h:101
ED_GLO_PADDING_EOL
@ ED_GLO_PADDING_EOL
Padding to end-of-line.
Definition
uid.h:38
ED_GLO_VERSION
@ ED_GLO_VERSION
NeoMutt version.
Definition
uid.h:42
ED_GLO_PADDING_HARD
@ ED_GLO_PADDING_HARD
Hard Padding.
Definition
uid.h:39
ED_GLO_PADDING_SOFT
@ ED_GLO_PADDING_SOFT
Soft Padding.
Definition
uid.h:40
ED_GLO_HOSTNAME
@ ED_GLO_HOSTNAME
Local hostname.
Definition
uid.h:37