]> granicus.if.org Git - neomutt/log
neomutt
6 years agodrop unnec casts
Richard Russon [Tue, 4 Sep 2018 17:20:48 +0000 (18:20 +0100)]
drop unnec casts

6 years agoDo not let libintl.h override setlocale
Dapeng Gao [Thu, 9 Aug 2018 02:28:24 +0000 (10:28 +0800)]
Do not let libintl.h override setlocale

6 years agomerge: update translations
Richard Russon [Tue, 4 Sep 2018 01:22:08 +0000 (02:22 +0100)]
merge: update translations

 * Update zh_CN translation
 * trans: add missing ngettext
 * Update lt_LT translation
 * Fix translation error
 * add Finnish translation
 * Added dutch translations
 * More dutch translation fixes
 * sync translations

6 years agosync translations
Richard Russon [Tue, 4 Sep 2018 01:15:40 +0000 (02:15 +0100)]
sync translations

6 years agoMore dutch translation fixes
Winderickx Eli (p087068) [Mon, 3 Sep 2018 19:15:22 +0000 (21:15 +0200)]
More dutch translation fixes

6 years agoAdded dutch translations
Winderickx Eli (p087068) [Mon, 3 Sep 2018 16:47:16 +0000 (18:47 +0200)]
Added dutch translations

6 years agoadd Finnish translation
Flammie Pirinen [Tue, 28 Aug 2018 22:27:56 +0000 (23:27 +0100)]
add Finnish translation

6 years agoFix translation error
Daniel Schmitz [Tue, 21 Aug 2018 05:44:36 +0000 (12:44 +0700)]
Fix translation error

6 years agoUpdate lt_LT translation
Marius Gedminas [Fri, 17 Aug 2018 13:04:43 +0000 (16:04 +0300)]
Update lt_LT translation

Unfuzz a message that became plural.

6 years agotrans: add missing ngettext
Richard Russon [Fri, 17 Aug 2018 00:13:05 +0000 (01:13 +0100)]
trans: add missing ngettext

6 years agoUpdate zh_CN translation
Zero King [Mon, 13 Aug 2018 05:08:44 +0000 (05:08 +0000)]
Update zh_CN translation

6 years agomerge: Use Mailbox members from Context
Richard Russon [Tue, 4 Sep 2018 00:40:59 +0000 (01:40 +0100)]
merge: Use Mailbox members from Context

 * Context ptr to Mailbox
 * move realpath
 * move path
 * move msgcount
 * move unread
 * move flagged
 * move magic

6 years agomove magic
Richard Russon [Thu, 30 Aug 2018 16:19:13 +0000 (17:19 +0100)]
move magic

6 years agomove flagged
Richard Russon [Thu, 30 Aug 2018 16:09:19 +0000 (17:09 +0100)]
move flagged

6 years agomove unread
Richard Russon [Thu, 30 Aug 2018 16:01:23 +0000 (17:01 +0100)]
move unread

6 years agomove msgcount
Richard Russon [Thu, 30 Aug 2018 15:54:58 +0000 (16:54 +0100)]
move msgcount

6 years agomove path
Richard Russon [Wed, 29 Aug 2018 20:37:15 +0000 (21:37 +0100)]
move path

6 years agomove realpath
Richard Russon [Wed, 29 Aug 2018 16:58:41 +0000 (17:58 +0100)]
move realpath

6 years agoContext ptr to Mailbox
Richard Russon [Wed, 29 Aug 2018 10:13:21 +0000 (11:13 +0100)]
Context ptr to Mailbox

6 years agomerge: upstream CONDSTORE and QRESYNC
Richard Russon [Mon, 3 Sep 2018 23:53:24 +0000 (00:53 +0100)]
merge: upstream CONDSTORE and QRESYNC

 * Add basic CONDSTORE support when fetching initial messages.
 * Add utility functions for QRESYNC support.
 * Add QRESYNC support.
 * Add more doc for the $imap_condstore and $imap_qresync options.
 * Only sync CONDSTORE and QRESYNC on the initial download.
 * Allow ctrl-c to interrupt initial IMAP header download.
 * Fix nested macro warning.
 * tidy upstream changes

