]> granicus.if.org Git - neomutt/log
neomutt
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 agoclang-format
Richard Russon [Sat, 1 Sep 2018 09:32:04 +0000 (10:32 +0100)]
clang-format

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

6 years agoprobe pop
Richard Russon [Sat, 25 Aug 2018 16:46:41 +0000 (17:46 +0100)]
probe pop

6 years agoprobe nntp
Richard Russon [Sat, 25 Aug 2018 16:44:05 +0000 (17:44 +0100)]
probe nntp

6 years agoprobe notmuch
Richard Russon [Sat, 25 Aug 2018 16:39:31 +0000 (17:39 +0100)]
probe notmuch

6 years agouse mx_path_probe()
Richard Russon [Sat, 25 Aug 2018 14:35:45 +0000 (15:35 +0100)]
use mx_path_probe()

6 years agotidy mx
Richard Russon [Sat, 25 Aug 2018 12:52:36 +0000 (13:52 +0100)]
tidy mx

6 years agoadd MxOps:path_parent()
Richard Russon [Sat, 25 Aug 2018 12:35:03 +0000 (13:35 +0100)]
add MxOps:path_parent()

6 years agoimprove mutt_path_parent
Richard Russon [Sat, 25 Aug 2018 12:20:44 +0000 (13:20 +0100)]
improve mutt_path_parent

6 years agofill out mx_path_pretty()
Richard Russon [Fri, 24 Aug 2018 16:09:52 +0000 (17:09 +0100)]
fill out mx_path_pretty()

6 years agoadd mutt_path_abbr_folder
Richard Russon [Sat, 25 Aug 2018 10:47:07 +0000 (11:47 +0100)]
add mutt_path_abbr_folder

6 years agofactor Folder out of imap_pretty_mailbox
Richard Russon [Fri, 24 Aug 2018 16:05:55 +0000 (17:05 +0100)]
factor Folder out of imap_pretty_mailbox

6 years agodelegate mx_path_canon()
Richard Russon [Fri, 24 Aug 2018 14:39:00 +0000 (15:39 +0100)]
delegate mx_path_canon()

6 years agoadd mutt_str_inline_replace()
Richard Russon [Fri, 24 Aug 2018 14:38:55 +0000 (15:38 +0100)]
add mutt_str_inline_replace()

6 years agostubs for mx_path_{canon,pretty}
Richard Russon [Thu, 23 Aug 2018 17:10:06 +0000 (18:10 +0100)]
stubs for mx_path_{canon,pretty}

6 years agoChase a coverity wraning by using the correct STAILQ macro
Pietro Cerutti [Fri, 24 Aug 2018 06:57:31 +0000 (06:57 +0000)]
Chase a coverity wraning by using the correct STAILQ macro

________________________________________________________________________________________________________
*** CID 187781:  Control flow issues  (DEADCODE)
/mutt/regex.c: 142 in mutt_regexlist_add()
136         mutt_buffer_printf(err, "Bad regex: %s\n", str);
137         return -1;
138       }
139
140       /* check to make sure the item is not already on this rl */
141       struct RegexListNode *np = NULL;
>>>     CID 187781:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach the expression "np" inside this statement: "np = (np ? np : rl->stqh_fi...".
142       STAILQ_FOREACH_FROM(np, rl, entries)
143       {
144         if (mutt_str_strcasecmp(rx->pattern, np->regex->pattern) ==
0)
145           break; /* already on the rl */
146       }
147

6 years agoimprove mutt_path_canon
Richard Russon [Thu, 23 Aug 2018 16:31:03 +0000 (17:31 +0100)]
improve mutt_path_canon

- Handle relative paths
- Lots of logging

6 years agoadd MxOps:path_probe()
Richard Russon [Thu, 23 Aug 2018 11:23:32 +0000 (12:23 +0100)]
add MxOps:path_probe()

6 years agoadd name and magic to MxOps
Richard Russon [Wed, 22 Aug 2018 12:38:42 +0000 (13:38 +0100)]
add name and magic to MxOps

6 years agofactor out struct MyVar
Richard Russon [Tue, 21 Aug 2018 18:44:44 +0000 (19:44 +0100)]
factor out struct MyVar

