Ian Zimmerman [Thu, 18 Oct 2018 09:14:21 +0000 (02:14 -0700)]
Try adding status indicator R for my address in Reply-To
It adds a new "R" flag for the 3rd position of the index %Z field, for when user's own address is in the Reply-To header unless none of the other flags for that field is applicable.
Some mailing lists now do the following transformation of the headers: rewrite the From header to the list address, and add a Reply-To header with the poster address. This feature helps highlight my own posts in folders dedicated to such lists. Of course if you are _subscribed_ to the list (in the Mutt sense) you'll get the "L" flag instead, but in that case you don't care about hightlighting your posts anyway.
Austin Ray [Thu, 11 Oct 2018 20:16:02 +0000 (16:16 -0400)]
format: add `%D` - mailbox description
Added the `%D` expando, which displays the mailbox's description, to
sidebar_format and status_format. If the mailbox does not have a
description, fallback to the path.
This behavior is same as `%f` and `%B` for `virtual-mailboxes`. This
was done to prevent breaking existing configurations as `notmuch`
queries have unsightly paths.
This lays the ground work for introducing `named-mailboxes`.
Austin Ray [Thu, 11 Oct 2018 18:18:40 +0000 (14:18 -0400)]
mailbox: try to find existing description
`mx_mbox_open(...)` creates a new `Context`, which requires creating new
`Mailbox` instances. Modified `mailbox_new(...)` to try and find an
existing description that matches the mailbox `path`.
Austin Ray [Thu, 11 Oct 2018 15:38:50 +0000 (11:38 -0400)]
notmuch: count messages in queried threads
`count_query` did not handle counting all messages in `type=threads`
queries. It returned the number of messages matching the `query=`
qualifier. Refactored `count_query` into two methods handling
`type=threads` and `type=messages`, respectively.
This makes `sidebar_format`'s `%S` display the same value as
`pager_format`'s `%m`.
Richard Russon [Wed, 10 Oct 2018 22:10:59 +0000 (23:10 +0100)]
merge: upstream fixes
* Fix gnutls (a)lways to properly save for all certerr values.
* Change gnutls certificate_file processing and interactive prompts.
* Add a comment about gnutls date bits in certstat.
Kevin McCarthy [Tue, 9 Oct 2018 21:39:09 +0000 (14:39 -0700)]
Change gnutls certificate_file processing and interactive prompts.
Accept a saved cert at any point in the chain, except for those
revoked or with invalid dates.
The INSECUREALG processing was a bit goofed up. It was skipping the
prompt for every chain except the host, and was only displaying an
error for entry 1 (the host being 0, root being len-1). Instead
prompt at any point, and display a warning as with the other errors.
Add a CERTERR_OTHER type to capture other bits. Recently GnuTLS has
added additional certificate_status_t types. We may want to improve
the prompts in the future for those, but for now at least make sure
it's recorded in certerr.
Kevin McCarthy [Tue, 9 Oct 2018 20:28:15 +0000 (13:28 -0700)]
Fix gnutls (a)lways to properly save for all certerr values.
For the case of SIGNERNOTCA, INSECUREALG, or a newer unhandled value,
the "(a)ccept always" prompt was allowed, but the cert saving was
prevented by a check only against NOTTRUSTED. This ended up giving a
strange error message saying the cert was not saved.
Fix to save the cert for all errors except HOSTNAME (which is handled
separately).
Richard Russon [Tue, 9 Oct 2018 14:32:46 +0000 (15:32 +0100)]
merge: upstream refactoring
* Add buffer pool functions.
* Convert imap_rename and pgp_invoke_list_keys to use buffer pool.
* Create mutt_buffer_add_printf().
* Convert mix_send_message to use buffer pool.
* Convert buffy_maildir_check_dir to use struct Buffer.
* Convert maildir_parse_dir to use struct Buffer.
* Convert _maildir_commit_message to use struct Buffer.
* Convert maildir_sync_message to use BUFFERs.
* Convert maildir_canon_filename() and callers to use struct Buffer.
Austin Ray [Sat, 6 Oct 2018 19:55:26 +0000 (15:55 -0400)]
notmuch: simplify uri creation logic
If `mdata` does not exist in `mailbox`, try to create a default instance
of `NmMboxData`. Using a default instance removes two conditionals from
`nm_uri_from_query(...)`, moving them to `nm_get_default_data(...)`.
This reduces the number of `snprintf(...)` to maintain, and allows query
parsing for type meta-data.
An extra variable keeps track of default data usage for freeing
allocated memory.
Josh Poimboeuf [Thu, 31 May 2018 21:58:02 +0000 (16:58 -0500)]
notmuch: use global settings for vfolder-from-query
When the <vfolder-from-query> command is run while already in a vfolder,
it takes the current vfolder as context. That means the global settings
(nm_query_type, nm_db_limit, nm_default_uri) are ignored in favor of the
current vfolder's settings. This is confusing behavior because the new
vfolder is otherwise independent from the old one.
Set the nm_uri_from_query() context to NULL so that it uses the global
settings instead.
Austin Ray [Sat, 18 Aug 2018 22:15:38 +0000 (18:15 -0400)]
Notmuch: Parse `type=` statements from query
Implemented a function that will parse `type=` statements from a notmuch
query and set the appropriate query type in `NmCtxData`.
This change allows a user to change the query type for a single query
without affecting other queries. The primary use is for executing
`vfolder-from-query`.
This commit ensures notmuch integration behavior conforms to NeoMutt's
notmuch documentation.