Anton Rieger [Sat, 23 Sep 2017 17:54:55 +0000 (19:54 +0200)]
bool: convert function parameters in attach.h
* mutt_attach_display_loop()
* mutt_pipe_attachment_list()
* mutt_print_attachment_list()
* mutt_save_attachment_list()
Richard Russon [Tue, 26 Sep 2017 11:00:10 +0000 (12:00 +0100)]
fix: crash looking up mime body type
This is a buffer overrun.
The mime type was being looked up in the BodyTypes table,
but there wasn't an entry for TYPEANY.
Fixes #784
Richard Russon [Sun, 24 Sep 2017 22:35:48 +0000 (23:35 +0100)]
fix: crash in mutt_substrdup
Fixes #780
Richard Russon [Sun, 24 Sep 2017 11:18:25 +0000 (12:18 +0100)]
fix: crash in mbox_to_udomain
Fixes #778
Jakub Wilk [Sat, 23 Sep 2017 15:35:29 +0000 (17:35 +0200)]
Fix off-by-one buffer overflow in add_index_color
Richard Russon [Tue, 26 Sep 2017 14:20:38 +0000 (15:20 +0100)]
merge: upstream fixes (mutt/default)
* clang-format
* Display an error message when delete mailbox fails. (see #3968)
* Updated French translation.
* Fix imap sync segfault due to inactive headers during an expunge. (closes #3971)
* Close the imap socket for the selected mailbox on error.
* Add missing IMAP_CMD_POLL flag in imap buffy check.
* Change maildir and mh check_mailbox to use dynamic sized hash. (closes #3973)
Kevin McCarthy [Tue, 26 Sep 2017 01:40:32 +0000 (18:40 -0700)]
Change maildir and mh check_mailbox to use dynamic sized hash. (closes #3973)
The original patch is by Matt Fleming, originally posted at
http://www.codeblueprint.co.uk/2017/01/15/a-kernel-devs-approach-to-improving2
The comments there indicate Matt tried to submit to trac and mutt-dev,
but ran into registration problems. Thank you for the patch, and
sorry for those problems, Matt.
I modified the patch by making the same change to the
mh_check_mailbox() code too.
Kevin McCarthy [Fri, 22 Sep 2017 18:14:27 +0000 (11:14 -0700)]
Add missing IMAP_CMD_POLL flag in imap buffy check.
I missed adding the flag to one of the imap_exec() calls inside the
loop, when a different server is encountered in the mailboxes list.
Kevin McCarthy [Fri, 22 Sep 2017 18:12:25 +0000 (11:12 -0700)]
Close the imap socket for the selected mailbox on error.
The new $imap_poll_timeout calls the cmd_handle_fatal() error handler
on timeout, which is supposed to close and cleanup.
However, for the currently selected mailbox, the error handler was not
closing the socket after closing up the mailbox. This left extra
SSL/GnuTLS data around and was causing errors on an attempt to
reconnect.
Thanks to Fabian Groffen for reporting the issue.
Kevin McCarthy [Fri, 22 Sep 2017 18:07:27 +0000 (11:07 -0700)]
Fix imap sync segfault due to inactive headers during an expunge. (closes #3971)
Mutt has several places where it turns off h->active as a hack. For
example to avoid FLAG updates, or to exclude from imap_exec_msgset.
Unfortunately, when a reopen is allowed and the IMAP_EXPUNGE_PENDING
flag becomes set (e.g. a flag update to a modified header),
imap_expunge_mailbox() will be called by imap_cmd_finish().
The mx_update_tables() would free and remove these "inactive" headers,
despite that an EXPUNGE was not received for them. This would result
in memory leaks and segfaults due to dangling pointers in the
msn_index and uid_hash.
There should probably be a more elegant solution, removing the initial
hacks. However, this is causing a segfault, and the best solution
right now is to turn active back on for non-expunged messages in
imap_expunge_mailbox().
Extra thanks to chdiza, who bravely runs tip and found this issue
quickly.
Vincent Lefevre [Tue, 5 Sep 2017 15:33:45 +0000 (17:33 +0200)]
Updated French translation.
Kevin McCarthy [Wed, 20 Sep 2017 17:43:33 +0000 (10:43 -0700)]
Display an error message when delete mailbox fails. (see #3968)
Richard Russon [Tue, 26 Sep 2017 13:49:04 +0000 (14:49 +0100)]
clang-format
seishinryohosha [Fri, 22 Sep 2017 14:51:19 +0000 (16:51 +0200)]
Unsubscribe after deleting an imap folder (#730)
* Unsubscribe after deleting an imap folder
Only added two line to `browser.c` in `_mutt_select_file` case `OP_DELETE_MAILBOX`.
* Fixed typo: Unsubsribe -> Unsubscribe
* Revert previous change
* Added unsubscribe-from command
* Added `unsubscribe-from` command (init.h)
* Added `parse_unsubscribe_from` prototype (init.h)
* Implemented `parse_unsubscribe_from` uses imap/imap.h Header (init.c)
Tokenize buffer and expand each token (path) and finally unsubscribe from it.
No pattern matching is done.
* Unsubscribe after deleting an imap folder
Only added two line to `browser.c` in `_mutt_select_file` case `OP_DELETE_MAILBOX`.
* Fixed typo: Unsubsribe -> Unsubscribe
* Revert previous change
* Added unsubscribe-from command
* Added `unsubscribe-from` command (init.h)
* Added `parse_unsubscribe_from` prototype (init.h)
* Implemented `parse_unsubscribe_from` uses imap/imap.h Header (init.c)
Tokenize buffer and expand each token (path) and finally unsubscribe from it.
No pattern matching is done.
* Unsubscribe after deleting an imap folder
Only added two line to `browser.c` in `_mutt_select_file` case `OP_DELETE_MAILBOX`.
* Fixed typo: Unsubsribe -> Unsubscribe
* Revert previous change
* Unsubscribe after deleting an imap folder
Only added two line to `browser.c` in `_mutt_select_file` case `OP_DELETE_MAILBOX`.
* Fixed typo: Unsubsribe -> Unsubscribe
* Revert previous change
* Added unsubscribe-from command
* Added `unsubscribe-from` command (init.h)
* Added `parse_unsubscribe_from` prototype (init.h)
* Implemented `parse_unsubscribe_from` uses imap/imap.h Header (init.c)
Tokenize buffer and expand each token (path) and finally unsubscribe from it.
No pattern matching is done.
* Added subscribe-to command and updated example
* Added `subscribe-to` command (init.h)
* Added `parse_subscribe_to` prototype (init.h)
* Implemented `parse_subscribe_to` uses imap/imap.h Header (init.c)
* Example now shows folder and subfolders
Tokenize buffer and expand each token (path) and finally subscribe from it.
No pattern matching is done.
* Added return check
It should be noted, that imap_subscribe(FOO, 0) /* unsubcribe */
won't return -1, if mailbox doesn't exists.
* Added return -1, and do not silently ignore
* Added braces to satisfy styleguides
* Added better user output
* Typo Successfull -> Successful
* Reverted back to one parameter only and errors into err.
* Reverted back to one parameter only.
* Better error messages
* Error messages are now stored inside struct Buffer *err
* Changed from strfcpy -> mutt_buffer_*
* Copy&Paste Error correction
* Cleanup
* set expandtab
* set tabstop=2
* merged mutt_buffer_addstr -> mutt_buffer_printf
* corrected "Corrupted buffer" -> mutt_debug(5, ...)
* Compared with clang-format to get sure
* Reverted back bool -> int, to change this in a later PR
inside `parse_unsubscribe_from(...)` and `parse_subscribe_to(...)`
for the `imap_subscribe(...)`-call.
Pietro Cerutti [Fri, 22 Sep 2017 14:51:03 +0000 (15:51 +0100)]
Remove spurious error message (#773)
Issue #772
Richard Russon [Fri, 15 Sep 2017 13:36:42 +0000 (14:36 +0100)]
restore ~/.config/mutt to config search path
Some people are still using this dir.
It will be deprecated in the future.
Also, drop the dated/versioned config files.
Nobody was using them.
~/.mutt/neomutt-
20170912
Pietro Cerutti [Fri, 15 Sep 2017 12:27:43 +0000 (12:27 +0000)]
Kill include line altogether
Issue #755
Pietro Cerutti [Thu, 14 Sep 2017 05:52:48 +0000 (05:52 +0000)]
Do not include sys/cdefs.h
Issue #755
Richard Russon [Fri, 15 Sep 2017 11:12:29 +0000 (12:12 +0100)]
restore quote_regexp and reply_regexp
I shouldn't have renamed these
Richard Russon [Thu, 14 Sep 2017 16:36:19 +0000 (17:36 +0100)]
fix: %{fmt} date format
A mistake was introduced when moving the date code to the library.
The dates being displayed were those of the base timezone, not the email.
Remove the `%<...>` documentation from `$index_format`
Fixes #757
Richard Russon [Wed, 13 Sep 2017 17:44:19 +0000 (18:44 +0100)]
rename regexp to regex
'regex' is the more common abbreviation for a regular expression.
Kevin McCarthy [Thu, 14 Sep 2017 19:43:32 +0000 (12:43 -0700)]
Improve imap fetch handler to accept an initial UID. (closes #3969)
Gmail sends flag updates with a UID before the FLAGS. The handler was
very simple, and so ignored the flag update in that case.
Pull the code from msg_parse_fetch(), paring down to just UID and
FLAGS. This will handle arbitrary order data items.
Kevin McCarthy [Wed, 13 Sep 2017 22:48:16 +0000 (15:48 -0700)]
Change imap copy/save and trash to sync flags, excluding deleted. (closes #3966) (closes #3860)
imap_copy_messages() uses a helper to sync the flags before performing
a server-side copy. However, it had a bug that the "deleted" flag on
a local message, if set, will be propagated to the copy too.
Change the copy sync helper to ignore the deleted flag. Then, change
the imap trash function to use the same helper.
Thanks to Anton Lindqvist for his excellent bug report, suggested
fixes, and help testing.
Kevin McCarthy [Wed, 13 Sep 2017 22:48:13 +0000 (15:48 -0700)]
Remove \Seen flag setting for imap trash. (see #3966) (see #3860)
Commit
323e3d6e5e4c has a side effect where spurious FETCH flag
updates after setting the \Seen flag can cause a sync to abort.
Remove manually setting \Seen for all trashed message before copying.
The next commit will change the imap trash function to use the same
code as the imap copy/save function for syncing the message before
server-side copying.
Pietro Cerutti [Wed, 13 Sep 2017 13:05:34 +0000 (13:05 +0000)]
Do not pop from MuttrcStack what wasn't pushed
Issue #751
Richard Russon [Wed, 13 Sep 2017 20:59:45 +0000 (21:59 +0100)]
fix: set mbox_type
Thanks to Floyd Anderson (@floand)
Fixes: #754
Pietro Cerutti [Wed, 13 Sep 2017 08:14:12 +0000 (08:14 +0000)]
Fix two too many s/Mutt/Neo&/
Richard Russon [Tue, 12 Sep 2017 16:54:33 +0000 (17:54 +0100)]
merge: Rename Mutt to NeoMutt
* drop upstream mutt references
* rename binary from mutt to neomutt
* rename contrib files
* docs: replace mutt refs with neomutt
* docs: change muttrc references to neomuttrc
* docs: rename some files
* code: change mutt references to neomutt
* docs: remove old vim syntax file
* update translations to match code changes
Richard Russon [Sat, 9 Sep 2017 22:47:04 +0000 (23:47 +0100)]
update translations to match code changes
Richard Russon [Sun, 10 Sep 2017 00:11:15 +0000 (01:11 +0100)]
docs: remove old vim syntax file
Richard Russon [Sat, 9 Sep 2017 18:15:28 +0000 (19:15 +0100)]
code: change mutt references to neomutt
Richard Russon [Sun, 10 Sep 2017 00:24:02 +0000 (01:24 +0100)]
docs: rename some files
Richard Russon [Sat, 9 Sep 2017 16:44:24 +0000 (17:44 +0100)]
docs: change muttrc references to neomuttrc
Richard Russon [Sat, 9 Sep 2017 16:08:56 +0000 (17:08 +0100)]
docs: replace mutt refs with neomutt
Richard Russon [Sat, 9 Sep 2017 13:18:27 +0000 (14:18 +0100)]
rename contrib files
Change references from "mutt" to "neomutt"
Richard Russon [Sat, 9 Sep 2017 12:27:57 +0000 (13:27 +0100)]
rename binary from mutt to neomutt
Richard Russon [Sat, 9 Sep 2017 12:07:20 +0000 (13:07 +0100)]
drop upstream mutt references
NeoMutt no longer refers to the upstream version of Mutt.
Richard Russon [Tue, 12 Sep 2017 15:01:47 +0000 (16:01 +0100)]
NeoMutt 2017-09-12 (1.9.0)
Richard Russon [Tue, 12 Sep 2017 14:43:12 +0000 (15:43 +0100)]
update translations
Richard Russon [Tue, 12 Sep 2017 14:40:22 +0000 (15:40 +0100)]
NeoMutt 2017-09-12 (1.9.0)
Florian Klink [Tue, 12 Sep 2017 11:53:09 +0000 (13:53 +0200)]
fix: crash in vfolder-from-query
see #746
Richard Russon [Mon, 11 Sep 2017 14:08:16 +0000 (15:08 +0100)]
notmuch: add support for the v5 API
Issue: #746
Richard Russon [Mon, 11 Sep 2017 23:18:13 +0000 (00:18 +0100)]
build: fix warnings raised by gcc7
Thanks to David Sterba (@kdave)
Richard Russon [Sat, 9 Sep 2017 11:51:36 +0000 (12:51 +0100)]
fix: broken check on resend message
By boolifying check_all_msg(), it's return value was inverted without
fixing the callers. This would prevent users resending messages, or
crash.
Pietro Cerutti [Thu, 7 Sep 2017 15:34:32 +0000 (15:34 +0000)]
Be more formal about quoting in m4 macros
Pietro Cerutti [Thu, 7 Sep 2017 07:11:43 +0000 (07:11 +0000)]
Use tabs consistently to columnize .mailmap
Richard Russon [Thu, 7 Sep 2017 01:09:18 +0000 (02:09 +0100)]
NeoMutt 2017-09-07 (1.9.0)
Richard Russon [Wed, 6 Sep 2017 18:40:12 +0000 (19:40 +0100)]
clang-format
Richard Russon [Wed, 6 Sep 2017 18:16:57 +0000 (19:16 +0100)]
fix whitespace
Richard Russon [Wed, 6 Sep 2017 14:07:12 +0000 (15:07 +0100)]
update credits/mailmap
Richard Russon [Wed, 6 Sep 2017 13:34:49 +0000 (14:34 +0100)]
update translations
Richard Russon [Wed, 6 Sep 2017 13:29:41 +0000 (14:29 +0100)]
version: 2017-09-06
Richard Russon [Wed, 6 Sep 2017 17:37:22 +0000 (18:37 +0100)]
fix: version string
Florian Klink [Thu, 31 Aug 2017 02:21:26 +0000 (04:21 +0200)]
mutt_notmuch: fix setting custom query_type in notmuch query
nm_normalize_uri re-builds notmuch queries, but nm_uri_from_query
doesn't set query_type back again, so fix that.
Also, use the NmQueryType enum where possible instead of int.
Fixes #484.
Richard Russon [Wed, 6 Sep 2017 12:23:13 +0000 (13:23 +0100)]
build: fix make dist
Richard Russon [Wed, 6 Sep 2017 01:41:47 +0000 (02:41 +0100)]
merge: tidying in preparation for config changes
* lib: move more functions into the library
* rename DT_ consts
* rename: rx -> regex
* rename: Unify the multi-byte char table naming
* rename: OPT_* to match their config item
* rename: Global variables to match their config item
Richard Russon [Mon, 4 Sep 2017 18:16:37 +0000 (19:16 +0100)]
rename: Global variables to match their config item
Rename lots of constants to match the user-facing config names.
e.g.
"certificate_file" SslCertFile -> CertificateFile
"nm_open_timeout" NotmuchOpenTimeout -> NmOpenTimeout
Richard Russon [Mon, 4 Sep 2017 17:12:10 +0000 (18:12 +0100)]
rename: OPT_* to match their config item
Rename lots of constants to match the user-facing config names.
e.g.
"forward_decode" OPT_FORW_DECODE -> OPT_FORWARD_DECODE
"imap_servernoise" OPT_IMAP_SERVER_NOISE -> OPT_IMAP_SERVERNOISE
Richard Russon [Fri, 1 Sep 2017 19:46:23 +0000 (20:46 +0100)]
rename: Unify the multi-byte char table naming
Through the code this was referred to by the names:
- mbchar_table
- mbyte_table
- mbchartbl
Richard Russon [Sat, 2 Sep 2017 15:09:12 +0000 (16:09 +0100)]
rename: rx -> regex
Rename all structs and functions to uniformly use the prefix 'regex'.
Richard Russon [Fri, 1 Sep 2017 16:59:28 +0000 (17:59 +0100)]
rename DT_ consts
Tidy the naming of the DT_* constants that signify the types of config
items.
Richard Russon [Fri, 1 Sep 2017 15:02:43 +0000 (16:02 +0100)]
lib: move more functions into the library
Richard Russon [Wed, 6 Sep 2017 00:04:22 +0000 (01:04 +0100)]
merge: upstream fixes (mutt/default)
* Updated Ukrainian translation
* Updated Russian translation
* Updated German translation
* Updated Danish translation
* Updated Catalan translation
* Updated Japanese translation
* Fix the new certificate prompt translations.
* Fix fp resource leak. (closes #3965)
* Fix rv assignment in mutt_window_mvprintw(). (closes #3964)
* Add warning about using inline pgp with format=flowed. (closes #3963)
* Remove 'really' from the purge-message help description.
* Updated French translation
Vincent Lefevre [Tue, 5 Sep 2017 15:33:45 +0000 (17:33 +0200)]
Updated French translation
Kevin McCarthy [Mon, 4 Sep 2017 22:51:07 +0000 (15:51 -0700)]
Remove 'really' from the purge-message help description.
This made it sound to the translators like a question.
Kevin McCarthy [Mon, 4 Sep 2017 20:26:55 +0000 (13:26 -0700)]
Add warning about using inline pgp with format=flowed. (closes #3963)
The reporter noted that when trying to use inline signing with
format=flowed, the flowed was turned off.
After some research, this appears to be deliberate, probably because
of strange interactions between inline PGP and format=flowed. In fact
the RFC strongly discourages their combined use:
https://tools.ietf.org/html/rfc3676#section-4.6
Add a warning and prompt to use PGP/MIME in mutt_protect().
Kevin McCarthy [Mon, 4 Sep 2017 16:40:44 +0000 (09:40 -0700)]
Fix rv assignment in mutt_window_mvprintw(). (closes #3964)
Mutt doesn't check the return value, so this wasn't causing a bug, but
was incorrect.
Thanks to dcb314 for reporting the issue.
Kevin McCarthy [Mon, 4 Sep 2017 16:20:53 +0000 (09:20 -0700)]
Fix fp resource leak. (closes #3965)
Thanks to dcb314 for reporting the issue.
Kevin McCarthy [Sat, 2 Sep 2017 16:36:52 +0000 (09:36 -0700)]
Fix the new certificate prompt translations.
The Esperanto, Dutch, and Czech po files weren't updated in time for
1.9. Fix the certificate prompt translations by adding a "(s)kip"
choice. Otherwise the prompts would not be functional.
TAKAHASHI Tamotsu [Tue, 5 Sep 2017 15:59:10 +0000 (16:59 +0100)]
Updated Japanese translation
Ivan Vilata i Balaguer [Tue, 5 Sep 2017 15:57:50 +0000 (16:57 +0100)]
Updated Catalan translation
Morten Bo Johansen [Tue, 5 Sep 2017 15:49:24 +0000 (16:49 +0100)]
Updated Danish translation
Olaf Hering [Tue, 5 Sep 2017 15:47:17 +0000 (16:47 +0100)]
Updated German translation
Vsevolod Volkov [Tue, 5 Sep 2017 15:42:30 +0000 (16:42 +0100)]
Updated Russian translation
Vsevolod Volkov [Tue, 5 Sep 2017 15:36:52 +0000 (16:36 +0100)]
Updated Ukrainian translation
Damien Riegel [Fri, 25 Aug 2017 15:46:25 +0000 (16:46 +0100)]
build: substitute-in package version
Richard Russon [Thu, 24 Aug 2017 19:52:11 +0000 (20:52 +0100)]
refactor nntp setup
Reorder the code so that NewsServer is only set once.
Richard Russon [Thu, 31 Aug 2017 14:30:02 +0000 (15:30 +0100)]
build: drop unused test/symbol ICONV_NONTRANS
Richard Russon [Wed, 23 Aug 2017 23:32:12 +0000 (00:32 +0100)]
tidy: fix whitespace
Richard Russon [Fri, 1 Sep 2017 12:45:23 +0000 (13:45 +0100)]
merge: upstream fixes (mutt/default)
* Create ATTACH_CONTEXT to hold attachment index. (see #3728)
* Change helpers functions to pass actx. (see #3728)
* Add helpers to add and remove actx entries. (see #3728)
* Change recvattach to allow nested encryption. (see #3728)
* Add virtual index to actx. (see #3728)
* Fix the expand/collapse code to use the virtual index. (see #3728)
* Fix shared attachment functions. (see #3728)
* Fix attachment check_traditional and extract_keys operations. (see #3728)
* Add edit-content-type helper and warning for decrypted attachments. (closes #3728)
* Fix parent_hdr usage in mutt_attach_reply(). (see #3728)
* Add option to run command to query attachment mime type. (closes #2933) (closes #3959)
Kevin McCarthy [Sat, 19 Aug 2017 15:33:57 +0000 (08:33 -0700)]
Add option to run command to query attachment mime type. (closes #2933) (closes #3959)
Add $mime_type_query_command to specify a command to run if the
attachment extension is not in the mime.types file.
Add $mime_type_query_first to allow the query command to be run before
the mime.types lookup.
Kevin McCarthy [Fri, 11 Aug 2017 16:04:48 +0000 (09:04 -0700)]
Fix parent_hdr usage in mutt_attach_reply(). (see #3728)
If the selected attachments are not messages and no (common) parent is
found, parent_hdr is set to the passed in hdr. In that case, parent
will still be NULL, but parent_hdr and parent_fp will be set.
Change the test to parent_hdr being NULL, not parent, to check for
this case.
Kevin McCarthy [Fri, 11 Aug 2017 01:18:28 +0000 (18:18 -0700)]
Add edit-content-type helper and warning for decrypted attachments. (closes #3728)
Regenerating the actx index will overwrite any changes made to a
decrypted attachment. Change the mutt_edit_content_type() function to
return 1 when a structural change is made. Add a warning message when
that is the case and a decrypted message was edited, so the user is
not surprised.
Note: mutt_edit_content_type() appeared to regenerate multipart
subparts every time, leading to a memory leak. I believe this was an
oversite, and it should have regenerated only when there were no
subparts, so have "fixed" this.
Kevin McCarthy [Fri, 11 Aug 2017 01:18:26 +0000 (18:18 -0700)]
Fix attachment check_traditional and extract_keys operations. (see #3728)
Add helpers and iterate over the actx->idx instead of the BODY structure.
Kevin McCarthy [Fri, 11 Aug 2017 01:18:25 +0000 (18:18 -0700)]
Fix shared attachment functions. (see #3728)
With nested decryption, the correct FP is associated with the
ATTACHPTR entry. Also, the BODY entries are not continguous, so the
functions need to iterate over the actx index, not the BODY structure.
Kevin McCarthy [Fri, 11 Aug 2017 01:18:24 +0000 (18:18 -0700)]
Fix the expand/collapse code to use the virtual index. (see #3728)
Fix the init code to respect OPTDIGESTCOLLAPSE.
Kevin McCarthy [Fri, 11 Aug 2017 01:18:22 +0000 (18:18 -0700)]
Add virtual index to actx. (see #3728)
The virtual index is modeled after the CONTEXT. Add a CURATTACH
helper to reduce code verbosity. Store the actx as menu->data.
Simplify and consolidate the recvattach and compose menu update code
inside a function.
Because compose and recvattach share so much code, change compose to
use the virtual index even though it has no collapse/expand
functionality.
Kevin McCarthy [Fri, 11 Aug 2017 01:18:21 +0000 (18:18 -0700)]
Change recvattach to allow nested encryption. (see #3728)
* Add a FP and BODY array to the actx. These are used to allow proper
cleanup.
* Add HEADER and root_fp entries, to allow for index regeneration.
* Separate out the compose and recvattach index generation functions.
* Change the recvattach index generator to decrypt as encrypted parts
are found.
Kevin McCarthy [Fri, 11 Aug 2017 01:18:20 +0000 (18:18 -0700)]
Add helpers to add and remove actx entries. (see #3728)
Use the helper in compose update_idx(), to consolidate the resize
logic and simplify the code.
Separate out the actx "free" routine from a routine to empty out the
idx. The index regeneration routines should flush and rebuild the
index without having to renerate the actx structure.
Kevin McCarthy [Fri, 11 Aug 2017 01:18:19 +0000 (18:18 -0700)]
Change helpers functions to pass actx. (see #3728)
Change the pager, compose, recvattach and recvcmd to pass the actx
instead of the individual idx and idxlen parameters.
Separate out the compose menu exit logic to first free the BODY data
and then call the shared actx free function at the bottom.
Kevin McCarthy [Fri, 11 Aug 2017 01:18:18 +0000 (18:18 -0700)]
Create ATTACH_CONTEXT to hold attachment index. (see #3728)
Move the idx and idxlen into ATTACH_CONTEXT. In subsequence patches,
this structure will hold more useful items, such as the virtual index.
The swap out is straightforward, except for:
* update_idx() in compose.c, which post-increments the idxlen in the
call and again in the function.
* mutt_gen_attach_list() which doesn't need to returns the new values.
ng0 [Sun, 20 Aug 2017 21:27:05 +0000 (21:27 +0000)]
contrib: Add guix-neomutt.scm.
Pietro Cerutti [Thu, 31 Aug 2017 15:12:30 +0000 (16:12 +0100)]
Fix link in CODE_OF_CONDUCT.md
Damien Riegel [Thu, 24 Aug 2017 02:15:06 +0000 (22:15 -0400)]
teach gen-map-doc about the new opcode header
gen-map-doc was the last element of Neomutt using the OPS* files. By
teaching it the format of opcodes.h, it's now possible to remove these
files.
Damien Riegel [Tue, 22 Aug 2017 16:24:27 +0000 (12:24 -0400)]
move HelpStrings to help.c
HelpStrings was only defined when included in help.c (with the
`#ifdef HELP_C` guard), and it's only used there so move it to where it
belongs and make it static.
Damien Riegel [Tue, 22 Aug 2017 16:22:30 +0000 (12:22 -0400)]
use opcodes.h instead of keymap_defs.h
keymap_defs.h is a generated header and sometimes it falls out of the
sync with config.h, which leads to weird errors about opcodes being
undefined. Using a static header prevents that.
As both keymap_defs.h and keymap_alldefs.h are now gone, gen_defs is no
longer necessary and can be removed as well.
Damien Riegel [Tue, 22 Aug 2017 16:11:58 +0000 (12:11 -0400)]
introduce opcodes header
This brings the opcodes in the C world. This requires a bit of macro
gymnastic to keep definitions in a central place. Opcodes are defined
like this:
#define OPS(_fmt) \
_fmt(OP_NULL, N_("null operation") \
...
By passing a different formator to `OPS`, one can keep only parts of the
definition she/he is interested in. See the end of opcodes.h for example
usages.
By introducing this new header, it is no longer necessary to generate
keymap_alldefs.h, which was used only for consumption by gettext.
Damien Riegel [Tue, 22 Aug 2017 16:33:59 +0000 (12:33 -0400)]
define USE_NOTMUCH when creating the documentation
Header makedoc_defs.h is used in functions.h and init.h to define some
symbols when generating the documentation. Other mailbox backends are
defined (IMAP, POP), but notmuch was missing.
Pietro Cerutti [Fri, 25 Aug 2017 16:00:54 +0000 (17:00 +0100)]
Accept curses.h as a valid curses header (#733)
This fixes the build on NetBSD 7.1_RC2 with curses from base (no ncurses
package).
Richard Russon [Wed, 23 Aug 2017 09:17:25 +0000 (10:17 +0100)]
build: fix slang compile