1. 03 Mar, 2021 4 commits
    • Vincent Lefevre's avatar
      Updated French translation. · 9e338a19
      Vincent Lefevre authored
      9e338a19
    • Vincent Lefevre's avatar
      Updated French translation. · fb5f052f
      Vincent Lefevre authored
      fb5f052f
    • Kevin J. McCarthy's avatar
      Don't leak fp when aborting mutt_make_message_attach(). · 1d13381f
      Kevin J. McCarthy authored
      I forgot to close up the fp before returning.
      1d13381f
    • Kevin J. McCarthy's avatar
      Prompt for retry on decrypt failure for mime message attachments. · 16c381d8
      Kevin J. McCarthy authored
      Closes #331.
      
      Change $forward_decyrpt to a quadoption, defaulting 'yes' for backward
      compatibility.  This will allow users to choose on a per-message
      attachment basis if desired.
      
      If decoding from $mime_forward_decode fails or decrypting from
      $forward_decrypt, notify the user and prompt to retry attaching
      without the decode/decrypt.
      
      $forward_decrypt directly invokes decryption and returns -1 on error,
      while $mime_forward_decode uses the handler rendering, which returns a
      non-fatal 1 (to allow message display of failing encrypted message).
      So prompt on either case.
      
      If they decline to retry, or the retry fails, return NULL only on a
      hard-fail (-1) return code.  They've been warned and can peek at the
      final result.
      
      The send generate_body() code was not checking for a NULL result.
      This seems like a bad idea, so add a check and error message in that
      case.
      16c381d8
  2. 26 Feb, 2021 2 commits
    • Kevin J. McCarthy's avatar
      Merge branch 'stable' · ad14641e
      Kevin J. McCarthy authored
      ad14641e
    • Kevin J. McCarthy's avatar
      Fix (un)setenv to not return an error with unset env vars. · de51ab4a
      Kevin J. McCarthy authored
      The code was returning -1 in those cases.  This can cause hook
      processors, such as send2-hook, to sleep 1 second without an error
      message being set and displayed.  It also causes the hook processor to
      abort executing subsequent matching commands.
      
      -1 should be reserved for syntax errors.  For setenv querying, change
      the return value to 0.  For unsetenv, generate a message and also
      change the return value to 0.
      
      <enter-command> checks if err->data is set to determine whether to
      print anything, and the behavior is used in the 'set' commands, so
      this is established correct behavior.
      de51ab4a
  3. 24 Feb, 2021 1 commit
  4. 23 Feb, 2021 2 commits
  5. 21 Feb, 2021 2 commits
    • Kevin J. McCarthy's avatar
      Scan OPS files directly for gettext translation strings. · 7fd331fd
      Kevin J. McCarthy authored
      Previously, gettext's po/Makefile.in.in was modified to separately
      scan and merge a generated file: keymap_alldefs.h.  Gettext doesn't
      recommend nor provide support for scanning generated files.
      
      However, there is no reason we have to scan the generated file.
      Instead move the N_() markers and L10N comments into the OPS files.
      Then simply add the OPS files to po/POTFILES.in.
      
      Add a '--language=C' option to xgettext to avoid a warning about the
      OPS files not have any known language suffix.
      
      Modify gen_defs and doc/gen-map-doc to deal with the new format of the
      OPS files.
      7fd331fd
    • Kevin J. McCarthy's avatar
      Fix gettext update problems. · d4e13e4b
      Kevin J. McCarthy authored
      The keymap_alldefs.h file was previously generated and scanned inside
      po/Makefile.in.in as an additional POTFILES files build dependency and
      step.
      
      The file can't be scanned by just adding it to po/POTFILES.in because
      it's a generated file that will be in the build directory.  The next
      commit will instead add the OPS* files directly to POTFILES.in to be
      scanned.
      
      For this commit, remove the generation of keymap_alldefs.h.
      
      Remove the redundant ALL_LINGUAS setting from configure.ac.  Reformat
      the LINGUAS file to be on one line, as the documentation shows.  I
      think it was okay before, but just to be safe.
      
      Fix L10N scanning by adding '--add-comments=L10N' to XGETTEXT_OPTIONS
      in po/Makevars.
      
      Set MSGID_BUGS_ADDRESS to silence a warning.
      
      Add gettext.h to the Makefile.am EXTRA_DIST list.
      
      Remove -Iintl flags from all Makefile.am files, since the intl
      directory is no longer bundled in Mutt.
      d4e13e4b
  6. 18 Feb, 2021 3 commits
    • Vincent Lefevre's avatar
      Remove the AM_GNU_GETTEXT_VERSION line as it makes autoreconf fail with · 8d94928e
      Vincent Lefevre authored
      gettext < 0.21 because autopoint complains that gettext is too old.
      
      Using this line with a version smaller than 0.21 makes autopoint itself
      fail, thus does not solve the problem.
      8d94928e
    • Vincent Lefevre's avatar
    • Kevin J. McCarthy's avatar
      Update gettext to version 0.21. · ccc18061
      Kevin J. McCarthy authored
      Run 'gettextize -f --no-changelog' to update to 0.21.
      
      This removes the entire intl directory, and relies on an external
      libintl only.
      
      $(INTLLIBS) should now be referred to as $(LIBINTL), so change all
      references.
      
      Unfortunately, some of the gettext m4 files were modified and "mutt
      customized" in the past.  I'm trying to keep them in a pristine state
      after this upgrade.  glibc21.m4, lcmessage.m4, codeset.m4 have also
      been removed.
      
      Manually call AM_ICONV in configure.ac.  This was previously called
      in the modified "MUTT_AM_GNU_GETTEXT" but the result $am_cv_func_iconv
      is tested just below.
      
      locale.h is a standard library defined by C99.  The gpgme and pgp code
      wrapped those includes in HAVE_LOCALE_H checks, but that check was
      performed inside of gettext.m4.  Remove the check inside those
      files (locale.h is already included unconditionally elsewhere in
      Mutt).
      
      Copy the sample gettext.h file and include that instead, as suggested
      by the gettext documentation.
      
      unistd.h is also a standard posix header, so remove HAVE_UNISTD_H
      checks inside mutt too.
      
      Create po/LINGUAS file listing available languages.
      
      Create po/Makevars from the template and customize for Mutt.
      
      Set PO_DEPENDS_ON_POT to no to prevent po file rebuilds.  According to
      the gettext manual, with this set, "PO files can be accidentally
      updated even if a POT file is not updated" when using git.
      ccc18061
  7. 17 Feb, 2021 1 commit
  8. 13 Feb, 2021 1 commit
  9. 08 Feb, 2021 2 commits
    • Kevin J. McCarthy's avatar
      Merge branch 'stable' · 106ff19a
      Kevin J. McCarthy authored
      106ff19a
    • Kevin J. McCarthy's avatar
      Fix pattern compilation error for ~( !~>(~P) ) · 564b515c
      Kevin J. McCarthy authored
      The problem is a nested recursive call followed by trailing
      whitespace.  Other codepaths ensure trailng whitespaces are processed
      when processing the argument, but the parenthesis calls did not.
      
      This meant the outer loop while check:
        while (*ps.dptr)
        {
          SKIPWS (ps.dptr);
          switch (*ps.dptr)
          {
            /* process (~P), for instance */
          }
        }
      would return true for the trailing space(s), the SKIPWS would skip
      over them, and then switch would try to evaluate '\0'.
      
      I think a better solution would be to rearrange the calls like:
        SKIPWS (ps.dptr);
        while (*ps.dptr)
        {
          switch (*ps.dptr)
          {
          }
          SKIPWS(ps.dptr);
        }
      to ensure any trailing whitespace is removed.
      
      However, that's a bit risky for a stable branch commit.  So instead,
      just explicitly add the SKIPWS for the ~() thread ops and for the ()
      groupings after processing the inside expression.
      564b515c
  10. 05 Feb, 2021 3 commits
    • Kevin J. McCarthy's avatar
      Save CurrentFolder in background edit scope. · e5c6a054
      Kevin J. McCarthy authored
      The CurrentFolder can actually be used to resolve an fcc-hook at fcc
      time.  We would want to use the folder they started composing in, to
      be consistent with expectations.
      e5c6a054
    • Kevin J. McCarthy's avatar
      Change attach inline forward messages default CH flag. · 56f4c0b8
      Kevin J. McCarthy authored
      Fix it to be CH_DECODE instead of CH_XMIT.
      
      I believe this was a mistake from a long time ago.  The CH_XMIT flag
      is used in mutt for:
      - mutt_save_message() -> set_copy_flags() when decoding
      - pre-send conversion to 7 bit
      - mutt_make_message_attach() (for index mime-forwarding)
      - message bouncing
      
      Using it for *inline* forwarding in the attachment menu doesn't make
      sense.  Both include_forward() in send.c, and include_header() in
      recvcmd.c use CH_DECODE.  It seems reasonable to decode headers when
      inline forwarding from the attachment menu (as is done from the
      index), so I'm guessing that was what was meant here too.
      56f4c0b8
    • Kevin J. McCarthy's avatar
      Filter ANSI sequences when forwarding too. · 18c29a84
      Kevin J. McCarthy authored
      Add a MUTT_CM_FORWARDING flag to correspond with the MUTT_CM_REPLYING
      flag.  Check those to turn on ANSI filtering.
      
      In order to guard against other accidental prefix setting without one
      of those flags, also check s->prefix to enable ANSI filtering (and
      prefix printing) too.
      
      Add missing MUTT_CM_REPLYING flags to the recvcmd.c reply functions.
      
      While updating the recvcmd.c reply code, I noticed CH_REORDER wasn't
      enabled with OPTWEED, like in the send.c code (and everywhere else),
      so add the missing flag.
      18c29a84
  11. 04 Feb, 2021 1 commit
    • Kevin J. McCarthy's avatar
      Add explicit flag to check for postponed message on <mail>. · 1a9fea6f
      Kevin J. McCarthy authored
      This used to check for:
        !flags && !msg
      which was still relatively clear that it was a unique situation (just
      for <mail> in the index and pager).
      
      With the addition of background editing, it became:
        (sctx->flags == SENDBACKGROUNDEDIT) && !sctx->msg
      This is less intuitively understood to be just for the <mail> case,
      and thus perhaps easy to create a bug in the future.
      
      Create an explicit flag, SENDCHECKPOSTPONED to perform the check, and
      enable for the <mail> operation in the index and pager.
      1a9fea6f
  12. 02 Feb, 2021 2 commits
  13. 01 Feb, 2021 2 commits
  14. 27 Jan, 2021 7 commits
  15. 24 Jan, 2021 2 commits
    • Kevin J. McCarthy's avatar
      Fix hdr_order to use the longest match. · 3d6e7df7
      Kevin J. McCarthy authored
      Previously, Mutt would find the first match and use that.
      
      However, the example shown in the manual:
        hdr_order From Date: From: To: Cc: Subject:
      gives the expectation that an mbox From_ line would print first, then
      the Date:, and then the From: header.
      
      Change the matcher to scan all HeaderOrderList entries and use the
      longest match.
      
      Update the documentation to make it clear From_ lines are printed out
      with other "real" headers, and can be manipulated via ignore and
      hdr_order commands.
      3d6e7df7
    • Kevin J. McCarthy's avatar
      Fix double spacing after group display-name in pager and message. · c6700b05
      Kevin J. McCarthy authored
      Edit-headers and message writing uses mutt_write_rfc822_header() ->
      mutt_write_address_list(), which renders each address one by one and
      outputs to a file.  rfc822_write_address_single() already appends a
      space after the group display-name colon delimiter.
      
      Rendering to the pager uses a different code path:
      address_header_decode() -> format_address_header().  The logic is very
      similar to mutt_write_address_list() except it renders to memory.  It
      also needs to avoid re-appending a space after the group display-name.
      c6700b05
  16. 23 Jan, 2021 2 commits
  17. 22 Jan, 2021 3 commits
    • Kevin J. McCarthy's avatar
      Tighten up group list parsing a bit more. · e72c8ce1
      Kevin J. McCarthy authored
      The display-name is not optional for a group, so don't start a group
      list if the display-name is empty.
      
      Groups can't be nested, so terminate a previous group list if the
      terminator was left off.
      e72c8ce1
    • Kevin J. McCarthy's avatar
      Make some small fixes to the -nonotify commit. · 46f86782
      Kevin J. McCarthy authored
      Fix logic error in mutt_buffy_check().
      
      Add -nonotify flag to the configuration command list in the manual
      too.
      
      Add line wraps to the muttrc.man mailboxes options, to make the
      synopsis more readable within 80 columns.
      46f86782
    • Rene Kita's avatar
      Add -nonotify argument to mailboxes command · 26770eac
      Rene Kita authored
      -nonotify allows to disable notifications for mailboxes.
      
      -notify can be used to re-enable notifications for a previously disabled
      mailbox.
      
      A typical use case are mailboxes for mailing lists. The User may want to
      get notified about new mail in their work mailbox, but not get disrupted
      by new mail received from the mailing list.
      
      This patch allows individual configuration for all mailboxes.
      26770eac