6 years agotidy upstream changes
Richard Russon [Mon, 3 Sep 2018 15:50:13 +0000 (16:50 +0100)]
tidy upstream changes

6 years agoFix nested macro warning.
Kevin McCarthy [Tue, 21 Aug 2018 22:51:09 +0000 (15:51 -0700)]
Fix nested macro warning.

Pull the #if/#else outside of the snprintf in imap.c.  On some
platforms, snprintf is a macro itself, which leads to a warning about
undefined behavior.

Thanks to Charles Diza for pointing out the problem.

6 years agoAllow ctrl-c to interrupt initial IMAP header download.
Kevin McCarthy [Wed, 15 Aug 2018 23:13:45 +0000 (16:13 -0700)]
Allow ctrl-c to interrupt initial IMAP header download.

Once the mailbox is open, it is significantly more complicated to
abort and keep Mutt from crashing.  But during the initial
open/download Mutt is prepared to close the mailbox cleanly on
failure.

6 years agoOnly sync CONDSTORE and QRESYNC on the initial download.
Kevin McCarthy [Mon, 13 Aug 2018 16:43:55 +0000 (09:43 -0700)]
Only sync CONDSTORE and QRESYNC on the initial download.

In the midst of the imap_read_headers() refactor, I forgot to put this
guard on the /MODSEQ and /UIDSEQSET storage.

Because we don't deal with flag sync issues while the mailbox is open,
or when it closes, we only want to write those values to the header
cache during the initial download.

It makes no sense to perform all the header cache work if new messages
come into an open empty mailbox, so add a parameter to flag the
initial download, rather than check for msn_begin==1.

6 years agoAdd more doc for the $imap_condstore and $imap_qresync options.
Kevin McCarthy [Sun, 12 Aug 2018 02:14:10 +0000 (19:14 -0700)]
Add more doc for the $imap_condstore and $imap_qresync options.

6 years agoAdd QRESYNC support.
Kevin McCarthy [Sat, 26 May 2018 23:02:04 +0000 (16:02 -0700)]
Add QRESYNC support.

Refactor imap_read_headers() to break into functions for the different
queries.

Move uid_hash population to the same place msn_index is populated.

Change the VANISHED handler to not decrement MSNs for EARLIER.
FastMail, at least, does assume there are no gaps, and really it makes
no sense for there to be.  Further testing will be needed.

6 years agoAdd utility functions for QRESYNC support.
Kevin McCarthy [Thu, 24 May 2018 20:26:35 +0000 (13:26 -0700)]
Add utility functions for QRESYNC support.

* Add function to generate uid_seqset for header cache.
  This will be used by QREFRESH to reconstruct the msn_index state.

* Add seqset data structure and iterator functions.

* Add cmd_parse_vanished, for QRESYNC support.

* Add and enable QRESYNC capability.

* Create helper functions to store and retrieve the uid_seqset.

6 years agoAdd basic CONDSTORE support when fetching initial messages.
Kevin McCarthy [Tue, 15 May 2018 01:12:39 +0000 (18:12 -0700)]
Add basic CONDSTORE support when fetching initial messages.

Store MODSEQ in the header cache, and use that to perform a "FETCH
CHANGEDSINCE" for header updates when initially downloading messages.

Further improvements could be made to add support when syncing.
Handling MODSEQ for FLAG updates while the mailbox is open would be
complicated by the fact that Mutt supports locally modified headers,
so we couldn't accept the new (or subsequent) MODSEQ.

However, this initial step may at least provide some benefit when
opening the mailbox, which is generally the most time and data
intensive.

6 years agomerge: upstream OAUTHBEARER
Richard Russon [Mon, 3 Sep 2018 15:35:14 +0000 (16:35 +0100)]
merge: upstream OAUTHBEARER

 * Initial support for OAUTHBEARER for IMAP.
 * Support for using OAUTHBEARER for smtp.
 * Remove uninitialized warning for mutt_get_stat_timespec().
 * Improve OAUTHBEARER support.
 * tidy upstream changes
 * reorganise smtp auth_plain

6 years agoreorganise smtp auth_plain
Richard Russon [Mon, 3 Sep 2018 15:27:21 +0000 (16:27 +0100)]
reorganise smtp auth_plain

