Richard Russon [Fri, 22 Feb 2019 21:01:47 +0000 (21:01 +0000)]
config: add 'C_' prefix
Each config variable has a global variable backing it.
The name of the global is the MixedCase transform of the config name.
While this is useful for remembering their names, it makes some
variables hard to search for, giving many false positives.
- Copy
- From
- Help
- Move
- Sort
Prefixing the globals with `C_` prevents this problem.
Richard Russon [Wed, 27 Feb 2019 15:19:48 +0000 (15:19 +0000)]
merge: trivial fixes
* insert space to help parsing
* fix backing global variable for config
* doxy: fix typos
* drop dupe prototype
* lowercase variable
* doxygen: update docs for #defines
* add a 'SEC_' prefix to the security flags
* rename State's members for better legibility
* rename enum MenuTypes to MenuType
* convert config dump defines into an enum
* convert format flags enum into an int
* tidy mutt_menu_new()
Ian Zimmerman [Fri, 8 Feb 2019 19:40:43 +0000 (11:40 -0800)]
Adjust symbolic logging levels to avoid level 4, to be PROGRESS
Adjust remaining uses of symbolic loglevels.
Mostly this means changing mutt_socket_readln to mutt_socket_readln_d
with MUTT_SOCK_LOG_FULL in cases where (in my very limited understanding)
private information *might* be logged.
Richard Russon [Wed, 20 Feb 2019 00:55:12 +0000 (00:55 +0000)]
merge: upstream changes
* Fix compilation with LibreSSL <2.7.0
* Add attributes support on color declarations
* Wrap ssl init calls for LibreSSL too
* Change $pgp_use_gpg_agent to default set
* Fix gnutls tls_socket_write() to properly retry
* Fix tunnels to also retry and write full buffer
* Improve attachment menu for s/mime parts
* Simplify nested smime handling in the attachment menu
* Show top-level decoded smime text/plain parts
* Allow descending into maildir and mh directories in file browser
* Add an error message for <descend-directory>
* Updated French translation
* Create <group-chat-reply> function
* Updated French translation
* Add mutt_buffer_len() helper
* Add mutt_buffer helpers for base64 conversion
* Change auth_gss to to use buffers and the buffer pool
* Check the base64 decoding retval in auth_gss
Corey Minyard [Thu, 31 Jan 2019 23:57:57 +0000 (17:57 -0600)]
Allow descending into maildir and mh directories in file browser
Some (maybe most) IMAP mail systems allow folders to be nested inside
folders, so you can have, say, an Inbox with more folders inside it.
However, in the file browser, mutt will only open a maildir/mh
directory as a mailbox, there is no way to get to the child mailboxes.
This change adds a function <descend-directory> that forces mutt to
descend into the directory. It is unbound by default.
Signed-off-by: Corey Minyard <minyard@acm.org> Co-authored-by: Richard Russon <rich@flatcap.org>
Kevin McCarthy [Fri, 25 Jan 2019 02:28:27 +0000 (18:28 -0800)]
Show top-level decoded smime text/plain parts
Commit 331d9d5a attempted to fix a problem with an attachment having
extension .p7m. The attachment menu tried to decode and failed, and
the part ended up being replaced by a bogus text/plain part.
The problem is that crypt_smime_decrypt_mime() returns a text/plain
part if the decode fails, meaning we can't distinguish failure from
success in this case.
As a compromise, only use a text/plain resulting from a single
top-level application_smime part. This will allow for the case of an
text/plain encoded email, but won't end up hiding attachments that
were not decoded.
Kevin McCarthy [Thu, 24 Jan 2019 23:19:36 +0000 (15:19 -0800)]
Simplify nested smime handling in the attachment menu
Since changeset 2fd6f99b allows nested encryption handling, there is
no need to deal with the nesting directly. Instead, just recursive as
with other nested handling.
Kevin McCarthy [Thu, 24 Jan 2019 22:15:33 +0000 (14:15 -0800)]
Improve attachment menu for s/mime parts
Don't prompt for passphrase or getkeys, or set the ENCRYPT flag, for
OPAQUE types.
Don't recurse on "text" output from decrypt_mime(). There is no
reason to recurse on a text type. Additionally, the
mutt_read_mime_header() will return an empty text type even if the
decode doesn't generate mime output. In those cases, we want to show
the original attachment.
Kevin McCarthy [Tue, 22 Jan 2019 03:43:08 +0000 (19:43 -0800)]
Fix tunnels to also retry and write full buffer
Change the tunnel_socket_read() and tunnel_socket_write() as the raw
sockets were adjusted in the previous commit. Retry on EINTR, and
complete a full write so all the implementations have the same behavior.
Kevin McCarthy [Mon, 21 Jan 2019 19:56:04 +0000 (11:56 -0800)]
Fix gnutls tls_socket_write() to properly retry
Retry on GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED. This prevents an
aborted send due to a SIGWINCH, for instance.
Change tls_socket_read() to follow the same flow. Don't bother
checking gnutls_error_is_fatal() because return codes besides AGAIN
and INTERRUPTED end up closing the connection regardless. (We don't
handle handshakes and negotations during send/receive).
Kevin McCarthy [Thu, 10 Jan 2019 17:56:41 +0000 (09:56 -0800)]
Wrap ssl init calls for LibreSSL too
It looks like LibreSSL does not perform automatic initialization of
the library and error strings.
Since LibreSSL defines OPENSSL_VERSION_NUMBER as a "version 2",
add a check if LIBRESSL_VERSION_NUMBER is defined and call the
initialization functions for that case.
Frederick Eaton [Fri, 8 Feb 2019 06:34:24 +0000 (22:34 -0800)]
Reword "postpone" message to avoid confusion
Replace "Postpone this message?" with "Save (postpone) draft message?"
Issue #1312
Update neomuttrc manual page (via init.h documentation) so that the
actual text of the $postpone quadoption prompt appears in the blurb, so
users can grep for it.
Austin Ray [Thu, 24 Jan 2019 00:45:01 +0000 (19:45 -0500)]
notmuch: delegate msg_open_new to maildir backend
Notmuch delegates several functions to the maildir backend since they
are connected. This commit delegates the notmuch msg_open_new() to the
maildir backend's implementation.
The primary benefit is being able to delete attachments from emails.
Previously, if an attachment was marked for deletion then it was
impossible to exit a virtual mailbox since a write operation could not
complete. This bug has been in Neomutt for a while.
Richard Russon [Tue, 19 Feb 2019 00:46:58 +0000 (00:46 +0000)]
merge: refactor/tidy mutt_compose_menu()
* reduce scope of variables
* boolify variables
* fix scoping
* merge non-overlapping buffer use
* use NUL rather than zero
* var scope
* tidy mutt_compose_menu()