1. 29 Jan, 2017 3 commits
    • Kevin J. McCarthy's avatar
      Improve the label completion hash table usage. · 9ae62494
      Kevin J. McCarthy authored
      Move the hash table inside the Context.  Hook message arrival/deletion
      to update the label hash.
      Change the label hash to strdup keys.
      Use hash_find_elem when updating the counter, to reduce unnecessary
      add/delete operations.
    • David Champion's avatar
      Adds label completion. · f58e89c8
      David Champion authored
      A global label hash is added, to which labels are added as they're parsed
      from a mailbox file or edited manually by the user.  Reference counts are
      kept in the hash table so that unused labels are removed from available
      completions.  Completion is available in the label editor only, but it
      may be feasible to add for search expressions if the preceding text ends
      with '~y'.
    • David Champion's avatar
  2. 24 Jan, 2017 2 commits
    • David Champion's avatar
      Add subjectrx command to replace matching subjects with something else. · 0663272c
      David Champion authored
      This lets you define regular expressions-replacement pairs for subject
      display.  When a Subject: matches the regular expression, the replacement
      value will be displayed instead in the message index.  Backreferences
      are supported.
      This is especially nice for simplifying subjects that are overly wordy,
      such as mailing list posts (with [Listname] tags, etc), mail from
      ticketing systems or bug trackers, etc.  It lets you reduce clutter in
      your mutt display without altering the messages themselves.
    • David Champion's avatar
      Abstract the SPAM_LIST as a generic REPLACE_LIST · 149ed356
      David Champion authored
      REPLACE_LIST can be used more generally as a list of pattern
      match-replace settings.  SPAM_LIST was a special case of this, so
      spam handling has been been changed to use REPLACE_LIST instead, and
      SPAM_LIST was removed.
      A generic function for performing a REPLACE_LIST replacement has
      been added in mutt_apply_replace().
      Commited by Kevin McCarthy with some buffer overflow fixes in
  3. 03 Jan, 2017 1 commit
    • Kevin J. McCarthy's avatar
      Add a pattern_cache_t to speed up a few repeated matches. · 522c26d5
      Kevin J. McCarthy authored
      Vincent Lefèvre reported experiencing an index display performance
      issue.  This occurred with messages containing many recipients.  He
      had many index color lines containing ~l.  The ~l ended up being run
      over and over on these messages, resulting in a noticable slowdown
      displaying the index.
      This patch adds caching for just a few of the pattern operations (~l,
      ~u, ~p, ~P) that are potentially expensive and also don't have
      arguments.  The caching is only enabled for operations repeatedly
      matching against the same message: color, hooks, scoring.
      The caching is fairly targeted, but isn't that invasive or
  4. 27 Dec, 2016 1 commit
  5. 13 Dec, 2016 1 commit
  6. 17 Nov, 2016 1 commit
  7. 16 Nov, 2016 1 commit
  8. 14 Nov, 2016 2 commits
    • Kevin J. McCarthy's avatar
      Create mx_ops.sync operation. Refactor compress to use the mx_ops.sync. · d3705ea8
      Kevin J. McCarthy authored
      Change compress.sync_mailbox() to lock the compressed mailbox around
      both the tempfile sync and compress operations.  This will prevent
      changes made inbetween the two syncs from being overwritten.
      Thanks to Damien Riegel for his original patch refactoring
      mx_ops.sync, which this patch is partially based upon.
    • Kevin J. McCarthy's avatar
      Compress patch from the neomutt repository. · 9bf6d74e
      Kevin J. McCarthy authored
      With the following changes:
      - po/de.po changes trimmed to just the compress additions.
      - Move the sample muttrc to contrib, and add it to the Makefile.am so it is
        distributed.  Remove the sample vimrc.
      - Remove extra fluff from manual.
      Thanks to Roland Rosenfeld for the original patch, and to the NeoMutt
      team for their work cleaning up the patch.
  9. 03 Nov, 2016 1 commit
  10. 01 Aug, 2016 1 commit
  11. 18 Jul, 2016 2 commits
    • Kevin J. McCarthy's avatar
      Add imap-fast-trash patch. · 848dbae2
      Kevin J. McCarthy authored
      This is based on the patch by Paul Miller.
      Modifications are:
      * Create a new flag, MUTT_TRASH for imap_make_msg_set(), rather than
        use MUTT_EXPIRED.
      * Change imap_make_msg_set(MUTT_TRASH) to only look at
        hdrs[n]->deleted && !hdrs[n]->purge, behaving like MUTT_TAG, rather
        than looking at the HEADER_DATA.
      * Reimplement imap_fast_trash() based on imap_copy_message().
        It looks the old version was too, but it lacked handling of TRYCREATE
        and also queued the UID COPY but didn't exec it.  (Presumably this
        happened in the subsequent sync).
      * Move the Context magic and mx_is_imap() checks outside of
    • Kevin J. McCarthy's avatar
      Add the trash folder patch. · 347c517c
      Kevin J. McCarthy authored
      This is based on the trash folder patch by Cedric Duval.
      Modifications to the original patch are:
      * Use a flag called M_PURGE instead of M_APPENDED.  The same flag is
        then used in the following "purge" patch instead of adding a
        different flag.
      * Removed the counter in context.  The existing context->deleted
        is all that's needed.
      * Removed the "auto unset M_PURGE" when M_DELETED is unset inside
        _mutt_set_flag(), although this is convenient, it easily leads to
        header->purge not being reset in a few situations.
      * Reset purge flag along with the deleted flag if $delete is answered
      * Set M_PURGE on an edited message. (edit_one_message())
      * Preserve purge flag in mutt_reopen_mailbox()
      * Turn off OPTCONFIRMAPPEND when saving to the trash, rather than
        hardcoding it off in mutt_save_confirm().  That way, normal save to the
        folder will respect the option.
  12. 23 Jun, 2016 1 commit
    • Kevin J. McCarthy's avatar
      Change sidebar to consistently use realpath for context and buffy comparison. · 149eb79e
      Kevin J. McCarthy authored
      The original sidebar patch contained a half-implemented attempt to use
      realpath() mailbox paths for comparison.  (Presumably so the open mailbox
      remains highlighted despite symlink issues).
      Add realpath to the Context, and set it when opening a mailbox.
      Remove sidebar ifdef for the buffy member, and always set it there too.
      Change the sidebar to use the realpath for comparison everywhere.
      mutt_buffy_check() is using stat device and inode for comparison.
      Perhaps this can be changed to use realpath instead, but that's beyond
      the scope of this patch.
  13. 18 Jun, 2016 3 commits
    • Damien R.'s avatar
      add commit_msg to struct mx_ops · 6bc176d7
      Damien R. authored
    • Damien R.'s avatar
      add close_msg to struct mx_ops · 1552f6bc
      Damien R. authored
    • Damien R.'s avatar
      Add open_msg to struct mx_ops · 35c3ae29
      Damien R. authored
      Add the callback to open an existing message to struct mx_ops. For mbox,
      mmdf, maildir, and mh, the code was implemented directly into
      mx_open_message, so it is moved in their respective source files. For
      imap and pop, there were already <mailbox>_fetch_message functions, but
      their argument order has been changed to pass the context as a first
  14. 07 Jun, 2016 1 commit
    • Kevin J. McCarthy's avatar
      Make extended buffy independent of the sidebar. · 04a6356b
      Kevin J. McCarthy authored
      Add new boolean option $mail_check_stats (default off) and
      $mail_check_stats_interval.  The first turns extended buffy on.  The
      second sets the amount of time in between extended buffy checks
      (defaulting to 60 seconds).
      Remove the option $sidebar_refresh_time.
      Change mutt_buffy_check() to only notify the sidebar to redraw if a
      mailbox buffy value changes.
      Remove the #ifdefs around the extended buffy functions.  The next
      patch will merge these functions with the basic functions and pass a
      parameter instead.
      Imap is a special case, because it sends out the status in one batch.
      Change this to perform the comparisons inside cmd_parse_status() and
      flag the sidebar there.  It was previously directly assigning the
      status counters (unsigned int) to the buffy->new (short).  Change this
      to assign 1/0.
  15. 04 Jun, 2016 1 commit
    • Richard Russon's avatar
      Add neomutt version of sidebar patch. (closes #3829) · 389c74bb
      Richard Russon authored
      This is the patch from neomutt; branch 'devel/win-sidebar'; commit
      c796fa85f9cacefb69b8f7d8545fc9ba71674180 with the following changes:
        - move the sample muttrc and vimrc to contrib.
        - remove the README.sidebar.
        - empty out the PATCHES file.
  16. 26 May, 2016 2 commits
    • Kevin J. McCarthy's avatar
      Fix header file indentation after M_ prefix renaming. · beace0e4
      Kevin J. McCarthy authored
      The use of tabs caused misalignment of various macro definitions.
    • Damien Riegel's avatar
      add check operation to struct mx_ops · 938a5657
      Damien Riegel authored
      In mx_check_mailbox switch case, we simply call
      <mailbox>_check_mailbox, so this operation can be move into the mx_ops
      structure pretty easily.
      This commit adds a mandatory "check" operation to struct mx_ops and
      change all mailboxes to use it. Check functions are made static as they
      are only used in their respective source files now.
  17. 25 May, 2016 1 commit
    • Damien Riegel's avatar
      add open_new_msg operation to struct mx_ops · 802f2d76
      Damien Riegel authored
      The code was already using a function pointer to do this operation. This
      commit moves this function pointer to the mx_ops structure and the
      open_new_message functions to their respective source files if it needs
  18. 12 May, 2016 1 commit
    • Damien R.'s avatar
      Start decoupling mailbox operations. · d22efaae
      Damien R. authored
      Introduce a dedicated structure for mailbox operations: struct mx_ops.
      Move the open and close operations into that structure.
      Assign this structure to the context in mx_open_mailbox.  This is
      currently based on the "magic" for the mailbox type, but may be
      refactored in the future.
      Add a stub mbox_close_mailbox function.  This function does nothing,
      the main purpose is to introduce a mx_ops structure for mbox, so its
      usage is similar to mh/imap/pop.  We reuse the name that was made
      available by the previous commmit.  Note that the actual closing of
      the descriptor is done in mx.c.
      To be more consistent with other mailboxes, introduce functions
      mh_open_mailbox and maildir_open_mailbox, and create a dedicated
      structure for mmdf.
  19. 09 May, 2016 1 commit
    • Derek Martin's avatar
      Change M_* symbols to MUTT_* · 9cafb05c
      Derek Martin authored
      Changeset 23334e967dd7 created a workaround for a namespace conflict
      with Solaris and derivatives.  After some discussion, the team decided
      it would be best to move away from using the "M_" prefix for macros.
      This patch was automatically generated by running:
        perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print`
      with the exception that sys_socket.h was exempted.  (That file will
      be backed out subsequent to this commit.)
      Thanks to Andras Salamon for supplying the perl script used to make
      this change.
  20. 08 Mar, 2016 2 commits
    • Kevin J. McCarthy's avatar
      Add $resume_edited_draft_files option. · 29033a6f
      Kevin J. McCarthy authored
      This adds an extra header when saving edited draft files (-E -H on the
      command line).  With this header, the next time they are edited, they
      are automatically "resumed" (by setting $resume_draft_files).
      The idea is to prevent multiple user-defined headers and signatures
      from being added to the draft message by avoiding processing it as a
      brand new message after the first time.
    • Kevin J. McCarthy's avatar
      Add $resume_draft_files option. · f2811367
      Kevin J. McCarthy authored
      When set, draft files are processed the same as when resuming
      postponed messages.  One use of this option is to avoid multiple
      user-defined headers and signatures being added to the message.
      (e.g. when -E is used repeatedly on the draft files).
  21. 29 Feb, 2016 1 commit
  22. 07 Feb, 2016 1 commit
  23. 01 Jan, 2016 1 commit
    • Kevin J. McCarthy's avatar
      Update copyright notices. · 1b329ffe
      Kevin J. McCarthy authored
      This patch only updates existing copyright notices in the source
      files, using commit dates since the last copyright update in commits
      e3af935cdb1a and f8fd60d8d3f2.
      Add a notice to the COPYRIGHT file to refer to our mercurial
      repository for the full commit history.
      Add myself to the COPYRIGHT file and smime_keys.pl file.
  24. 15 Dec, 2015 1 commit
    • Kevin J. McCarthy's avatar
      Add $reflow_space_quotes option. (closes #3309) · bbd5bbab
      Kevin J. McCarthy authored
      When viewing and replying to a flowed email, add spacing between the
      quotes to improve readability and interoperability with non-flowed
      Add a section to the documentation discussing support for viewing and
      non-flowed replies to flowed emails.
  25. 24 Nov, 2015 1 commit
    • Kevin J. McCarthy's avatar
      Add option 'idn_encode'; rename option 'use_idn' to 'idn_decode'. · 64fa378e
      Kevin J. McCarthy authored
      This is patch 3 of 4 implementing support for SMTPUTF8 (RFC 6531).
      Add an option to control whether international domains are encoded with
      IDN or not.  This defaults to set, for backward compatibility.
      Rename the use_idn option to idn_decode, since that more properly
      reflects its purpose.
  26. 04 Oct, 2015 1 commit
    • Kevin J. McCarthy's avatar
      Create a separate macro/push/exec event buffer. (closes #3779) · 53900afa
      Kevin J. McCarthy authored
      Currently, the SSL and TLS certficate prompts turn on
      OPTUNBUFFEREDINPUT, (to prevent macros and such from running right
      through the dialog).  Unfortunately, the menu dialog processing in
      menu_dialog_dokey() is using mutt_ungetch() to forward non-dialog keys
      on to standard menu processing.  With OPTUNBUFFEREDINPUT set, those keys
      never make it to the menu and are buffered until after the menu dialog.
      This patch creates a new event buffer, separate from the standard
      "unget" buffer, for use by macros, exec, and push events.  These events
      can be temporarily ignored by setting OPTIGNOREMACROEVENTS (renamed
      from OPTUNBUFFEREDINPUT), while continuing to allow unget events to be
      Since the "push" and "unget" functions now go to different buffers,
      function names were slightly renamed, to make it less easy to
      unintentionally use the wrong function at the wrong time.
  27. 18 Jul, 2015 1 commit
  28. 19 Apr, 2015 1 commit
    • Kevin J. McCarthy's avatar
      Add $crypt_confirmhook option. (see #3727) · d95d561c
      Kevin J. McCarthy authored
      Allow the confirmation prompt for crypt-hooks to be disabled.  This is
      useful for multiple crypt-hook users (e.g. encrypted mailing lists), or
      just for people who are certain of their crypt-hooks and don't want to
      be prompted every time.
      Thanks to Dale Woolridge for the original patch.
  29. 30 Mar, 2015 2 commits
    • Kevin J. McCarthy's avatar
      Add a security bit to the message for oppenc mode. · 15b61571
      Kevin J. McCarthy authored
      This allows oppenc to be enabled/disabled on a message level.  If
      something initially enables encryption, such as crypt_autoencrypt or
      crypt_replyencrypt, oppenc is turned off for the message.
      Change the postpone/resume code to persist the oppenc bit.
      Also change resend message to enable and invoke oppenc if the option is
    • Kevin J. McCarthy's avatar
      Add the crypt_opportunistic_encrypt option and calls. · 1d72a322
      Kevin J. McCarthy authored
      This patch creates the OPTCRYPTOPPORTUNISTICENCRYPT option and
      It also adds calls to crypt_opportunistic_encrypt() during initial
      message composition, after updating to, cc, or bcc, and after editing
      the message (if edit_headers is enabled).
  30. 06 Nov, 2013 1 commit
    • Kevin J. McCarthy's avatar
      Add option to encrypt postponed messages. (closes #3665) · b36a729b
      Kevin J. McCarthy authored
      This patch is based on Christian Brabandt's patch sent
      to mutt-users.
      Add two new configuration variables: $postpone_encrypt and
      $postpone_encrypt_as.  When $postpone_encrypt is set and a message is
      marked for encryption, the message will be encrypted using the key
      specified in $postpone_encrypt_as before saving the message.
      In this patch, $postpone_encrypt_as must be specified.  I experimented
      with passing safe_strdup( NONULL (PostponeEncryptAs)) when unspecified,
      but although gpg.conf has a default-key setting, I could not get it to
      work properly. (pgpclassic gave an error message and gpgme sefaulted.)
      Although not necessary, this patch turns off signing during encryption
      of the postponed message (and turns it back on before saving), since
      there is no need to sign the message yet.