NeoMutt  2021-02-05-89-gabe350
Teaching an old dog new tricks
DOXYGEN
commands.h File Reference
#include <stdbool.h>
#include <stdio.h>
#include "mutt_menu.h"
+ Include dependency graph for commands.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  MessageTransformOpt { TRANSFORM_NONE = 0, TRANSFORM_DECRYPT, TRANSFORM_DECODE }
 Message transformation option. More...
 
enum  MessageSaveOpt { SAVE_COPY = 0, SAVE_MOVE }
 Message save option. More...
 

Functions

void ci_bounce_message (struct Mailbox *m, struct EmailList *el)
 Bounce an email. More...
 
void mutt_check_stats (struct Mailbox *m)
 Forcibly update mailbox stats. More...
 
bool mutt_check_traditional_pgp (struct Mailbox *m, struct EmailList *el, MuttRedrawFlags *redraw)
 Check if a message has inline PGP content. More...
 
void mutt_commands_cleanup (void)
 Clean up commands globals. More...
 
void mutt_display_address (struct Envelope *env)
 Display the address of a message. More...
 
int mutt_display_message (struct MuttWindow *win_index, struct MuttWindow *win_ibar, struct MuttWindow *win_pager, struct MuttWindow *win_pbar, struct Mailbox *m, struct Email *e)
 Display a message in the pager. More...
 
bool mutt_edit_content_type (struct Email *e, struct Body *b, FILE *fp)
 Edit the content type of an attachment. More...
 
void mutt_enter_command (void)
 enter a neomutt command More...
 
void mutt_pipe_message (struct Mailbox *m, struct EmailList *el)
 Pipe a message. More...
 
void mutt_print_message (struct Mailbox *m, struct EmailList *el)
 Print a message. More...
 
int mutt_save_message (struct Mailbox *m, struct EmailList *el, enum MessageSaveOpt, enum MessageTransformOpt transform_opt)
 Save an email. More...
 
int mutt_save_message_ctx (struct Email *e, enum MessageSaveOpt, enum MessageTransformOpt transform_opt, struct Mailbox *m)
 Save a message to a given mailbox. More...
 
int mutt_select_sort (bool reverse)
 Ask the user for a sort method. More...
 
bool mutt_shell_escape (void)
 invoke a command in a subshell More...
 

Variables

char * C_DisplayFilter
 Config: External command to pre-process an email before display. More...
 
bool C_PipeDecode
 Config: Decode the message when piping it. More...
 
char * C_PipeSep
 Config: Separator to add between multiple piped messages. More...
 
bool C_PipeSplit
 Config: Run the pipe command on each message separately. More...
 
bool C_PrintDecode
 Config: Decode message before printing it. More...
 
bool C_PrintSplit
 Config: Print multiple messages separately. More...
 
bool C_PromptAfter
 Config: Pause after running an external pager. More...
 

Detailed Description

Manage where the email is piped to external commands

Authors
  • Richard Russon

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 commands.h.

Enumeration Type Documentation

◆ MessageTransformOpt

Message transformation option.

Enumerator
TRANSFORM_NONE 

No transformation.

TRANSFORM_DECRYPT 

Decrypt message.

TRANSFORM_DECODE 

Decode message.

Definition at line 49 of file commands.h.

50 {
51  TRANSFORM_NONE = 0,
54 };

◆ MessageSaveOpt

Message save option.

Enumerator
SAVE_COPY 

Copy message, making a duplicate in another mailbox.

SAVE_MOVE 

Move message to another mailbox, removing the original.

Definition at line 59 of file commands.h.

60 {
61  SAVE_COPY = 0,
62  SAVE_MOVE,
63 };

Function Documentation

◆ ci_bounce_message()

void ci_bounce_message ( struct Mailbox m,
struct EmailList *  el 
)

Bounce an email.

Parameters
mMailbox
elList of Emails to bounce

Definition at line 411 of file commands.c.