6 years agotidy upstream changes
Richard Russon [Mon, 3 Sep 2018 13:58:34 +0000 (14:58 +0100)]
tidy upstream changes

6 years agoinitialise timespecs
Richard Russon [Mon, 3 Sep 2018 13:48:51 +0000 (14:48 +0100)]
initialise timespecs

6 years agomerge: upstream inotify
Richard Russon [Mon, 3 Sep 2018 13:19:46 +0000 (14:19 +0100)]
merge: upstream inotify

 * add feature file monitoring with Linux inotify
 * Change direct mutt_getch() callers to handle new mail event.
 * Add new timeout functions to work with inotify monitors.
 * Quick fix for ncurses buffering issue with inotify polling.
 * Move mutt_getch() timeout value into curs_lib.c
 * Convert context and buffy to use nanosecond timestamps.
 * Work around open mailbox monitor code check issue.
 * Fix MonitorContextDescriptor update on removal.
 * Reset all MonitorContext state on context removal.
 * tidy upstream changes

6 years agotidy upstream changes
Richard Russon [Mon, 3 Sep 2018 01:29:51 +0000 (02:29 +0100)]
tidy upstream changes

6 years agoReset all MonitorContext state on context removal.
Kevin McCarthy [Wed, 27 Jun 2018 16:27:05 +0000 (09:27 -0700)]
Reset all MonitorContext state on context removal.

Reset both the descriptor and changed flag when the current context is
removed.  Don't make this dependent on the context being valid or
being found by monitor_resolve(), in case the context was closed due
to some type of error condition.

6 years agoFix MonitorContextDescriptor update on removal.
Kevin McCarthy [Wed, 27 Jun 2018 02:48:25 +0000 (19:48 -0700)]
Fix MonitorContextDescriptor update on removal.

Reset the context descriptor before checking for the monitor being
shared by another mailbox.  Technically, it would be set properly
during the next add, but it shouldn't be left incorrect.

6 years agoWork around open mailbox monitor code check issue.
Kevin McCarthy [Tue, 26 Jun 2018 00:54:43 +0000 (17:54 -0700)]
Work around open mailbox monitor code check issue.

The monitor code is too fast, and can result in all the changes for a
single directory stat update being missed.

Work around this issue by not recording stat time updates when the
check_mailbox() is triggered by the monitor.  This will cause the next
subsequent check to take another look.

6 years agoConvert context and buffy to use nanosecond timestamps.
Kevin McCarthy [Thu, 14 Jun 2018 08:17:56 +0000 (16:17 +0800)]
Convert context and buffy to use nanosecond timestamps.

The inotify interface has an unfortunate side effect of making Mutt
react too quickly to new mail.  Sometimes, the mail is only
half-delivered when the mailbox is checked.  Because Mutt is using the
stat mtime - seconds resolution - this means it won't realize there
are more messages delivered during the same second.

Nanosecond resolution fields were standardized in POSIX.1-2008, so
check for and use those if they are available.

6 years agoMove mutt_getch() timeout value into curs_lib.c
Kevin McCarthy [Sun, 10 Jun 2018 00:51:30 +0000 (08:51 +0800)]
Move mutt_getch() timeout value into curs_lib.c

Change monitor.c to reference the curs_lib value, instead of
vice-versa.

We need to store the value for both monitor.c's poll and for
mutt_monitor_ch() to perform an initial non-blocking check of ncurses'
getch() buffer.

6 years agoQuick fix for ncurses buffering issue with inotify polling.
Kevin McCarthy [Wed, 6 Jun 2018 00:38:44 +0000 (17:38 -0700)]
Quick fix for ncurses buffering issue with inotify polling.

Ncurses does its own buffering for some character sequences, notable
Esc-prefixed input.  Add a non-blocking check for getch() before
performing the mutt_monitor_poll() call.

This is a quick fix, which I'll clean up more later.

6 years agoAdd new timeout functions to work with inotify monitors.
Kevin McCarthy [Mon, 4 Jun 2018 01:34:21 +0000 (18:34 -0700)]
Add new timeout functions to work with inotify monitors.

The ncurses timeout() function doesn't affect the new poll inside
mutt_monitor_poll().  This meant that $imap_keepalive and $timeout
were not being respected when the monitor was used.

