68 struct ReplaceList *list,
struct Buffer *err)
73 buf_printf(err,
_(
"%s: too few arguments"),
"unsubjectrx");
94 struct ReplaceList *list,
struct Buffer *err)
102 buf_printf(err,
_(
"%s: too few arguments"),
"subjectrx");
110 buf_printf(err,
_(
"%s: too few arguments"),
"subjectrx");
172 intptr_t data,
struct Buffer *err)
189 intptr_t data,
struct Buffer *err)
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
CommandResult
Error codes for command_t parse functions.
@ MUTT_CMD_SUCCESS
Success: Command worked.
@ MUTT_CMD_ERROR
Error: Can't help the user.
@ MUTT_CMD_WARNING
Warning: Help given to the user.
Convenience wrapper for the core headers.
Structs that make up an email.
enum CommandResult parse_unsubjectrx_list(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unsubjectrx' command - Implements Command::parse() -.
enum CommandResult parse_subjectrx_list(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'subjectrx' command - Implements Command::parse() -.
static enum CommandResult parse_replace_list(struct Buffer *buf, struct Buffer *s, struct ReplaceList *list, struct Buffer *err)
Parse a string replacement rule - Implements Command::parse() -.
static enum CommandResult parse_unreplace_list(struct Buffer *buf, struct Buffer *s, struct ReplaceList *list, struct Buffer *err)
Remove a string replacement rule - Implements Command::parse() -.
#define mutt_debug(LEVEL,...)
@ LL_NOTIFY
Log of notifications.
Convenience wrapper for the library headers.
struct Notify * notify_new(void)
Create a new notifications handler.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
void notify_set_parent(struct Notify *notify, struct Notify *parent)
Set the parent notification handler.
void notify_free(struct Notify **ptr)
Free a notification handler.
int mutt_replacelist_remove(struct ReplaceList *rl, const char *pat)
Remove a pattern from a list.
void mutt_replacelist_free(struct ReplaceList *rl)
Free a ReplaceList object.
char * mutt_replacelist_apply(struct ReplaceList *rl, const char *str)
Apply replacements to a buffer.
int mutt_replacelist_add(struct ReplaceList *rl, const char *pat, const char *templ, struct Buffer *err)
Add a pattern and a template to a list.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
@ NT_SUBJRX
Subject Regex has changed, NotifySubjRx.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_EMPTY(head)
String manipulation buffer.
char * data
Pointer to data.
The envelope/body of an email.
struct Envelope * env
Envelope information.
char *const subject
Email's subject.
char * disp_subj
Display subject (modified copy of subject)
struct Mailbox * mailbox
Current Mailbox.
int msg_count
Total number of messages.
struct Email ** emails
Array of Emails.
Container for Accounts, Notifications.
struct Notify * notify
Notifications handler.
void subjrx_init(void)
Create new Subject Regex List.
void subjrx_clear_mods(struct MailboxView *mv)
Clear out all modified email subjects.
static struct Notify * SubjRxNotify
Notifications: NotifySubjRx.
void subjrx_cleanup(void)
Free the Subject Regex List.
bool subjrx_apply_mods(struct Envelope *env)
Apply regex modifications to the subject.
static struct ReplaceList SubjectRegexList
List of subjectrx rules for modifying the Subject:
@ NT_SUBJRX_DELETE
Subject Regex has been deleted.
@ NT_SUBJRX_ADD
Subject Regex has been added.