6 years agodrop unused functions
Richard Russon [Tue, 21 Aug 2018 18:24:31 +0000 (19:24 +0100)]
drop unused functions

6 years agofix Group's use of RegexList
Richard Russon [Mon, 20 Aug 2018 09:52:12 +0000 (10:52 +0100)]
fix Group's use of RegexList

6 years agomerge: simple code refactoring
Richard Russon [Sun, 19 Aug 2018 12:44:35 +0000 (13:44 +0100)]
merge: simple code refactoring

 * kill unnecessary != NULL
 * kill unnecessary == NULL
 * drop header-sized ifdefs
 * unify buf,buflen
 * unify buf,buflen, with reordering
 * kill assign-assign

6 years agokill assign-assign
Richard Russon [Sun, 19 Aug 2018 02:30:02 +0000 (03:30 +0100)]
kill assign-assign

6 years agounify buf,buflen, with reordering
Richard Russon [Sun, 19 Aug 2018 01:46:07 +0000 (02:46 +0100)]
unify buf,buflen, with reordering

6 years agounify buf,buflen
Richard Russon [Sun, 19 Aug 2018 01:16:49 +0000 (02:16 +0100)]
unify buf,buflen

6 years agodrop header-sized ifdefs
Richard Russon [Sun, 19 Aug 2018 00:17:47 +0000 (01:17 +0100)]
drop header-sized ifdefs

6 years agokill unnecessary == NULL
Richard Russon [Fri, 17 Aug 2018 01:20:19 +0000 (02:20 +0100)]
kill unnecessary == NULL

6 years agokill unnecessary != NULL
Richard Russon [Fri, 17 Aug 2018 00:47:53 +0000 (01:47 +0100)]
kill unnecessary != NULL

6 years agomerge: conversions to use STAILQ
Richard Russon [Sun, 19 Aug 2018 12:32:06 +0000 (13:32 +0100)]
merge: conversions to use STAILQ

 * Convert RegexList to use STAILQ
 * Refactor RegexList changes
 * Convert ReplaceList to use STAILQ

6 years agoConvert ReplaceList to use STAILQ 1317/head
Richard Russon [Sat, 18 Aug 2018 14:37:13 +0000 (15:37 +0100)]
Convert ReplaceList to use STAILQ

6 years agoRefactor RegexList changes
Richard Russon [Sat, 18 Aug 2018 13:38:30 +0000 (14:38 +0100)]
Refactor RegexList changes

6 years agoConvert RegexList to use STAILQ
Bo YU [Sat, 18 Aug 2018 06:58:18 +0000 (14:58 +0800)]
Convert RegexList to use STAILQ

6 years agomerge: tidy docs
Richard Russon [Sat, 18 Aug 2018 10:59:34 +0000 (11:59 +0100)]
merge: tidy docs

 * doxy: add missing docs
 * drop unnecessary helper function
 * refactor parse functions
 * doxy: add missing comments

6 years agodoxy: add missing comments
Richard Russon [Fri, 17 Aug 2018 20:50:49 +0000 (21:50 +0100)]
doxy: add missing comments

6 years agorefactor parse functions
Richard Russon [Fri, 17 Aug 2018 19:59:35 +0000 (20:59 +0100)]
refactor parse functions

6 years agodrop unnecessary helper function
Richard Russon [Fri, 17 Aug 2018 17:32:37 +0000 (18:32 +0100)]
drop unnecessary helper function

6 years agodoxy: add missing docs
Richard Russon [Fri, 17 Aug 2018 17:31:52 +0000 (18:31 +0100)]
doxy: add missing docs

6 years agoconfig: don't reused constants 1226/head
Richard Russon [Fri, 17 Aug 2018 13:25:42 +0000 (14:25 +0100)]
config: don't reused constants

Fixes #1316

6 years agoprevent buffer underrun in mutt_path_tidy_slash
Richard Russon [Fri, 17 Aug 2018 11:49:00 +0000 (12:49 +0100)]
prevent buffer underrun in mutt_path_tidy_slash

Fixes #1315

6 years agofix leak in rfc2047_decode
Richard Russon [Fri, 17 Aug 2018 11:31:59 +0000 (12:31 +0100)]
fix leak in rfc2047_decode