Create mutt_getch_timeout(), which delegates to timeout() and sets a
timeout value mutt_monitor_poll() uses too.

6 years agoChange direct mutt_getch() callers to handle new mail event.
Kevin McCarthy [Sun, 3 Jun 2018 21:05:13 +0000 (14:05 -0700)]
Change direct mutt_getch() callers to handle new mail event.

The inotify handler now returns -2 (timeout) on a new mail event.
Change the direct callers to ignore, so prompts aren't strangely
aborted.

Also, fix mutt_change_flag() to call mutt_refresh() before the
prompt.  Apparently ncurses getch() was doing this for us, but now
that we are polling STDIN instead, the prompt wasn't displaying.

6 years agoadd feature file monitoring with Linux inotify
gt_16_gitlab.com@innocircle.com [Sun, 3 Jun 2018 20:23:57 +0000 (20:23 +0000)]
add feature file monitoring with Linux inotify

6 years agomerge: upstream fixes
Richard Russon [Mon, 3 Sep 2018 01:01:42 +0000 (02:01 +0100)]
merge: upstream fixes

 * Convert certificate prompts to show sha-256 instead of md5.
 * Fix typo
 * Clean up documentation link targets.
 * Change compress examples to type "example" rather than "sect4".

6 years agoChange compress examples to type "example" rather than "sect4".
Kevin McCarthy [Sun, 2 Sep 2018 21:43:04 +0000 (14:43 -0700)]
Change compress examples to type "example" rather than "sect4".

6 years agoClean up documentation link targets.
Kevin McCarthy [Sun, 2 Sep 2018 21:22:09 +0000 (14:22 -0700)]
Clean up documentation link targets.

Move link targets for iconv-hook and sidebar_whitelist to the
beginning of a section, rather than a link embedded inside a command.

6 years agoFix typo
Cody Brownstein [Sat, 1 Sep 2018 16:47:07 +0000 (09:47 -0700)]
Fix typo

6 years agoConvert certificate prompts to show sha-256 instead of md5.
Kevin McCarthy [Fri, 31 Aug 2018 22:50:00 +0000 (15:50 -0700)]
Convert certificate prompts to show sha-256 instead of md5.

Due to the length of the sha-256 fingerprint, split the output into
two lines.

Note that this change now requires OpenSSL 0.9.8+ [2005-07-05], and
GnuTLS 1.7.4+ [2007-02-05].

6 years agotidy upstream changes
Richard Russon [Sun, 2 Sep 2018 22:22:11 +0000 (23:22 +0100)]
tidy upstream changes

6 years agomerge: upstream fixes
Richard Russon [Sat, 1 Sep 2018 17:59:12 +0000 (18:59 +0100)]
merge: upstream fixes

 * crypt-gpgme: prevent crash on bad S/MIME signature
 * Void passphrase on s/mime decryption error
 * smime_handle_entity() cleanup
 * Mention $pgp_decode_command for $pgp_check_gpg_decrypt_status_fd
 * Minor documentation fix
 * Display matching new messages in a thread-limited index
 * Bug fix: reset ctx->vsize in update_index_unthreaded on reopened mailbox
 * Improved limit-to-all detection by skipping leading spaces of the pattern
 * Add ctx->vsize = 0 in a couple of places
 * Handle reopen/new_mail when closing mailbox in <imap-logout-all>
 * Skip sort in mbox_sync_mailbox() when new/reopen occurs
 * Add mx_ops.msg_padding_size to return the padding for a mx type
 * Add message padding to ctx->vsize computation
 * Fix AUXSORT usage in compare_spam
 * Fix -z and -Z options to work with IMAP
 * Create mutt_buffer_increase_size() function
 * Always check UID vs MSN when handling FETCH
 * Refactor out mutt_is_quote_line()
 * Don't match $abort_noattach_regexp on quoted lines
 * Remove legacy trim_incomplete_mbyte() in the pager
 * Remove compare_stat() call in safe_rename()
 * Display an error message if syncing fails
 * Change $query_format to use mutt_format_s
 * Fix alias documentation examples
 * Add additional error handling to safe_rename()
 * Remove extra lstats() in safe_rename() upon link success
 * Add compose-to-sender functionality.