412 {
413  if (!m || !el || STAILQ_EMPTY(el))
414  return;
415 
416  char prompt[8193];
417  char scratch[8192];
418  char buf[8192] = { 0 };
419  struct AddressList al = TAILQ_HEAD_INITIALIZER(al);
420  char *err = NULL;
421  int rc;
422  int msg_count = 0;
423 
424  struct EmailNode *en = NULL;
425  STAILQ_FOREACH(en, el, entries)
426  {
427  /* RFC5322 mandates a From: header,
428  * so warn before bouncing messages without one */
429  if (TAILQ_EMPTY(&en->email->env->from))
430  mutt_error(_("Warning: message contains no From: header"));
431 
432  msg_count++;
433  }
434 
435  if (msg_count == 1)
436  mutt_str_copy(prompt, _("Bounce message to: "), sizeof(prompt));
437  else
438  mutt_str_copy(prompt, _("Bounce tagged messages to: "), sizeof(prompt));
439 
440  rc = mutt_get_field(prompt, buf, sizeof(buf), MUTT_ALIAS, false, NULL, NULL);
441  if (rc || (buf[0] == '\0'))
442  return;
443 
444  mutt_addrlist_parse2(&al, buf);
445  if (TAILQ_EMPTY(&al))
446  {
447  mutt_error(_("Error parsing address"));
448  return;
449  }
450 
451  mutt_expand_aliases(&al);
452 
453  if (mutt_addrlist_to_intl(&al, &err) < 0)
454  {
455  mutt_error(_("Bad IDN: '%s'"), err);
456  FREE(&err);
457  mutt_addrlist_clear(&al);
458  return;
459  }
460 
461  buf[0] = '\0';
462  mutt_addrlist_write(&al, buf, sizeof(buf), true);
463 
464 #define EXTRA_SPACE (15 + 7 + 2)
465  snprintf(scratch, sizeof(scratch),
466  ngettext("Bounce message to %s?", "Bounce messages to %s?", msg_count), buf);
467 
468  if (mutt_strwidth(scratch) > (MessageWindow->state.cols - EXTRA_SPACE))
469  {
470  mutt_simple_format(prompt, sizeof(prompt), 0, MessageWindow->state.cols - EXTRA_SPACE,
471  JUSTIFY_LEFT, 0, scratch, sizeof(scratch), false);
472  mutt_str_cat(prompt, sizeof(prompt), "...?");
473  }
474  else
475  mutt_str_copy(prompt, scratch, sizeof(prompt));
476 
477  if (query_quadoption(C_Bounce, prompt) != MUTT_YES)
478  {
479  mutt_addrlist_clear(&al);
481  mutt_message(ngettext("Message not bounced", "Messages not bounced", msg_count));
482  return;
483  }
484 
486 
487  struct Message *msg = NULL;
488  STAILQ_FOREACH(en, el, entries)
489  {
490  msg = mx_msg_open(m, en->email->msgno);
491  if (!msg)
492  {
493  rc = -1;
494  break;
495  }
496 
497  rc = mutt_bounce_message(msg->fp, m, en->email, &al, NeoMutt->sub);
498  mx_msg_close(m, &msg);
499 
500  if (rc < 0)
501  break;
502  }
503 
504  mutt_addrlist_clear(&al);
505  /* If no error, or background, display message. */
506  if ((rc == 0) || (rc == S_BKG))
507  mutt_message(ngettext("Message bounced", "Messages bounced", msg_count));
508 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_check_stats()

void mutt_check_stats ( struct Mailbox m)

Forcibly update mailbox stats.

Definition at line 1483 of file commands.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_check_traditional_pgp()

bool mutt_check_traditional_pgp ( struct Mailbox m,
struct EmailList *  el,
MuttRedrawFlags redraw 
)

Check if a message has inline PGP content.

Parameters
[in]mMailbox
[in]elList of Emails to check
[out]redrawFlags if the screen needs redrawing, see MuttRedrawFlags
Return values
trueIf message contains inline PGP content

Definition at line 1467 of file commands.c.

1468 {
1469  bool rc = false;
1470  struct EmailNode *en = NULL;
1471  STAILQ_FOREACH(en, el, entries)
1472  {
1473  if (!(en->email->security & PGP_TRADITIONAL_CHECKED))
1474  rc = check_traditional_pgp(m, en->email, redraw) || rc;
1475  }
1476 
1477  return rc;
1478 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_commands_cleanup()

void mutt_commands_cleanup ( void  )

Clean up commands globals.

Definition at line 101 of file commands.c.

102 {
104 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_display_address()

void mutt_display_address ( struct Envelope env)

Display the address of a message.

Parameters
envEnvelope containing address

Definition at line 927 of file commands.c.

928 {
929  const char *pfx = NULL;
930  char buf[128];
931 
932  struct AddressList *al = mutt_get_address(env, &pfx);
933  if (!al)
934  return;
935 
936  /* Note: We don't convert IDNA to local representation this time.
937  * That is intentional, so the user has an opportunity to copy &
938  * paste the on-the-wire form of the address to other, IDN-unable
939  * software. */
940  buf[0] = '\0';
941  mutt_addrlist_write(al, buf, sizeof(buf), false);
942  mutt_message("%s: %s", pfx, buf);
943 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_display_message()

int mutt_display_message ( struct MuttWindow win_index,
struct MuttWindow win_ibar,
struct MuttWindow win_pager,
struct MuttWindow win_pbar,
struct Mailbox m,
struct Email e 
)

Display a message in the pager.

Parameters
win_indexIndex Window
win_ibarIndex Bar Window
win_pagerPager Window
win_pbarPager Bar Window
mMailbox
eEmail to display
Return values
0Success
-1Error

Definition at line 206 of file commands.c.

209 {
210  int rc = 0;
211  bool builtin = false;
213  CopyHeaderFlags chflags;
214  pid_t filterpid = -1;
215  struct Buffer *tempfile = NULL;
216  int res;
217 
220 
221  char columns[16];
222  // win_pager might not be visible and have a size yet, so use win_index
223  snprintf(columns, sizeof(columns), "%d", win_index->state.cols);
224  mutt_envlist_set("COLUMNS", columns, true);
225 
226  /* see if crypto is needed for this message. if so, we should exit curses */
227  if ((WithCrypto != 0) && e->security)
228  {
229  if (e->security & SEC_ENCRYPT)
230  {
231  if (e->security & APPLICATION_SMIME)
234  goto cleanup;
235 
236  cmflags |= MUTT_CM_VERIFY;
237  }
238  else if (e->security & SEC_SIGN)
239  {
240  /* find out whether or not the verify signature */
241  /* L10N: Used for the $crypt_verify_sig prompt */
242  if (query_quadoption(C_CryptVerifySig, _("Verify signature?")) == MUTT_YES)
243  {
244  cmflags |= MUTT_CM_VERIFY;
245  }
246  }
247  }
248 
249  if (cmflags & MUTT_CM_VERIFY || e->security & SEC_ENCRYPT)
250  {
251  if (e->security & APPLICATION_PGP)
252  {
253  if (!TAILQ_EMPTY(&e->env->from))
255 
257  }
258 
259  if (e->security & APPLICATION_SMIME)
261  }
262 
263  FILE *fp_filter_out = NULL;
264  tempfile = mutt_buffer_pool_get();
265  mutt_buffer_mktemp(tempfile);
266  FILE *fp_out = mutt_file_fopen(mutt_buffer_string(tempfile), "w");
267  if (!fp_out)
268  {
269  mutt_error(_("Could not create temporary file"));
270  goto cleanup;
271  }
272 
273  if (C_DisplayFilter)
274  {
275  fp_filter_out = fp_out;
276  fp_out = NULL;
277  filterpid = filter_create_fd(C_DisplayFilter, &fp_out, NULL, NULL, -1,
278  fileno(fp_filter_out), -1);
279  if (filterpid < 0)
280  {
281  mutt_error(_("Can't create display filter"));
282  mutt_file_fclose(&fp_filter_out);
283  unlink(mutt_buffer_string(tempfile));
284  goto cleanup;
285  }
286  }
287 
288  if (!C_Pager || mutt_str_equal(C_Pager, "builtin"))
289  builtin = true;
290  else
291  {
292  char buf[1024] = { 0 };
293  mutt_make_string(buf, sizeof(buf), win_index->state.cols, NONULL(C_PagerFormat),
294  m, Context ? Context->msg_in_pager : -1, e,
296  fputs(buf, fp_out);
297  fputs("\n\n", fp_out);
298  }
299 
300  chflags = (C_Weed ? (CH_WEED | CH_REORDER) : CH_NO_FLAGS) | CH_DECODE | CH_FROM | CH_DISPLAY;
301 #ifdef USE_NOTMUCH
302  if (m->type == MUTT_NOTMUCH)
303  chflags |= CH_VIRTUAL;
304 #endif
305  res = mutt_copy_message(fp_out, m, e, cmflags, chflags, win_index->state.cols);
306 
307  if (((mutt_file_fclose(&fp_out) != 0) && (errno != EPIPE)) || (res < 0))
308  {
309  mutt_error(_("Could not copy message"));
310  if (fp_filter_out)
311  {
312  filter_wait(filterpid);
313  mutt_file_fclose(&fp_filter_out);
314  }
316  goto cleanup;
317  }
318 
319  if (fp_filter_out && (filter_wait(filterpid) != 0))
321 
322  mutt_file_fclose(&fp_filter_out); /* XXX - check result? */
323 
324  if (WithCrypto)
325  {
326  /* update crypto information for this message */
327  e->security &= ~(SEC_GOODSIGN | SEC_BADSIGN);
328  e->security |= crypt_query(e->body);
329 
330  /* Remove color cache for this message, in case there
331  * are color patterns for both ~g and ~V */
332  e->pair = 0;
333 
334  /* Process protected headers and autocrypt gossip headers */
336  }
337 
338  if (builtin)
339  {
340  if ((WithCrypto != 0) && (e->security & APPLICATION_SMIME) && (cmflags & MUTT_CM_VERIFY))
341  {
342  if (e->security & SEC_GOODSIGN)
343  {
344  if (crypt_smime_verify_sender(m, e) == 0)
345  mutt_message(_("S/MIME signature successfully verified"));
346  else
347  mutt_error(_("S/MIME certificate owner does not match sender"));
348  }
349  else if (e->security & SEC_PARTSIGN)
350  mutt_message(_("Warning: Part of this message has not been signed"));
351  else if (e->security & SEC_SIGN || e->security & SEC_BADSIGN)
352  mutt_error(_("S/MIME signature could NOT be verified"));
353  }
354 
355  if ((WithCrypto != 0) && (e->security & APPLICATION_PGP) && (cmflags & MUTT_CM_VERIFY))
356  {
357  if (e->security & SEC_GOODSIGN)
358  mutt_message(_("PGP signature successfully verified"));
359  else if (e->security & SEC_PARTSIGN)
360  mutt_message(_("Warning: Part of this message has not been signed"));
361  else if (e->security & SEC_SIGN)
362  mutt_message(_("PGP signature could NOT be verified"));
363  }
364 
365  struct Pager info = { 0 };
366  /* Invoke the builtin pager */
367  info.email = e;
368  info.ctx = Context;
369  info.win_ibar = win_ibar;
370  info.win_index = win_index;
371  info.win_pbar = win_pbar;
372  info.win_pager = win_pager;
373  rc = mutt_pager(NULL, mutt_buffer_string(tempfile), MUTT_PAGER_MESSAGE, &info);
374  }
375  else
376  {
377  mutt_endwin();
378 
379  struct Buffer *cmd = mutt_buffer_pool_get();
380  mutt_buffer_printf(cmd, "%s %s", NONULL(C_Pager), mutt_buffer_string(tempfile));
381  int r = mutt_system(mutt_buffer_string(cmd));
382  if (r == -1)
383  mutt_error(_("Error running \"%s\""), mutt_buffer_string(cmd));
384  unlink(mutt_buffer_string(tempfile));
386 
387  if (!OptNoCurses)
388  keypad(stdscr, true);
389  if (r != -1)
390  mutt_set_flag(m, e, MUTT_READ, true);
391  if ((r != -1) && C_PromptAfter)
392  {
393  mutt_unget_event(mutt_any_key_to_continue(_("Command: ")), 0);
394  rc = km_dokey(MENU_PAGER);
395  }
396  else
397  rc = 0;
398  }
399 
400 cleanup:
401  mutt_envlist_unset("COLUMNS");
402  mutt_buffer_pool_release(&tempfile);
403  return rc;
404 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_edit_content_type()

bool mutt_edit_content_type ( struct Email e,
struct Body b,
FILE *  fp 
)

Edit the content type of an attachment.

Parameters
eEmail
bAttachment
fpFile handle to the attachment
Return values
booltrue if a structural change is made

recvattach requires the return code to know when to regenerate the actx.

Definition at line 1324 of file commands.c.

1325 {
1326  char buf[1024];
1327  char obuf[1024];
1328  char tmp[256];
1329  char charset[256];
1330 
1331  bool charset_changed = false;
1332  bool type_changed = false;
1333  bool structure_changed = false;
1334 
1335  char *cp = mutt_param_get(&b->parameter, "charset");
1336  mutt_str_copy(charset, cp, sizeof(charset));
1337 
1338  snprintf(buf, sizeof(buf), "%s/%s", TYPE(b), b->subtype);
1339  mutt_str_copy(obuf, buf, sizeof(obuf));
1340  if (!TAILQ_EMPTY(&b->parameter))
1341  {
1342  size_t l = strlen(buf);
1343  struct Parameter *np = NULL;
1344  TAILQ_FOREACH(np, &b->parameter, entries)
1345  {
1346  mutt_addr_cat(tmp, sizeof(tmp), np->value, MimeSpecials);
1347  l += snprintf(buf + l, sizeof(buf) - l, "; %s=%s", np->attribute, tmp);
1348  if (l >= sizeof(buf))
1349  {
1350  // L10N: e.g. "text/plain; charset=UTF-8; ..."
1351  mutt_error(_("Content type is too long"));
1352  return false;
1353  }
1354  }
1355  }
1356 
1357  if ((mutt_get_field("Content-Type: ", buf, sizeof(buf), MUTT_COMP_NO_FLAGS,
1358  false, NULL, NULL) != 0) ||
1359  (buf[0] == '\0'))
1360  {
1361  return false;
1362  }
1363 
1364  /* clean up previous junk */
1366  FREE(&b->subtype);
1367 
1368  mutt_parse_content_type(buf, b);
1369 
1370  snprintf(tmp, sizeof(tmp), "%s/%s", TYPE(b), NONULL(b->subtype));
1371  type_changed = !mutt_istr_equal(tmp, obuf);
1372  charset_changed =
1373  !mutt_istr_equal(charset, mutt_param_get(&b->parameter, "charset"));
1374 
1375  /* if in send mode, check for conversion - current setting is default. */
1376 
1377  if (!e && (b->type == TYPE_TEXT) && charset_changed)
1378  {
1379  snprintf(tmp, sizeof(tmp), _("Convert to %s upon sending?"),
1380  mutt_param_get(&b->parameter, "charset"));
1381  enum QuadOption ans = mutt_yesorno(tmp, b->noconv ? MUTT_NO : MUTT_YES);
1382  if (ans != MUTT_ABORT)
1383  b->noconv = (ans == MUTT_NO);
1384  }
1385 
1386  /* inform the user */
1387 
1388  snprintf(tmp, sizeof(tmp), "%s/%s", TYPE(b), NONULL(b->subtype));
1389  if (type_changed)
1390  mutt_message(_("Content-Type changed to %s"), tmp);
1391  if ((b->type == TYPE_TEXT) && charset_changed)
1392  {
1393  if (type_changed)
1394  mutt_sleep(1);
1395  mutt_message(b->noconv ? _("Character set changed to %s; not converting") :
1396  _("Character set changed to %s; converting"),
1397  mutt_param_get(&b->parameter, "charset"));
1398  }
1399 
1400  b->force_charset |= charset_changed;
1401 
1402  if (!is_multipart(b) && b->parts)
1403  {
1404  structure_changed = true;
1405  mutt_body_free(&b->parts);
1406  }
1407  if (!mutt_is_message_type(b->type, b->subtype) && b->email)
1408  {
1409  structure_changed = true;
1410  b->email->body = NULL;
1411  email_free(&b->email);
1412  }
1413 
1414  if (fp && !b->parts && (is_multipart(b) || mutt_is_message_type(b->type, b->subtype)))
1415  {
1416  structure_changed = true;
1417  mutt_parse_part(fp, b);
1418  }
1419 
1420  if ((WithCrypto != 0) && e)
1421  {
1422  if (e->body == b)
1423  e->security = SEC_NO_FLAGS;
1424 
1425  e->security |= crypt_query(b);
1426  }
1427 
1428  return structure_changed;
1429 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_enter_command()

void mutt_enter_command ( void  )

enter a neomutt command

Definition at line 878 of file commands.c.

879 {
880  char buf[1024] = { 0 };
881 
883  window_redraw(RootWindow, true);
884  /* if enter is pressed after : with no command, just return */
885  if ((mutt_get_field(":", buf, sizeof(buf), MUTT_COMMAND, false, NULL, NULL) != 0) ||
886  (buf[0] == '\0'))
887  {
888  return;
889  }
890 
891  struct Buffer err = mutt_buffer_make(256);
892 
893  /* check if buf is a valid icommand, else fall back quietly to parse_rc_lines */
894  enum CommandResult rc = mutt_parse_icommand(buf, &err);
895  if (!mutt_buffer_is_empty(&err))
896  {
897  /* since errbuf could potentially contain printf() sequences in it,
898  * we must call mutt_error() in this fashion so that vsprintf()
899  * doesn't expect more arguments that we passed */
900  if (rc == MUTT_CMD_ERROR)
901  mutt_error("%s", err.data);
902  else
903  mutt_warning("%s", err.data);
904  }
905  else if (rc != MUTT_CMD_SUCCESS)
906  {
907  rc = mutt_parse_rc_line(buf, &err);
908  if (!mutt_buffer_is_empty(&err))
909  {
910  if (rc == MUTT_CMD_SUCCESS) /* command succeeded with message */
911  mutt_message("%s", err.data);
912  else if (rc == MUTT_CMD_ERROR)
913  mutt_error("%s", err.data);
914  else if (rc == MUTT_CMD_WARNING)
915  mutt_warning("%s", err.data);
916  }
917  }
918  /* else successful command */
919 
920  mutt_buffer_dealloc(&err);
921 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_pipe_message()

void mutt_pipe_message ( struct Mailbox m,
struct EmailList *  el 
)

Pipe a message.

Parameters
mMailbox
elList of Emails to pipe

Definition at line 702 of file commands.c.

703 {
704  if (!m || !el)
705  return;
706 
707  struct Buffer *buf = mutt_buffer_pool_get();
708 
709  if (mutt_buffer_get_field(_("Pipe to command: "), buf, MUTT_CMD, false, NULL,
710  NULL, NULL) != 0)
711  {
712  goto cleanup;
713  }
714 
715  if (mutt_buffer_len(buf) == 0)
716  goto cleanup;
717 
720 
721 cleanup:
723 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_print_message()

void mutt_print_message ( struct Mailbox m,
struct EmailList *  el 
)

Print a message.

Parameters
mMailbox
elList of Emails to print

Definition at line 730 of file commands.c.

731 {
732  if (!m || !el)
733  return;
734 
735  if (C_Print && !C_PrintCommand)
736  {
737  mutt_message(_("No printing command has been defined"));
738  return;
739  }
740 
741  int msg_count = 0;
742  struct EmailNode *en = NULL;
743  STAILQ_FOREACH(en, el, entries)
744  {
745  msg_count++;
746  }
747 
748  if (query_quadoption(C_Print, (msg_count == 1) ?
749  _("Print message?") :
750  _("Print tagged messages?")) != MUTT_YES)
751  {
752  return;
753  }
754 
755  if (pipe_message(m, el, C_PrintCommand, C_PrintDecode, true, C_PrintSplit, "\f") == 0)
756  mutt_message(ngettext("Message printed", "Messages printed", msg_count));
757  else
758  {
759  mutt_message(ngettext("Message could not be printed",
760  "Messages could not be printed", msg_count));
761  }
762 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_save_message()

int mutt_save_message ( struct Mailbox m,
struct EmailList *  el,
enum MessageSaveOpt  save_opt,
enum MessageTransformOpt  transform_opt 
)

Save an email.

Parameters
mMailbox
elList of Emails to save
save_optCopy or move, e.g. SAVE_MOVE
transform_optTransformation, e.g. TRANSFORM_DECRYPT
Return values
0Copy/save was successful
-1Error/abort

Definition at line 1037 of file commands.c.

1039 {
1040  if (!el || STAILQ_EMPTY(el))
1041  return -1;
1042 
1043  int rc = -1;
1044  int tagged_progress_count = 0;
1045  unsigned int msg_count = 0;
1046 
1047  struct Buffer *buf = mutt_buffer_pool_get();
1048  struct Progress progress;
1049  struct stat st;
1050  struct EmailNode *en = NULL;
1051 
1052  STAILQ_FOREACH(en, el, entries)
1053  {
1054  msg_count++;
1055  }
1056  en = STAILQ_FIRST(el);
1057 
1058  const SecurityFlags security_flags = WithCrypto ? en->email->security : SEC_NO_FLAGS;
1059  const bool is_passphrase_needed = security_flags & SEC_ENCRYPT;
1060 
1061  const char *prompt = NULL;
1062  const char *progress_msg = NULL;
1063 
1064  // Set prompt and progress_msg
1065  switch (save_opt)
1066  {
1067  case SAVE_COPY:
1068  // L10N: Progress meter message when copying tagged messages
1069  progress_msg = (msg_count > 1) ? _("Copying tagged messages...") : NULL;
1070  switch (transform_opt)
1071  {
1072  case TRANSFORM_NONE:
1073  prompt = (msg_count > 1) ? _("Copy tagged to mailbox") : _("Copy to mailbox");
1074  break;
1075  case TRANSFORM_DECRYPT:
1076  prompt = (msg_count > 1) ? _("Decrypt-copy tagged to mailbox") :
1077  _("Decrypt-copy to mailbox");
1078  break;
1079  case TRANSFORM_DECODE:
1080  prompt = (msg_count > 1) ? _("Decode-copy tagged to mailbox") :
1081  _("Decode-copy to mailbox");
1082  break;
1083  }
1084  break;
1085 
1086  case SAVE_MOVE:
1087  // L10N: Progress meter message when saving tagged messages
1088  progress_msg = (msg_count > 1) ? _("Saving tagged messages...") : NULL;
1089  switch (transform_opt)
1090  {
1091  case TRANSFORM_NONE:
1092  prompt = (msg_count > 1) ? _("Save tagged to mailbox") : _("Save to mailbox");
1093  break;
1094  case TRANSFORM_DECRYPT:
1095  prompt = (msg_count > 1) ? _("Decrypt-save tagged to mailbox") :
1096  _("Decrypt-save to mailbox");
1097  break;
1098  case TRANSFORM_DECODE:
1099  prompt = (msg_count > 1) ? _("Decode-save tagged to mailbox") :
1100  _("Decode-save to mailbox");
1101  break;
1102  }
1103  break;
1104  }
1105 
1107  mutt_default_save(buf->data, buf->dsize, en->email);
1108  mutt_buffer_fix_dptr(buf);
1110 
1111  if (mutt_buffer_enter_fname(prompt, buf, false, NULL, false, NULL, NULL,
1112  MUTT_SEL_NO_FLAGS) == -1)
1113  goto cleanup;
1114 
1115  size_t pathlen = mutt_buffer_len(buf);
1116  if (pathlen == 0)
1117  goto cleanup;
1118 
1119  /* Trim any trailing '/' */
1120  if (buf->data[pathlen - 1] == '/')
1121  buf->data[pathlen - 1] = '\0';
1122 
1123  /* This is an undocumented feature of ELM pointed out to me by Felix von
1124  * Leitner <leitner@prz.fu-berlin.de> */
1125  if (mutt_buffer_len(&LastSaveFolder) == 0)
1127  if (mutt_str_equal(mutt_buffer_string(buf), "."))
1129  else
1131 
1133 
1134  /* check to make sure that this file is really the one the user wants */
1135  if (mutt_save_confirm(mutt_buffer_string(buf), &st) != 0)
1136  goto cleanup;
1137 
1138  if (is_passphrase_needed && (transform_opt != TRANSFORM_NONE) &&
1139  !crypt_valid_passphrase(security_flags))
1140  {
1141  rc = -1;
1142  goto errcleanup;
1143  }
1144 
1145  mutt_message(_("Copying to %s..."), mutt_buffer_string(buf));
1146 
1147 #ifdef USE_IMAP
1148  enum MailboxType mailbox_type = imap_path_probe(mutt_buffer_string(buf), NULL);
1149  if ((m->type == MUTT_IMAP) && (transform_opt == TRANSFORM_NONE) && (mailbox_type == MUTT_IMAP))
1150  {
1151  rc = imap_copy_messages(m, el, mutt_buffer_string(buf), save_opt);
1152  switch (rc)
1153  {
1154  /* success */
1155  case 0:
1156  mutt_clear_error();
1157  rc = 0;
1158  goto cleanup;
1159  /* non-fatal error: continue to fetch/append */
1160  case 1:
1161  break;
1162  /* fatal error, abort */
1163  case -1:
1164  goto errcleanup;
1165  }
1166  }
1167 #endif
1168 
1170  struct Mailbox *m_save = mx_path_resolve(mutt_buffer_string(buf));
1171  bool old_append = m_save->append;
1172  OpenMailboxFlags mbox_flags = MUTT_NEWFOLDER;
1173  /* Display a tagged message progress counter, rather than (for
1174  * IMAP) a per-message progress counter */
1175  if (msg_count > 1)
1176  mbox_flags |= MUTT_QUIET;
1177  struct Context *ctx_save = mx_mbox_open(m_save, mbox_flags);
1178  if (!ctx_save)
1179  {
1180  rc = -1;
1181  mailbox_free(&m_save);
1182  goto errcleanup;
1183  }
1184  m_save->append = true;
1185 
1186 #ifdef USE_COMP_MBOX
1187  /* If we're saving to a compressed mailbox, the stats won't be updated
1188  * until the next open. Until then, improvise. */
1189  struct Mailbox *m_comp = NULL;
1190  if (ctx_save->mailbox->compress_info)
1191  {
1192  m_comp = mailbox_find(ctx_save->mailbox->realpath);
1193  }
1194  /* We probably haven't been opened yet */
1195  if (m_comp && (m_comp->msg_count == 0))
1196  m_comp = NULL;
1197 #endif
1198  if (msg_count == 1)
1199  {
1200  rc = mutt_save_message_ctx(en->email, save_opt, transform_opt, ctx_save->mailbox);
1201  if (rc != 0)
1202  {
1203  mx_mbox_close(&ctx_save);
1204  m_save->append = old_append;
1205  goto errcleanup;
1206  }
1207 #ifdef USE_COMP_MBOX
1208  if (m_comp)
1209  {
1210  m_comp->msg_count++;
1211  if (!en->email->read)
1212  {
1213  m_comp->msg_unread++;
1214  if (!en->email->old)
1215  m_comp->msg_new++;
1216  }
1217  if (en->email->flagged)
1218  m_comp->msg_flagged++;
1219  }
1220 #endif
1221  }
1222  else
1223  {
1224  rc = 0;
1225  mutt_progress_init(&progress, progress_msg, MUTT_PROGRESS_WRITE, msg_count);
1226 
1227 #ifdef USE_NOTMUCH
1228  if (m->type == MUTT_NOTMUCH)
1229  nm_db_longrun_init(m, true);
1230 #endif
1231  STAILQ_FOREACH(en, el, entries)
1232  {
1233  mutt_progress_update(&progress, ++tagged_progress_count, -1);
1235  rc = mutt_save_message_ctx(en->email, save_opt, transform_opt, ctx_save->mailbox);
1236  if (rc != 0)
1237  break;
1238 #ifdef USE_COMP_MBOX
1239  if (m_comp)
1240  {
1241  struct Email *e2 = en->email;
1242  m_comp->msg_count++;
1243  if (!e2->read)
1244  {
1245  m_comp->msg_unread++;
1246  if (!e2->old)
1247  m_comp->msg_new++;
1248  }
1249  if (e2->flagged)
1250  m_comp->msg_flagged++;
1251  }
1252 #endif
1253  }
1254 #ifdef USE_NOTMUCH
1255  if (m->type == MUTT_NOTMUCH)
1256  nm_db_longrun_done(m);
1257 #endif
1258  if (rc != 0)
1259  {
1260  mx_mbox_close(&ctx_save);
1261  m_save->append = old_append;
1262  goto errcleanup;
1263  }
1264  }
1265 
1266  const bool need_mailbox_cleanup = ((ctx_save->mailbox->type == MUTT_MBOX) ||
1267  (ctx_save->mailbox->type == MUTT_MMDF));
1268 
1269  mx_mbox_close(&ctx_save);
1270  m_save->append = old_append;
1271 
1272  if (need_mailbox_cleanup)
1274 
1275  mutt_clear_error();
1276  rc = 0;
1277 
1278 errcleanup:
1279  if (rc != 0)
1280  {
1281  switch (save_opt)
1282  {
1283  case SAVE_MOVE:
1284  if (msg_count > 1)
1285  {
1286  // L10N: Message when an index tagged save operation fails for some reason
1287  mutt_error(_("Error saving tagged messages"));
1288  }
1289  else
1290  {
1291  // L10N: Message when an index/pager save operation fails for some reason
1292  mutt_error(_("Error saving message"));
1293  }
1294  break;
1295  case SAVE_COPY:
1296  if (msg_count > 1)
1297  {
1298  // L10N: Message when an index tagged copy operation fails for some reason
1299  mutt_error(_("Error copying tagged messages"));
1300  }
1301  else
1302  {
1303  // L10N: Message when an index/pager copy operation fails for some reason
1304  mutt_error(_("Error copying message"));
1305  }
1306  break;
1307  }
1308  }
1309 
1310 cleanup:
1312  return rc;
1313 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_save_message_ctx()

int mutt_save_message_ctx ( struct Email e,
enum MessageSaveOpt  save_opt,
enum MessageTransformOpt  transform_opt,
struct Mailbox m 
)

Save a message to a given mailbox.

Parameters
eEmail
save_optCopy or move, e.g. SAVE_MOVE
transform_optTransformation, e.g. TRANSFORM_DECRYPT
mMailbox to save to
Return values
0Success
-1Error

Definition at line 1001 of file commands.c.

1003 {
1005  CopyHeaderFlags chflags = CH_NO_FLAGS;
1006  int rc;
1007 
1008  set_copy_flags(e, transform_opt, &cmflags, &chflags);
1009 
1010  if (transform_opt != TRANSFORM_NONE)
1012 
1013  rc = mutt_append_message(m, Context->mailbox, e, cmflags, chflags);
1014  if (rc != 0)
1015  return rc;
1016 
1017  if (save_opt == SAVE_MOVE)
1018  {
1021  if (C_DeleteUntag)
1022  mutt_set_flag(Context->mailbox, e, MUTT_TAG, false);
1023  }
1024 
1025  return 0;
1026 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_select_sort()

int mutt_select_sort ( bool  reverse)

Ask the user for a sort method.

Parameters
reverseIf true make it a reverse sort
Return values
numSort type, see SortType

Definition at line 769 of file commands.c.

770 {
771  enum SortType method = C_Sort; /* save the current method in case of abort */
772  enum SortType new_sort = C_Sort;
773 
774  switch (mutt_multi_choice(reverse ?
775  /* L10N: The highlighted letters must match the "Sort" options */
776  _("Rev-Sort "
777  "(d)ate,(f)rm,(r)ecv,(s)ubj,t(o),(t)hread,(u)"
778  "nsort,si(z)e,s(c)ore,s(p)am,(l)abel?") :
779  /* L10N: The highlighted letters must match the "Rev-Sort" options */
780  _("Sort "
781  "(d)ate,(f)rm,(r)ecv,(s)ubj,t(o),(t)hread,(u)"
782  "nsort,si(z)e,s(c)ore,s(p)am,(l)abel?"),
783  /* L10N: These must match the highlighted letters from "Sort" and "Rev-Sort" */
784  _("dfrsotuzcpl")))
785  {
786  case -1: /* abort - don't resort */
787  return -1;
788 
789  case 1: /* (d)ate */
790  new_sort = SORT_DATE;
791  break;
792 
793  case 2: /* (f)rm */
794  new_sort = SORT_FROM;
795  break;
796 
797  case 3: /* (r)ecv */
798  new_sort = SORT_RECEIVED;
799  break;
800 
801  case 4: /* (s)ubj */
802  new_sort = SORT_SUBJECT;
803  break;
804 
805  case 5: /* t(o) */
806  new_sort = SORT_TO;
807  break;
808 
809  case 6: /* (t)hread */
810  new_sort = SORT_THREADS;
811  break;
812 
813  case 7: /* (u)nsort */
814  new_sort = SORT_ORDER;
815  break;
816 
817  case 8: /* si(z)e */
818  new_sort = SORT_SIZE;
819  break;
820 
821  case 9: /* s(c)ore */
822  new_sort = SORT_SCORE;
823  break;
824 
825  case 10: /* s(p)am */
826  new_sort = SORT_SPAM;
827  break;
828 
829  case 11: /* (l)abel */
830  new_sort = SORT_LABEL;
831  break;
832  }
833  if (reverse)
834  new_sort |= SORT_REVERSE;
835 
836  cs_subset_str_native_set(NeoMutt->sub, "sort", new_sort, NULL);
837  return (C_Sort != method) ? 0 : -1; /* no need to resort if it's the same */
838 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_shell_escape()

bool mutt_shell_escape ( void  )

invoke a command in a subshell

Return values
trueA command was invoked (no matter what its result)
falseNo command was invoked

Definition at line 845 of file commands.c.

846 {
847  char buf[1024];
848 
849  buf[0] = '\0';
850  if (mutt_get_field(_("Shell command: "), buf, sizeof(buf), MUTT_CMD, false, NULL, NULL) != 0)
851  {
852  return false;
853  }
854 
855  if ((buf[0] == '\0') && C_Shell)
856  mutt_str_copy(buf, C_Shell, sizeof(buf));
857  if (buf[0] == '\0')
858  {
859  return false;
860  }
861 
863  mutt_endwin();
864  fflush(stdout);
865  int rc = mutt_system(buf);
866  if (rc == -1)
867  mutt_debug(LL_DEBUG1, "Error running \"%s\"", buf);
868 
869  if ((rc != 0) || C_WaitKey)
871 
872  return true;
873 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ C_DisplayFilter

char* C_DisplayFilter

Config: External command to pre-process an email before display.

Definition at line 85 of file commands.c.

◆ C_PipeDecode

bool C_PipeDecode

Config: Decode the message when piping it.

Definition at line 86 of file commands.c.

◆ C_PipeSep

char* C_PipeSep

Config: Separator to add between multiple piped messages.

Definition at line 87 of file commands.c.

◆ C_PipeSplit

bool C_PipeSplit

Config: Run the pipe command on each message separately.

Definition at line 88 of file commands.c.

◆ C_PrintDecode

bool C_PrintDecode

Config: Decode message before printing it.

Definition at line 89 of file commands.c.

◆ C_PrintSplit

bool C_PrintSplit

Config: Print multiple messages separately.

Definition at line 90 of file commands.c.

◆ C_PromptAfter

bool C_PromptAfter

Config: Pause after running an external pager.

Definition at line 91 of file commands.c.

CH_FROM
#define CH_FROM
Retain the "From " message separator?
Definition: copy.h:55
CopyHeaderFlags
uint32_t CopyHeaderFlags
Flags for mutt_copy_header(), e.g. CH_UPDATE.
Definition: copy.h:49
mutt_endwin
void mutt_endwin(void)
Shutdown curses/slang.
Definition: curs_lib.c:572
Email::msgno
int msgno
Number displayed to the user.
Definition: email.h:87
C_PipeSplit
bool C_PipeSplit
Config: Run the pipe command on each message separately.
Definition: commands.c:88
Body::noconv
bool noconv
Don't do character set conversion.
Definition: body.h:73
mutt_parse_rc_line
enum CommandResult mutt_parse_rc_line(const char *line, struct Buffer *err)
Parse a line of user config.
Definition: init.c:1044
mutt_message_hook
void mutt_message_hook(struct Mailbox *m, struct Email *e, HookFlags type)
Perform a message hook.
Definition: hook.c:574
SORT_SPAM
@ SORT_SPAM
Sort by the email's spam score.
Definition: sort2.h:59
QuadOption
QuadOption
Possible values for a quad-option.
Definition: quad.h:36
MUTT_MMDF
@ MUTT_MMDF
'mmdf' Mailbox type
Definition: mailbox.h:49
CH_REORDER
#define CH_REORDER
Re-order output of headers (specified by 'hdr_order')
Definition: copy.h:58
SORT_TO
@ SORT_TO
Sort by the email's To field.
Definition: sort2.h:53
crypt_smime_getkeys
void crypt_smime_getkeys(struct Envelope *env)
Wrapper for CryptModuleSpecs::smime_getkeys()
Definition: cryptglue.c:458
S_BKG
#define S_BKG
Definition: string2.h:42
MessageWindow
struct MuttWindow * MessageWindow
Message Window, ":set", etc.
Definition: mutt_window.c:47
MUTT_CM_CHARCONV
#define MUTT_CM_CHARCONV
Perform character set conversions.
Definition: copy.h:41
_
#define _(a)
Definition: message.h:28
NONULL
#define NONULL(x)
Definition: string2.h:37
Mailbox
A mailbox.
Definition: mailbox.h:81
SORT_THREADS
@ SORT_THREADS
Sort by email threads.
Definition: sort2.h:51
TRANSFORM_NONE
@ TRANSFORM_NONE
No transformation.
Definition: commands.h:51
mutt_make_string
void mutt_make_string(char *buf, size_t buflen, int cols, const char *s, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
Create formatted strings using mailbox expandos.
Definition: hdrline.c:1427
APPLICATION_SMIME
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition: lib.h:98
mutt_file_resolve_symlink
void mutt_file_resolve_symlink(struct Buffer *buf)
Resolve a symlink in place.
Definition: file.c:1617
mutt_system
int mutt_system(const char *cmd)
Run an external command.
Definition: system.c:51
Mailbox::append
bool append
Mailbox is opened in append mode.
Definition: mailbox.h:113
filter_create_fd
pid_t filter_create_fd(const char *cmd, FILE **fp_in, FILE **fp_out, FILE **fp_err, int fdin, int fdout, int fderr)
Run a command on a pipe (optionally connect stdin/stdout)
Definition: filter.c:61
Buffer
String manipulation buffer.
Definition: buffer.h:33
mutt_addrlist_to_intl
int mutt_addrlist_to_intl(struct AddressList *al, char **err)
Convert an Address list to Punycode.
Definition: address.c:1304
C_DeleteUntag
WHERE bool C_DeleteUntag
Config: Untag messages when they are marked for deletion.
Definition: mutt_globals.h:145
SAVE_COPY
@ SAVE_COPY
Copy message, making a duplicate in another mailbox.
Definition: commands.h:61
window_set_focus
void window_set_focus(struct MuttWindow *win)
Set the Window focus.
Definition: mutt_window.c:763
mutt_file_fclose
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
Definition: file.c:153
mutt_buffer_pretty_mailbox
void mutt_buffer_pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
Definition: muttlib.c:599
mutt_buffer_is_empty
bool mutt_buffer_is_empty(const struct Buffer *buf)
Is the Buffer empty?
Definition: buffer.c:252
LastSaveFolder
static struct Buffer LastSaveFolder
The folder the user last saved to.
Definition: commands.c:96
mutt_buffer_dealloc
void mutt_buffer_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
Definition: buffer.c:294
ExtPagerProgress
static const char * ExtPagerProgress
Definition: commands.c:93
mutt_mailbox_cleanup
void mutt_mailbox_cleanup(const char *path, struct stat *st)
Restore the timestamp of a mailbox.
Definition: mutt_mailbox.c:358
SEC_ENCRYPT
#define SEC_ENCRYPT
Email is encrypted.
Definition: lib.h:85
C_PipeDecode
bool C_PipeDecode
Config: Decode the message when piping it.
Definition: commands.c:86
SEC_SIGN
#define SEC_SIGN
Email is signed.
Definition: lib.h:86
mutt_window_clearline
void mutt_window_clearline(struct MuttWindow *win, int row)
Clear a row of a Window.
Definition: mutt_window.c:232
mutt_addrlist_write
size_t mutt_addrlist_write(const struct AddressList *al, char *buf, size_t buflen, bool display)
Write an Address to a buffer.
Definition: address.c:1150
Pager::email
struct Email * email
Current message.
Definition: lib.h:67
Parameter::value
char * value
Parameter value.
Definition: parameter.h:35
MUTT_SEL_NO_FLAGS
#define MUTT_SEL_NO_FLAGS
No flags are set.
Definition: browser.h:41
MUTT_PROGRESS_WRITE
@ MUTT_PROGRESS_WRITE
Progress tracks elements, according to $write_inc
Definition: progress.h:43
mutt_buffer_mktemp
#define mutt_buffer_mktemp(buf)
Definition: muttlib.h:77
mutt_multi_choice
int mutt_multi_choice(const char *prompt, const char *letters)
Offer the user a multiple choice question.
Definition: curs_lib.c:937
mutt_parse_part
void mutt_parse_part(FILE *fp, struct Body *b)
Parse a MIME part.
Definition: parse.c:1659
TAILQ_EMPTY
#define TAILQ_EMPTY(head)
Definition: queue.h:714
CH_WEED
#define CH_WEED
Weed the headers?
Definition: copy.h:52
SortType
SortType
Methods for sorting.
Definition: sort2.h:43
EmailNode::email
struct Email * email
Email in the list.
Definition: email.h:127
TAILQ_FOREACH
#define TAILQ_FOREACH(var, head, field)
Definition: queue.h:718
MUTT_YES
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
Definition: quad.h:40
MUTT_NEWFOLDER
#define MUTT_NEWFOLDER
Create a new folder - same as MUTT_APPEND,.
Definition: mx.h:56
mutt_expand_aliases
void mutt_expand_aliases(struct AddressList *al)
Expand aliases in a List of Addresses.
Definition: alias.c:294
Context
The "current" mailbox.
Definition: context.h:38
mutt_file_fopen
FILE * mutt_file_fopen(const char *path, const char *mode)
Call fopen() safely.
Definition: file.c:589
LL_DEBUG1
@ LL_DEBUG1
Log at debug level 1.
Definition: logging.h:40
mutt_file_unlink
void mutt_file_unlink(const char *s)
Delete a file, carefully.
Definition: file.c:195
mutt_strwidth
int mutt_strwidth(const char *s)
Measure a string's width in screen cells.
Definition: curs_lib.c:1363
SAVE_MOVE
@ SAVE_MOVE
Move message to another mailbox, removing the original.
Definition: commands.h:62
FREE
#define FREE(x)
Definition: memory.h:40
EmailNode
List of Emails.
Definition: email.h:125
SORT_REVERSE
#define SORT_REVERSE
Reverse the order of the sort.
Definition: sort2.h:81
STAILQ_FIRST
#define STAILQ_FIRST(head)
Definition: queue.h:347
check_traditional_pgp
static bool check_traditional_pgp(struct Mailbox *m, struct Email *e, MuttRedrawFlags *redraw)
Check for an inline PGP content.
Definition: commands.c:1438
RootWindow
struct MuttWindow * RootWindow
Parent of all Windows.
Definition: mutt_window.c:45
C_PrintSplit
bool C_PrintSplit
Config: Print multiple messages separately.
Definition: commands.c:90
MimeSpecials
const char MimeSpecials[]
Characters that need special treatment in MIME.
Definition: mime.c:67
Buffer::dsize
size_t dsize
Length of data.
Definition: buffer.h:37
mutt_param_free
void mutt_param_free(struct ParameterList *pl)
Free a ParameterList.
Definition: parameter.c:61
SecurityFlags
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
Definition: lib.h:83
PATH_MAX
#define PATH_MAX
Definition: mutt.h:44
imap_copy_messages
int imap_copy_messages(struct Mailbox *m, struct EmailList *el, const char *dest, enum MessageSaveOpt save_opt)
Server COPY messages to another folder.
Definition: message.c:1623
C_PrintDecode
bool C_PrintDecode
Config: Decode message before printing it.
Definition: commands.c:89
MUTT_ABORT
@ MUTT_ABORT
User aborted the question (with Ctrl-G)
Definition: quad.h:38
OptNoCurses
WHERE bool OptNoCurses
(pseudo) when sending in batch mode
Definition: options.h:48
mutt_sleep
void mutt_sleep(short s)
Sleep for a while.
Definition: muttlib.c:1448
mutt_buffer_pool_release
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
Definition: pool.c:112
STAILQ_EMPTY
#define STAILQ_EMPTY(head)
Definition: queue.h:345
MUTT_FORMAT_NO_FLAGS
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
Definition: format_flags.h:30
mailbox_free
void mailbox_free(struct Mailbox **ptr)
Free a Mailbox.
Definition: mailbox.c:71
Parameter
Attribute associated with a MIME part.
Definition: parameter.h:32
Context
WHERE struct Context * Context
Definition: mutt_globals.h:42
mutt_body_free
void mutt_body_free(struct Body **ptr)
Free a Body.
Definition: body.c:57
Body::subtype
char * subtype
content-type subtype
Definition: body.h:37
MUTT_CM_DISPLAY
#define MUTT_CM_DISPLAY
Output is displayed to the user.
Definition: copy.h:38
mx_path_resolve
struct Mailbox * mx_path_resolve(const char *path)
Get a Mailbox for a path.
Definition: mx.c:1681
STAILQ_FOREACH
#define STAILQ_FOREACH(var, head, field)
Definition: queue.h:349
cs_subset_str_native_set
int cs_subset_str_native_set(const struct ConfigSubset *sub, const char *name, intptr_t value, struct Buffer *err)
Natively set the value of a string config item.
Definition: subset.c:292
MUTT_PAGER_MESSAGE
#define MUTT_PAGER_MESSAGE
Definition: lib.h:57
mutt_buffer_alloc
void mutt_buffer_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
Definition: buffer.c:265
mutt_bounce_message
int mutt_bounce_message(FILE *fp, struct Mailbox *m, struct Email *e, struct AddressList *to, struct ConfigSubset *sub)
Bounce an email message.
Definition: sendlib.c:1374
TRANSFORM_DECODE
@ TRANSFORM_DECODE
Decode message.
Definition: commands.h:53
mutt_pager
int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct Pager *extra)
Display a file, or help, in a window.
Definition: pager.c:2327
Context::msg_in_pager
int msg_in_pager
Message currently shown in the pager.
Definition: context.h:44
MUTT_READ
@ MUTT_READ
Messages that have been read.
Definition: mutt.h:96
mutt_parse_mime_message
void mutt_parse_mime_message(struct Mailbox *m, struct Email *e)
Parse a MIME email.
Definition: mutt_parse.c:49
mutt_istr_equal
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
Definition: string.c:883
mutt_str_equal
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:871
MUTT_ALIAS
#define MUTT_ALIAS
Do alias "completion" by calling up the alias-menu.
Definition: mutt.h:57
PGP_TRADITIONAL_CHECKED
#define PGP_TRADITIONAL_CHECKED
Email has a traditional (inline) signature.
Definition: lib.h:99
TAILQ_HEAD_INITIALIZER
#define TAILQ_HEAD_INITIALIZER(head)
Definition: queue.h:630
Email::old
bool old
Email is seen, but unread.
Definition: email.h:50
mutt_progress_init
void mutt_progress_init(struct Progress *progress, const char *msg, enum ProgressType type, size_t size)
Set up a progress bar.
Definition: progress.c:153
Pager::win_index
struct MuttWindow * win_index
Definition: lib.h:73
MUTT_PURGE
@ MUTT_PURGE
Messages to be purged (bypass trash)
Definition: mutt.h:100
TAILQ_FIRST
#define TAILQ_FIRST(head)
Definition: queue.h:716
mutt_parse_content_type
void mutt_parse_content_type(const char *s, struct Body *ct)
Parse a content type.
Definition: parse.c:426
mutt_any_key_to_continue
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
Definition: curs_lib.c:605
query_quadoption
enum QuadOption query_quadoption(enum QuadOption opt, const char *prompt)
Ask the user a quad-question.
Definition: curs_lib.c:518
Pager::win_pbar
struct MuttWindow * win_pbar
Definition: lib.h:74
JUSTIFY_LEFT
@ JUSTIFY_LEFT
Left justify the text.
Definition: curs_lib.h:48
mutt_buffer_pool_get
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
Definition: pool.c:101
crypt_query
SecurityFlags crypt_query(struct Body *m)
Check out the type of encryption used.
Definition: crypt.c:687
Mailbox::type
enum MailboxType type
Mailbox type.
Definition: mailbox.h:105
CH_DECODE
#define CH_DECODE
Do RFC2047 header decoding.
Definition: copy.h:53
mutt_buffer_copy
size_t mutt_buffer_copy(struct Buffer *dst, const struct Buffer *src)
Copy a Buffer's contents to another Buffer.
Definition: buffer.c:445
Parameter::attribute
char * attribute
Parameter name.
Definition: parameter.h:34
Body::force_charset
bool force_charset
Send mode: don't adjust the character set when in send-mode.
Definition: body.h:74
TYPE
#define TYPE(body)
Definition: mime.h:89
C_Bounce
WHERE unsigned char C_Bounce
Config: Confirm before bouncing a message.
Definition: mutt_globals.h:124
mutt_simple_format
void mutt_simple_format(char *buf, size_t buflen, int min_width, int max_width, enum FormatJustify justify, char pad_char, const char *s, size_t n, bool arboreal)
Format a string, like snprintf()
Definition: curs_lib.c:1097
SORT_SUBJECT
@ SORT_SUBJECT
Sort by the email's subject.
Definition: sort2.h:48
mx_mbox_close
enum MxStatus mx_mbox_close(struct Context **ptr)
Save changes and close mailbox.
Definition: mx.c:632
C_Shell
WHERE char * C_Shell
Config: External command to run subshells in.
Definition: mutt_globals.h:106
Progress
A progress bar.
Definition: progress.h:50
SORT_SCORE
@ SORT_SCORE
Sort by the email's score.
Definition: sort2.h:54
APPLICATION_PGP
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: lib.h:97
MUTT_CM_NO_FLAGS
#define MUTT_CM_NO_FLAGS
No flags are set.
Definition: copy.h:34
mutt_save_confirm
int mutt_save_confirm(const char *s, struct stat *st)
Ask the user to save.
Definition: muttlib.c:1351
window_redraw
void window_redraw(struct MuttWindow *win, bool force)
Reflow, recalc and repaint a tree of Windows.
Definition: mutt_window.c:747
CH_NO_FLAGS
#define CH_NO_FLAGS
No flags are set.
Definition: copy.h:50
Pager::ctx
struct Context * ctx
Current mailbox.
Definition: lib.h:66
TRANSFORM_DECRYPT
@ TRANSFORM_DECRYPT
Decrypt message.
Definition: commands.h:52
Mailbox::msg_count
int msg_count
Total number of messages.
Definition: mailbox.h:91
mutt_mailbox_check
int mutt_mailbox_check(struct Mailbox *m_cur, int force)
Check all all Mailboxes for new mail.
Definition: mutt_mailbox.c:141
mutt_clear_error
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
Definition: mutt_logging.c:113
mutt_addrlist_clear
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
Definition: address.c:1468
nm_db_longrun_init
void nm_db_longrun_init(struct Mailbox *m, bool writable)
Start a long transaction.
Definition: db.c:291
mutt_save_message_ctx
int mutt_save_message_ctx(struct Email *e, enum MessageSaveOpt save_opt, enum MessageTransformOpt transform_opt, struct Mailbox *m)
Save a message to a given mailbox.
Definition: commands.c:1001
mutt_addrlist_parse2
int mutt_addrlist_parse2(struct AddressList *al, const char *s)
Parse a list of email addresses.
Definition: address.c:616
MUTT_NOTMUCH
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:54
MUTT_IMAP
@ MUTT_IMAP
'IMAP' Mailbox type
Definition: mailbox.h:53
mutt_is_message_type
bool mutt_is_message_type(int type, const char *subtype)
Determine if a mime type matches a message or not.
Definition: parse.c:1368
CH_DISPLAY
#define CH_DISPLAY
Display result to user.
Definition: copy.h:69
mutt_default_save
void mutt_default_save(char *path, size_t pathlen, struct Email *e)
Find the default save path for an email.
Definition: hook.c:655
Body::parts
struct Body * parts
parts of a multipart or message/rfc822
Definition: body.h:54
Context::mailbox
struct Mailbox * mailbox
Definition: context.h:50
process_protected_headers
static void process_protected_headers(struct Mailbox *m, struct Email *e)
Get the protected header and update the index.
Definition: commands.c:111
nm_db_longrun_done
void nm_db_longrun_done(struct Mailbox *m)
Finish a long transaction.
Definition: db.c:306
Email::env
struct Envelope * env
Envelope information.
Definition: email.h:90
mutt_debug
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
MUTT_NO
@ MUTT_NO
User answered 'No', or assume 'No'.
Definition: quad.h:39
MUTT_CMD_SUCCESS
@ MUTT_CMD_SUCCESS
Success: Command worked.
Definition: mutt_commands.h:38
CH_VIRTUAL
#define CH_VIRTUAL
Write virtual header lines too.
Definition: copy.h:72
Pager::win_pager
struct MuttWindow * win_pager
Definition: lib.h:75
C_PrintCommand
WHERE char * C_PrintCommand
Config: External command to print a message.
Definition: mutt_globals.h:103
Mailbox::msg_flagged
int msg_flagged
Number of flagged messages.
Definition: mailbox.h:93
Mailbox::realpath
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
Definition: mailbox.h:84
mutt_buffer_expand_path
void mutt_buffer_expand_path(struct Buffer *buf)
Create the canonical path.
Definition: muttlib.c:323
Message::fp
FILE * fp
pointer to the message data
Definition: mx.h:96
mutt_envlist_unset
bool mutt_envlist_unset(const char *name)
Unset an environment variable.
Definition: envlist.c:132
MUTT_QUIET
#define MUTT_QUIET
Do not print any messages.
Definition: mx.h:55
Email::flagged
bool flagged
Marked important?
Definition: email.h:43
mutt_append_message
int mutt_append_message(struct Mailbox *dest, struct Mailbox *src, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags)
Append a message.
Definition: copy.c:905
mutt_buffer_get_field
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.
Definition: curs_lib.c:260
mutt_buffer_string
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:77
MUTT_CMD_ERROR
@ MUTT_CMD_ERROR
Error: Can't help the user.
Definition: mutt_commands.h:36
Email::security
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
Definition: email.h:39
SORT_ORDER
@ SORT_ORDER
Sort by the order the messages appear in the mailbox.
Definition: sort2.h:50
filter_wait
int filter_wait(pid_t pid)
Wait for the exit of a process and return its status.
Definition: filter.c:217
CommandResult
CommandResult
Error codes for command_t parse functions.
Definition: mutt_commands.h:34
C_DisplayFilter
char * C_DisplayFilter
Config: External command to pre-process an email before display.
Definition: commands.c:85
WithCrypto
#define WithCrypto
Definition: lib.h:123
SEC_BADSIGN
#define SEC_BADSIGN
Email has a bad signature.
Definition: lib.h:88
MuttWindow::state
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:120
mutt_param_get
char * mutt_param_get(const struct ParameterList *pl, const char *s)
Find a matching Parameter.
Definition: parameter.c:84
C_Weed
bool C_Weed
Config: Filter headers when displaying/forwarding/printing/replying.
Definition: globals.c:40
MUTT_CMD_WARNING
@ MUTT_CMD_WARNING
Warning: Help given to the user.
Definition: mutt_commands.h:37
SORT_RECEIVED
@ SORT_RECEIVED
Sort by when the message were delivered locally.
Definition: sort2.h:52
mutt_str_cat
char * mutt_str_cat(char *buf, size_t buflen, const char *s)
Concatenate two strings.
Definition: string.c:385
Mailbox::compress_info
void * compress_info
Compressed mbox module private data.
Definition: mailbox.h:124
Envelope::from
struct AddressList from
Email's 'From' list.
Definition: envelope.h:57
OpenMailboxFlags
uint8_t OpenMailboxFlags
Flags for mutt_open_mailbox(), e.g. MUTT_NOSORT.
Definition: mx.h:50
MUTT_DELETE
@ MUTT_DELETE
Messages to be deleted.
Definition: mutt.h:98
C_Sort
WHERE short C_Sort
Config: Sort method for the index.
Definition: sort.h:60
is_multipart
#define is_multipart(body)
Definition: mime.h:82
MUTT_MAILBOX_CHECK_FORCE
#define MUTT_MAILBOX_CHECK_FORCE
Definition: mutt_mailbox.h:16
TYPE_TEXT
@ TYPE_TEXT
Type: 'text/*'.
Definition: mime.h:38
Pager::win_ibar
struct MuttWindow * win_ibar
Definition: lib.h:72
MUTT_TAG
@ MUTT_TAG
Tagged messages.
Definition: mutt.h:103
MUTT_MESSAGE_HOOK
#define MUTT_MESSAGE_HOOK
message-hook: run before displaying a message
Definition: hook.h:52
mutt_buffer_fix_dptr
void mutt_buffer_fix_dptr(struct Buffer *buf)
Move the dptr to end of the Buffer.
Definition: buffer.c:181
SORT_FROM
@ SORT_FROM
Sort by the email's From field.
Definition: sort2.h:49
NeoMutt
Container for Accounts, Notifications.
Definition: neomutt.h:36
Body::type
unsigned int type
content-type primary type, ContentType
Definition: body.h:65
mx_mbox_open
struct Context * mx_mbox_open(struct Mailbox *m, OpenMailboxFlags flags)
Open a mailbox and parse it.
Definition: mx.c:309
C_Pager
WHERE char * C_Pager
Config: External command for viewing messages, or 'builtin' to use NeoMutt's.
Definition: mutt_globals.h:99
mutt_addr_cat
void mutt_addr_cat(char *buf, size_t buflen, const char *value, const char *specials)
Copy a string and wrap it in quotes if it contains special characters.
Definition: address.c:681
MUTT_CMD
#define MUTT_CMD
Do completion on previous word.
Definition: mutt.h:60
C_CryptVerifySig
unsigned char C_CryptVerifySig
Config: Verify PGP or SMIME signatures.
Definition: config.c:121
imap_path_probe
enum MailboxType imap_path_probe(const char *path, const struct stat *st)
Is this an IMAP Mailbox? - Implements MxOps::path_probe()
Definition: imap.c:2372
C_PipeSep
char * C_PipeSep
Config: Separator to add between multiple piped messages.
Definition: commands.c:87
mutt_buffer_len
size_t mutt_buffer_len(const struct Buffer *buf)
Calculate the length of a Buffer.
Definition: buffer.c:356
set_copy_flags
static void set_copy_flags(struct Email *e, enum MessageTransformOpt transform_opt, CopyMessageFlags *cmflags, CopyHeaderFlags *chflags)
Set the flags for a message copy.
Definition: commands.c:952
MailboxType
MailboxType
Supported mailbox formats.
Definition: mailbox.h:43
MUTT_CM_DECODE
#define MUTT_CM_DECODE
Decode the message body into text/plain.
Definition: copy.h:37
NeoMutt::sub
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
MUTT_COMMAND
#define MUTT_COMMAND
Do command completion.
Definition: mutt.h:63
MUTT_CM_VERIFY
#define MUTT_CM_VERIFY
Do signature verification.
Definition: copy.h:46
email_free
void email_free(struct Email **ptr)
Free an Email.
Definition: email.c:43
mutt_progress_update
void mutt_progress_update(struct Progress *progress, size_t pos, int percent)
Update the state of the progress bar.
Definition: progress.c:212
Mailbox::msg_unread
int msg_unread
Number of unread messages.
Definition: mailbox.h:92
C_PromptAfter
bool C_PromptAfter
Config: Pause after running an external pager.
Definition: commands.c:91
mutt_get_field
int mutt_get_field(const char *field, char *buf, size_t buflen, CompletionFlags complete, bool multiple, char ***files, int *numfiles)
Ask the user for a string.
Definition: curs_lib.c:311
Body::email
struct Email * email
header information for message/rfc822
Definition: body.h:55
km_dokey
int km_dokey(enum MenuType menu)
Determine what a keypress should do.
Definition: keymap.c:658
WindowState::cols
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:57
mutt_buffer_enter_fname
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.
Definition: curs_lib.c:772
Body::parameter
struct ParameterList parameter
parameters of the content-type
Definition: body.h:39
Pager
An email being displayed.
Definition: lib.h:64
mx_msg_close
int mx_msg_close(struct Mailbox *m, struct Message **msg)
Close a message.
Definition: mx.c:1204
SORT_LABEL
@ SORT_LABEL
Sort by the emails label.
Definition: sort2.h:64
pipe_message
static int pipe_message(struct Mailbox *m, struct EmailList *el, const char *cmd, bool decode, bool print, bool split, const char *sep)
Pipe message to a command.
Definition: commands.c:584
mutt_yesorno
enum QuadOption mutt_yesorno(const char *msg, enum QuadOption def)
Ask the user a Yes/No question.
Definition: curs_lib.c:380
Buffer::data
char * data
Pointer to data.
Definition: buffer.h:35
Email
The envelope/body of an email.
Definition: email.h:37
mutt_envlist_set
bool mutt_envlist_set(const char *name, const char *value, bool overwrite)
Set an environment variable.
Definition: envlist.c:85
SORT_SIZE
@ SORT_SIZE
Sort by the size of the email.
Definition: sort2.h:46
mutt_message
#define mutt_message(...)
Definition: logging.h:83
mutt_set_flag
#define mutt_set_flag(m, e, flag, bf)
Definition: protos.h:67
Mailbox::msg_new
int msg_new
Number of new messages.
Definition: mailbox.h:95
mutt_unget_event
void mutt_unget_event(int ch, int op)
Return a keystroke to the input buffer.
Definition: curs_lib.c:838
mutt_buffer_printf
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:160
crypt_pgp_invoke_getkeys
void crypt_pgp_invoke_getkeys(struct Address *addr)
Wrapper for CryptModuleSpecs::pgp_invoke_getkeys()
Definition: cryptglue.c:274
SORT_DATE
@ SORT_DATE
Sort by the date the email was sent.
Definition: sort2.h:45
MUTT_MAILBOX_CHECK_FORCE_STATS
#define MUTT_MAILBOX_CHECK_FORCE_STATS
Definition: mutt_mailbox.h:17
mutt_copy_message
int mutt_copy_message(FILE *fp_out, struct Mailbox *m, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen)
Copy a message from a Mailbox.
Definition: copy.c:835
mutt_warning
#define mutt_warning(...)
Definition: logging.h:82
mutt_buffer_make
struct Buffer mutt_buffer_make(size_t size)
Make a new buffer on the stack.
Definition: buffer.c:61
crypt_valid_passphrase
bool crypt_valid_passphrase(SecurityFlags flags)
Check that we have a usable passphrase, ask if not.
Definition: crypt.c:135
Email::read
bool read
Email is read.
Definition: email.h:51
SEC_NO_FLAGS
#define SEC_NO_FLAGS
No flags are set.
Definition: lib.h:84
MUTT_MBOX
@ MUTT_MBOX
'mbox' Mailbox type
Definition: mailbox.h:48
C_PagerFormat
WHERE char * C_PagerFormat
Config: printf-like format string for the pager's status bar.
Definition: mutt_globals.h:100
C_Print
WHERE unsigned char C_Print
Config: Confirm before printing a message.
Definition: mutt_globals.h:128
MENU_PAGER
@ MENU_PAGER
Pager pager (email viewer)
Definition: keymap.h:81
SEC_GOODSIGN
#define SEC_GOODSIGN
Email has a valid signature.
Definition: lib.h:87
EXTRA_SPACE
#define EXTRA_SPACE
mutt_buffer_strcpy
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Definition: buffer.c:312
crypt_smime_verify_sender
int crypt_smime_verify_sender(struct Mailbox *m, struct Email *e)
Wrapper for CryptModuleSpecs::smime_verify_sender()
Definition: cryptglue.c:467
C_WaitKey
WHERE bool C_WaitKey
Config: Prompt to press a key after running external commands.
Definition: mutt_globals.h:169
Message
A local copy of an email.
Definition: mx.h:94
mailbox_find
struct Mailbox * mailbox_find(const char *path)
Find the mailbox with a given path.
Definition: mailbox.c:103
SEC_PARTSIGN
#define SEC_PARTSIGN
Not all parts of the email is signed.
Definition: lib.h:89
crypt_invoke_message
void crypt_invoke_message(SecurityFlags type)
Display an informative message.
Definition: cryptglue.c:155
Email::pair
int pair
Color-pair to use when displaying in the index.
Definition: email.h:80
Email::body
struct Body * body
List of MIME parts.
Definition: email.h:91
mx_msg_open
struct Message * mx_msg_open(struct Mailbox *m, int msgno)
return a stream pointer for a message
Definition: mx.c:1158
mutt_error
#define mutt_error(...)
Definition: logging.h:84
mutt_parse_icommand
enum CommandResult mutt_parse_icommand(char *line, struct Buffer *err)
Parse an informational command.
Definition: icommands.c:78
CopyMessageFlags
uint16_t CopyMessageFlags
Flags for mutt_copy_message(), e.g. MUTT_CM_NOHEADER.
Definition: copy.h:31
mutt_get_address
struct AddressList * mutt_get_address(struct Envelope *env, const char **prefix)
Get an Address from an Envelope.
Definition: alias.c:326
mutt_str_copy
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:716
MUTT_COMP_NO_FLAGS
#define MUTT_COMP_NO_FLAGS
No flags are set.
Definition: mutt.h:56