Kevin McCarthy [Wed, 24 Apr 2019 02:06:11 +0000 (19:06 -0700)]
Add RECURSIVEMATCH LIST-EXTENDED selection option to query
LSUB is required to include mailboxes with subscribed children, but
the just added "LIST (SUBSCRIBED)" by default does not do that.
To match previous behavior, add RECURSIVEMATCH to make sure the
children are included. Fix the parser to trim off the CHILDINFO
suffix in the response.
Parse \NonExistent LIST attribute the same as \NoSelect.
Improve hierarchy information accuracy in IMAP browser
Currently the IMAP browser relies on LIST and LSUB (for listing subscribed
folders) which may not provide the required hierarchy information.
RFC3348 section 3 goes as far as stating that a client mustn't rely on LSUB
for hierarchy information.
This patch implements the LIST command extensions specified in RFC5258
requiring that a server must respond with hierarchy information for
listed folders (whether or not filtering on subscribed folders).
Kevin McCarthy [Tue, 30 Oct 2018 18:53:37 +0000 (11:53 -0700)]
Add a flag for dynamic date range evaluation in patterns
By default, Mutt evaluates relative date patterns, such as "~d<1d"
against the date when the pattern is compiled.
For index-format-hook, we need to pattern match against a message
based on the current date/time, so that for example, conditional date
format patterns correctly match after Mutt has been open for many
days/weeks.
Add a flag, MUTT_PATTERN_DYNAMIC, that changes ~d and ~r evaluation to
reevaluate the min/max range with each match.
This will of course be slower, but for the index, where a screenful of
messages at a time are evaluated, is an acceptable tradeoff against
accurate pattern matching.
Pietro Cerutti [Wed, 17 Apr 2019 09:29:31 +0000 (09:29 +0000)]
Make buffer pool initialization lazy
This fixes an issue in the startup sequence where a buffer is requested
from the buffer pool before mutt_buffer_pool_init is called. The latter
doubles up the number of buffers even though there are free ones.
Richard Russon [Sun, 14 Apr 2019 14:30:23 +0000 (15:30 +0100)]
fix Mailbox->append,changed flags
Replying to an email caused some unwanted side-effects:
- Updating the Context left `m->changed == false`
- `mutt_write_fcc()` left `m->append == true`
Richard Russon [Tue, 2 Apr 2019 12:50:16 +0000 (12:50 +0000)]
fix trash_append()
Prevent a crash when reopening a Mailbox.
> How exactly do these changes prevent the crash from occurring?
It's all about how mx_mbox_open() handles flags. These four examples
are where we have a Mailbox open in 'normal' mode and try to open it
again in 'append' mode.
'Append' mode only makes sense for 'mbox' and 'compress', but the flag
affects mx_mbox_open(). It causes the function to create a duplicate
Mailbox, which is then used and discarded. The original Mailbox is now
out of sync.
The workaround, simply hides the flag for mx_mbox_open(), but
temporarily sets the internal bool append. This means that we work with
one Mailbox.
Richard Russon [Tue, 2 Apr 2019 12:47:27 +0000 (12:47 +0000)]
fix pop_fetch_mail()
Prevent a crash when reopening a Mailbox.
> How exactly do these changes prevent the crash from occurring?
It's all about how mx_mbox_open() handles flags. These four examples
are where we have a Mailbox open in 'normal' mode and try to open it
again in 'append' mode.
'Append' mode only makes sense for 'mbox' and 'compress', but the flag
affects mx_mbox_open(). It causes the function to create a duplicate
Mailbox, which is then used and discarded. The original Mailbox is now
out of sync.
The workaround, simply hides the flag for mx_mbox_open(), but
temporarily sets the internal bool append. This means that we work with
one Mailbox.
Richard Russon [Tue, 2 Apr 2019 12:39:06 +0000 (12:39 +0000)]
fix save_message()
Prevent a crash when reopening a Mailbox.
> How exactly do these changes prevent the crash from occurring?
It's all about how mx_mbox_open() handles flags. These four examples
are where we have a Mailbox open in 'normal' mode and try to open it
again in 'append' mode.
'Append' mode only makes sense for 'mbox' and 'compress', but the flag
affects mx_mbox_open(). It causes the function to create a duplicate
Mailbox, which is then used and discarded. The original Mailbox is now
out of sync.
The workaround, simply hides the flag for mx_mbox_open(), but
temporarily sets the internal bool append. This means that we work with
one Mailbox.
Richard Russon [Mon, 1 Apr 2019 14:09:14 +0000 (14:09 +0000)]
fix ev_message()
Prevent a crash when reopening a Mailbox.
> How exactly do these changes prevent the crash from occurring?
It's all about how mx_mbox_open() handles flags. These four examples
are where we have a Mailbox open in 'normal' mode and try to open it
again in 'append' mode.
'Append' mode only makes sense for 'mbox' and 'compress', but the flag
affects mx_mbox_open(). It causes the function to create a duplicate
Mailbox, which is then used and discarded. The original Mailbox is now
out of sync.
The workaround, simply hides the flag for mx_mbox_open(), but
temporarily sets the internal bool append. This means that we work with
one Mailbox.