6 years agoAdd compose-to-sender functionality.
Kevin McCarthy [Wed, 22 Aug 2018 22:07:45 +0000 (15:07 -0700)]
Add compose-to-sender functionality.

This patch is loosely based on the NeoMutt feature, but adds in
support for the attach menu, reuses functionality in send.c, and has
proper mode checks.

Thanks to Enno for the opening the ticket requesting the port.

6 years agoclang-format
Richard Russon [Sat, 1 Sep 2018 09:32:04 +0000 (10:32 +0100)]
clang-format

6 years agoRemove extra lstats() in safe_rename() upon link success
Kevin McCarthy [Wed, 29 Aug 2018 20:00:14 +0000 (13:00 -0700)]
Remove extra lstats() in safe_rename() upon link success

I originally kept the lstat()'s in order to make as few changes as
possible to the function.  However, Derek Martin argues correctly that
if we are trusting the link() 0-retval, the lstats are unnecessary and
in fact can cause a performance impact over NFS.

6 years agoAdd additional error handling to safe_rename()
Kevin McCarthy [Mon, 27 Aug 2018 01:43:20 +0000 (18:43 -0700)]
Add additional error handling to safe_rename()

It is apparently possible for link() to return an error but the link
to still be created.  Add a double check for that case.  If the files
match, unlink the src and return success.

6 years agoFix alias documentation examples
Kevin McCarthy [Sun, 26 Aug 2018 23:08:06 +0000 (16:08 -0700)]
Fix alias documentation examples

Thanks to Cody Brownstein for pointing out the problem.

6 years agoChange $query_format to use mutt_format_s
Kevin McCarthy [Fri, 24 Aug 2018 22:49:49 +0000 (15:49 -0700)]
Change $query_format to use mutt_format_s

Use the character-cell width functions so that multibyte output is
properly formatted.

6 years agoDisplay an error message if syncing fails
Kevin McCarthy [Fri, 24 Aug 2018 19:56:54 +0000 (12:56 -0700)]
Display an error message if syncing fails

Ticket 36 reported an issue where a maildir was removed while the
mailbox was opened.  Later, attempting to sync displayed the message
"Writing xxx...", which remained on the screen.  The reporter actually
thought mutt was frozen, but it was simply that on a sync error Mutt
wasn't clearing or updating the message window.

There is some error message handling for mbox.c check_mailbox, but I
don't think that is the right place to further propogate messages.
Instead, add an error to the same place the initial "Writing..."
message is created.

6 years agoRemove compare_stat() call in safe_rename()
Kevin McCarthy [Tue, 14 Aug 2018 21:31:34 +0000 (14:31 -0700)]
Remove compare_stat() call in safe_rename()

Some filesystems, such as sshfs, implement hard links strangely.  The
hard link is created, but is represented by a different inode number
by the sshfs layer.  The current maildir code goes into an infinite
loop in this case.  Remove the compare_stat() and trust that a link()
return code of 0 means the link really did get created.  Still, keep
the stats just as a minor check.

6 years agoRemove legacy trim_incomplete_mbyte() in the pager
Kevin McCarthy [Tue, 14 Aug 2018 21:04:05 +0000 (14:04 -0700)]
Remove legacy trim_incomplete_mbyte() in the pager

Commit 4b1deb57 added the trim_incomplete_mbyte() call, but at
that time, the function was using fgets() into a fixed-sized
buffer.  The function was passing in "blen - 1" to the size
parameter of fgets, so the check for blen-2 was to see if the
buffer was completely filled by the fgets.

Commit d39d9c0c converted to use a dynamic buffer, but the
trim_incomplete_mbyte() was left in.  It now serves no purpose
because the entire line will be read in.  Presumably the buggy
regexp lib should have been fixed by now too.

6 years agoDon't match $abort_noattach_regexp on quoted lines
Kevin McCarthy [Tue, 14 Aug 2018 02:02:32 +0000 (19:02 -0700)]
Don't match $abort_noattach_regexp on quoted lines

6 years agoRefactor out mutt_is_quote_line()
Kevin McCarthy [Tue, 14 Aug 2018 01:56:37 +0000 (18:56 -0700)]
Refactor out mutt_is_quote_line()