6 years agomerge: trivial fixes
Richard Russon [Fri, 17 Aug 2018 01:55:58 +0000 (02:55 +0100)]
merge: trivial fixes

 * tidy comments
 * buf,buflen
 * boolify params
 * use mailbox constant
 * pgpring is dead
 * doc: explain (un)virtual-mailboxes

6 years agodoc: explain (un)virtual-mailboxes
Richard Russon [Fri, 17 Aug 2018 00:24:51 +0000 (01:24 +0100)]
doc: explain (un)virtual-mailboxes

6 years agopgpring is dead
Richard Russon [Thu, 16 Aug 2018 23:55:00 +0000 (00:55 +0100)]
pgpring is dead

6 years agouse mailbox constant
Richard Russon [Thu, 16 Aug 2018 23:54:36 +0000 (00:54 +0100)]
use mailbox constant

6 years agoboolify params
Richard Russon [Thu, 16 Aug 2018 23:53:24 +0000 (00:53 +0100)]
boolify params

6 years agobuf,buflen
Richard Russon [Thu, 16 Aug 2018 23:49:15 +0000 (00:49 +0100)]
buf,buflen

6 years agotidy comments
Richard Russon [Fri, 17 Aug 2018 00:10:19 +0000 (01:10 +0100)]
tidy comments

6 years agomerge: minor config fixes
Richard Russon [Thu, 16 Aug 2018 15:28:43 +0000 (16:28 +0100)]
merge: minor config fixes

6 years agouse config code for neomutt -Q
Richard Russon [Thu, 16 Aug 2018 14:35:13 +0000 (15:35 +0100)]
use config code for neomutt -Q

6 years agoconfig: fix display of changed config
Richard Russon [Thu, 16 Aug 2018 14:00:04 +0000 (15:00 +0100)]
config: fix display of changed config

6 years agoconfig: fix dump
Richard Russon [Wed, 8 Aug 2018 15:51:44 +0000 (16:51 +0100)]
config: fix dump

6 years agoconfig: workaround for mailboxes
Richard Russon [Thu, 16 Aug 2018 13:15:50 +0000 (14:15 +0100)]
config: workaround for mailboxes

6 years agoreturn success on neomutt -D
Richard Russon [Thu, 16 Aug 2018 12:42:36 +0000 (13:42 +0100)]
return success on neomutt -D

6 years agobug: check pointer
Richard Russon [Thu, 16 Aug 2018 11:31:40 +0000 (12:31 +0100)]
bug: check pointer

6 years agomove address function to library
Richard Russon [Wed, 15 Aug 2018 14:03:12 +0000 (15:03 +0100)]
move address function to library

6 years agomove expand functions to library
Richard Russon [Wed, 15 Aug 2018 14:03:12 +0000 (15:03 +0100)]
move expand functions to library

6 years agomove realpath to library
Richard Russon [Wed, 15 Aug 2018 12:28:07 +0000 (13:28 +0100)]
move realpath to library

6 years agogroup path functions
Richard Russon [Wed, 15 Aug 2018 11:27:46 +0000 (12:27 +0100)]
group path functions

6 years agoadd pretty/canonical path functions
Richard Russon [Tue, 14 Aug 2018 23:30:51 +0000 (00:30 +0100)]
add pretty/canonical path functions

6 years agoadd path manipulation functions
Richard Russon [Wed, 15 Aug 2018 10:56:43 +0000 (11:56 +0100)]
add path manipulation functions

6 years agodoxy: Config docs
Richard Russon [Thu, 16 Aug 2018 00:11:46 +0000 (01:11 +0100)]
doxy: Config docs

6 years agoconfig: use better failing regex test
Richard Russon [Wed, 15 Aug 2018 09:05:32 +0000 (10:05 +0100)]
config: use better failing regex test

6 years agotest/address.c: remove duplicated include
Vladimir Zakharov [Tue, 14 Aug 2018 21:09:13 +0000 (00:09 +0300)]
test/address.c: remove duplicated include

6 years agomerge: update translations
Richard Russon [Sat, 11 Aug 2018 23:34:11 +0000 (00:34 +0100)]
merge: update translations

6 years agosync translations
Richard Russon [Sat, 11 Aug 2018 23:33:34 +0000 (00:33 +0100)]
sync translations