This makes resolve_types() a tiny bit clearer, and will be usable by
$abort_noattach.

6 years agoAlways check UID vs MSN when handling FETCH
Kevin McCarthy [Sun, 12 Aug 2018 00:59:54 +0000 (17:59 -0700)]
Always check UID vs MSN when handling FETCH

Ensure the UID vs MSN check is always done before flags are processed,
not just if the UID happened to appear before the FLAGS.

Improve the debug messages to make it clearer why a fetch response is
being skipped.

6 years agoCreate mutt_buffer_increase_size() function
Kevin McCarthy [Sat, 26 May 2018 21:46:16 +0000 (14:46 -0700)]
Create mutt_buffer_increase_size() function

This will allow preallocating buffers that we know are going to be
big for qresync support.

This will also be useful for buffer pools later on.

6 years agoFix -z and -Z options to work with IMAP
Kevin McCarthy [Sat, 28 Jul 2018 22:26:34 +0000 (15:26 -0700)]
Fix -z and -Z options to work with IMAP

-Z did not work if $imap_passive was set (the default).  I think using
the option implies the desire to open a new connection and check
buffy at startup, so temporarily turn it off during the buffy.

-z was not hooked up for IMAP.  Change it to call imap_status().  This
also requires $imap_passive be unset, so temporarily turn the option
off too.

6 years agoFix AUXSORT usage in compare_spam
Kevin McCarthy [Sat, 28 Jul 2018 19:59:35 +0000 (12:59 -0700)]
Fix AUXSORT usage in compare_spam

AUXSORT already checks if the first parameter is zero.

Additionally, the macro expands into more than one statement, so
putting inside an unbracketed if is misleading and generates a
warning on the latest gcc.

Fortunately, both statements checked if the first parameter was zero,
so no actual bug resulted.

6 years agoAdd message padding to ctx->vsize computation
Kevin McCarthy [Thu, 26 Jul 2018 01:16:34 +0000 (18:16 -0700)]
Add message padding to ctx->vsize computation

Use the mx_msg_padding_size() from the previous commit to be more
precise about the correct vsize.

This avoids strange situations where all the message are displayed in
a limit, but the vsize is not equal to the size.

6 years agoAdd mx_ops.msg_padding_size to return the padding for a mx type
Kevin McCarthy [Thu, 26 Jul 2018 00:52:40 +0000 (17:52 -0700)]
Add mx_ops.msg_padding_size to return the padding for a mx type

Mbox pads with a 1 byte, while mmdf pads with 10.  Because compress
depends on the child type, we create a mx_ops, which allows compress.c
to delegate to the child ops.

6 years agoSkip sort in mbox_sync_mailbox() when new/reopen occurs
Kevin McCarthy [Wed, 25 Jul 2018 01:23:25 +0000 (18:23 -0700)]
Skip sort in mbox_sync_mailbox() when new/reopen occurs

Callers of mx_sync_mailbox() and mx_close_mailbox() already check for
those cases and call update_index().  So remove the need_sort flag
setting when mbox_check_mailbox() returns new/reopen inside
mbox_sync_mailbox().

6 years agoHandle reopen/new_mail when closing mailbox in <imap-logout-all>
Kevin McCarthy [Wed, 25 Jul 2018 01:12:20 +0000 (18:12 -0700)]
Handle reopen/new_mail when closing mailbox in <imap-logout-all>

Other callers, such as OP_QUIT, OP_MAIN_CHANGE_FOLDER, and
OP_MAIN_SYNC_FOLDER handle the case where a sync or close_mailbox
fails due to new mail or a reopen.

OP_MAIN_LOGOUT_ALL appears to have been accidentally missed.  Add a
call to update_index() to properly sort and update vcounts.

6 years agoAdd ctx->vsize = 0 in a couple of places
Vincent Lefevre [Tue, 24 Jul 2018 01:52:41 +0000 (03:52 +0200)]
Add ctx->vsize = 0 in a couple of places

It is not clear whether this is needed, but in both cases, the old value
(if not 0) is obsolete. If there is a bug somewhere else about vsize, it
will be easier to notice it.

6 years agoImproved limit-to-all detection by skipping leading spaces of the pattern
Vincent Lefevre [Sun, 22 Jul 2018 00:57:32 +0000 (02:57 +0200)]
Improved limit-to-all detection by skipping leading spaces of the pattern

There are many equivalent limit-to-all patterns, but in practice, one
may want to limit to " ~A" in order to prevent the pattern from being
recorded in the history. Thus it is important to detect at least this
pattern and similar ones.

6 years agoBug fix: reset ctx->vsize in update_index_unthreaded on reopened mailbox
Vincent Lefevre [Sat, 21 Jul 2018 23:46:03 +0000 (01:46 +0200)]
Bug fix: reset ctx->vsize in update_index_unthreaded on reopened mailbox

This fixes a bug observed when doing the following:
1. Start Mutt on some mailbox.
2. Limit the view.
3. Set sort by date (thus unthreaded).
4. Set $status_format to display the size of the messages shown (%L).
5. Copy a message matching the limit pattern to this mailbox.
6. With another Mutt instance, remove this message from this mailbox.
7. Move the cursor to update the view.
Result: one was getting a value equal to twice the initial size.

6 years agoDisplay matching new messages in a thread-limited index
Kevin McCarthy [Fri, 20 Jul 2018 03:28:38 +0000 (20:28 -0700)]
Display matching new messages in a thread-limited index

Previously, the index performed pattern matching first, and then
resorted new mail.  The problem was that thread-limiting patterns,
e.g. ~(pattern), require threading data to properly match against the
new messages.

We already save new messages for the purposes of uncollapsing threads.
To keep the code cleaner, split off update_index() into
update_index_threaded()/unthreaded().  Then for threaded mode, save
the new messages first.  We can then sort (before pattern matching),
and use the save_new array to pattern match the new messages
afterwards.

The $uncollapse_new loop was unnecessarily performing a n^2 search.
Simplify to just iteratate over the save_new instead.

6 years agoMinor documentation fix
Kevin McCarthy [Tue, 17 Jul 2018 17:04:24 +0000 (10:04 -0700)]
Minor documentation fix

6 years agoMention $pgp_decode_command for $pgp_check_gpg_decrypt_status_fd
Kevin McCarthy [Sun, 8 Jul 2018 02:32:57 +0000 (19:32 -0700)]
Mention $pgp_decode_command for $pgp_check_gpg_decrypt_status_fd

It scans $pgp_decode_command for inline and application/pgp mime
types.

6 years agosmime_handle_entity() cleanup
Kevin McCarthy [Mon, 2 Jul 2018 03:43:24 +0000 (20:43 -0700)]
smime_handle_entity() cleanup

Remove redundant NULL assignments after safe_fclose() calls.

Remove some trailing spaces.

smimeout can't be NULL, so remove the check around the output
translation block.

6 years agoVoid passphrase on s/mime decryption error
Kevin McCarthy [Mon, 2 Jul 2018 03:13:11 +0000 (20:13 -0700)]
Void passphrase on s/mime decryption error

Model this after pgp's pgp_decrypt_part(), which checks if fpout is
empty.

6 years agocrypt-gpgme: prevent crash on bad S/MIME signature
Philipp Gesang [Mon, 18 Jun 2018 09:21:38 +0000 (11:21 +0200)]
crypt-gpgme: prevent crash on bad S/MIME signature

Inform the user about the fingerprint being unavailable instead
of crashing if the S/MIME signature is bad.

6 years agoadd lots of consts
Richard Russon [Fri, 31 Aug 2018 14:10:44 +0000 (15:10 +0100)]
add lots of consts

6 years agomerge: minor fixes
Richard Russon [Fri, 31 Aug 2018 23:18:43 +0000 (00:18 +0100)]
merge: minor fixes

 * warn when logging at the highest level
 * boolify locals of mutt_select_file()
 * buf,buflen for menu_make_entry()
 * fix comment for nntp_expand_path()
 * doxygen: mailbox backends
 * doc: add maildir note for new mail feature
 * doxy: fix imap config descriptions

6 years agodoxy: fix imap config descriptions
Richard Russon [Fri, 31 Aug 2018 23:10:45 +0000 (00:10 +0100)]
doxy: fix imap config descriptions

6 years agodoc: add maildir note for new mail feature
Richard Russon [Fri, 31 Aug 2018 15:35:09 +0000 (16:35 +0100)]
doc: add maildir note for new mail feature

6 years agodoxygen: mailbox backends
Richard Russon [Fri, 31 Aug 2018 15:26:18 +0000 (16:26 +0100)]
doxygen: mailbox backends

6 years agofix comment for nntp_expand_path()
Richard Russon [Fri, 31 Aug 2018 14:53:03 +0000 (15:53 +0100)]
fix comment for nntp_expand_path()

6 years agobuf,buflen for menu_make_entry()
Richard Russon [Fri, 31 Aug 2018 14:50:22 +0000 (15:50 +0100)]
buf,buflen for menu_make_entry()

6 years agoboolify locals of mutt_select_file()
Richard Russon [Fri, 31 Aug 2018 14:48:22 +0000 (15:48 +0100)]
boolify locals of mutt_select_file()

6 years agowarn when logging at the highest level
Richard Russon [Fri, 31 Aug 2018 13:29:46 +0000 (14:29 +0100)]
warn when logging at the highest level

6 years agorelease build fixes
Richard Russon [Tue, 28 Aug 2018 22:04:05 +0000 (23:04 +0100)]
release build fixes

6 years agomerge: simplify mx_mbox_open, mx_mbox_close
Richard Russon [Mon, 27 Aug 2018 22:40:30 +0000 (23:40 +0100)]
merge: simplify mx_mbox_open, mx_mbox_close

 * don't use mx_open's Context parameter
 * drop mx_open's Context parameter
 * free on mx_mbox_close

6 years agofree on mx_mbox_close
Richard Russon [Mon, 27 Aug 2018 20:35:07 +0000 (21:35 +0100)]
free on mx_mbox_close

6 years agodrop mx_open's Context parameter
Richard Russon [Mon, 27 Aug 2018 18:53:56 +0000 (19:53 +0100)]
drop mx_open's Context parameter

6 years agodon't use mx_open's Context parameter
Richard Russon [Mon, 27 Aug 2018 17:22:35 +0000 (18:22 +0100)]
don't use mx_open's Context parameter

6 years agovery minor fixes
Richard Russon [Sun, 26 Aug 2018 23:35:33 +0000 (00:35 +0100)]
very minor fixes

- put listener prototype in the right header
- update list of message files
- fix comments

6 years agofix config error reporting
Richard Russon [Fri, 24 Aug 2018 00:33:33 +0000 (01:33 +0100)]
fix config error reporting

6 years agoclean up on exit
Richard Russon [Sun, 26 Aug 2018 23:28:55 +0000 (00:28 +0100)]
clean up on exit

6 years agoAttempt to fix the code path to create a new mbox
Pietro Cerutti [Mon, 27 Aug 2018 07:51:46 +0000 (07:51 +0000)]
Attempt to fix the code path to create a new mbox

6 years agoFix IMAP probe
Pietro Cerutti [Mon, 27 Aug 2018 07:34:41 +0000 (07:34 +0000)]
Fix IMAP probe

6 years agomerge: add path functions to mailbox API
Richard Russon [Sun, 26 Aug 2018 21:13:21 +0000 (22:13 +0100)]
merge: add path functions to mailbox API

 * add name and magic to MxOps
 * add MxOps:path_probe()
 * improve mutt_path_canon
 * stubs for mx_path_{canon,pretty}
 * add mutt_str_inline_replace()
 * delegate mx_path_canon()
 * factor Folder out of imap_pretty_mailbox
 * add mutt_path_abbr_folder
 * fill out mx_path_pretty()
 * improve mutt_path_parent
 * add MxOps:path_parent()
 * tidy mx
 * use mx_path_probe()
 * probe notmuch
 * probe nntp
 * probe pop
 * probe imap
 * probe maildir

6 years agoprobe maildir
Richard Russon [Sun, 26 Aug 2018 16:05:05 +0000 (17:05 +0100)]
probe maildir

6 years agoprobe imap
Richard Russon [Sat, 25 Aug 2018 16:50:56 +0000 (17:50 +0100)]
probe imap