]> granicus.if.org Git - neomutt/log
neomutt
7 years agoSTAILQify struct ColorLine 811/head
Pietro Cerutti [Mon, 2 Oct 2017 11:46:28 +0000 (11:46 +0000)]
STAILQify struct ColorLine

7 years agofix: add more range-checking on dates/times 795/head
Richard Russon [Sun, 1 Oct 2017 12:33:32 +0000 (13:33 +0100)]
fix: add more range-checking on dates/times

7 years agofix: overflow in mutt_mktime()
Richard Russon [Wed, 27 Sep 2017 18:04:39 +0000 (19:04 +0100)]
fix: overflow in mutt_mktime()

mutt_mktime() can overflow when used on 32-bit arches.
This was due to a bogus comparision.

Now, extreme future dates will be interpreted as 2038-01-19.

Fixes #794

7 years agokeywords: Remove dead code/doc of keywords patch 792/head
Mehdi Abaakouk [Wed, 27 Sep 2017 05:32:52 +0000 (07:32 +0200)]
keywords: Remove dead code/doc of keywords patch

Keywords patch support have been removed by 92e6dc1d89f7187eeea1412e51598600925e23f5.

This change removes associated config and docs.

Closes #769

7 years agotravis: restore config
Richard Russon [Tue, 3 Oct 2017 15:12:42 +0000 (16:12 +0100)]
travis: restore config

7 years agoAutosetup-based configuration 745/head
Pietro Cerutti [Fri, 11 Aug 2017 15:45:45 +0000 (15:45 +0000)]
Autosetup-based configuration

Pull #745

7 years agomerge: keywords
Richard Russon [Tue, 3 Oct 2017 12:47:51 +0000 (13:47 +0100)]
merge: keywords

 * Make the notmuch tags generic
 * tags: Add index_format %J
 * Add IMAP keywords support
 * Share label editing between imap/notmuch
 * Tidying the code
 * tags: always pass correct buffer length
 * imap: fix memory leak
 * notmuch: remove unused methods declaration
 * tags: remove needs of HEADER_TAGS macro
 * tags: make private method private
 * tags: rename HeaderTag to TagList
 * tags: remove useless ifdef
 * tags: store transformed tags only if needed
 * imap: Don't use keywords terminology, but flags
 * tags: rename OP_MAIN_MODIFY_LABEL/TAGS
 * tags: rename modify-labels/modify-tags
 * tags: rename hdr_tags to driver_tags
 * tags: move tags_editor and tags_commit to mx
 * tags: don't depends on header.c
 * tags: Don't duplicate tags allocation
 * tags: fix notmuch editor return code
 * tags: rename DRIVER_LABEL to DRIVER_TAGS
 * always pass char to mutt_str_append_item

7 years agoalways pass char to mutt_str_append_item 764/head
Mehdi Abaakouk [Thu, 21 Sep 2017 17:29:50 +0000 (19:29 +0200)]
always pass char to mutt_str_append_item

7 years agotags: rename DRIVER_LABEL to DRIVER_TAGS
Mehdi Abaakouk [Thu, 21 Sep 2017 06:10:33 +0000 (08:10 +0200)]
tags: rename DRIVER_LABEL to DRIVER_TAGS

7 years agotags: fix notmuch editor return code
Mehdi Abaakouk [Thu, 21 Sep 2017 06:04:42 +0000 (08:04 +0200)]
tags: fix notmuch editor return code

7 years agotags: Don't duplicate tags allocation
Mehdi Abaakouk [Wed, 20 Sep 2017 09:05:35 +0000 (11:05 +0200)]
tags: Don't duplicate tags allocation

The HeaderTags and TagList structure can be replaced
by a simple linked list.

7 years agotags: don't depends on header.c
Mehdi Abaakouk [Wed, 20 Sep 2017 12:54:06 +0000 (14:54 +0200)]
tags: don't depends on header.c

7 years agotags: move tags_editor and tags_commit to mx
Mehdi Abaakouk [Wed, 20 Sep 2017 12:43:48 +0000 (14:43 +0200)]
tags: move tags_editor and tags_commit to mx

This methods handles the run of dedicated methods on the mailbox, and
not the tags list manipulation.

It makes more sense to have it in mx.c like other methods with the same
purpose.

7 years agotags: rename hdr_tags to driver_tags
Mehdi Abaakouk [Wed, 20 Sep 2017 12:29:22 +0000 (14:29 +0200)]
tags: rename hdr_tags to driver_tags

To avoid confusion about hdr_tags and tags in X-Label headers.

This renames all hdr_tags_* in drvier_tags_*.

7 years agotags: rename modify-labels/modify-tags
Mehdi Abaakouk [Tue, 19 Sep 2017 19:02:54 +0000 (21:02 +0200)]
tags: rename modify-labels/modify-tags

7 years agotags: rename OP_MAIN_MODIFY_LABEL/TAGS
Mehdi Abaakouk [Tue, 19 Sep 2017 18:55:53 +0000 (20:55 +0200)]
tags: rename OP_MAIN_MODIFY_LABEL/TAGS

7 years agoimap: Don't use keywords terminology, but flags
Mehdi Abaakouk [Tue, 19 Sep 2017 16:48:58 +0000 (18:48 +0200)]
imap: Don't use keywords terminology, but flags

7 years agotags: store transformed tags only if needed
Mehdi Abaakouk [Tue, 19 Sep 2017 14:54:13 +0000 (16:54 +0200)]
tags: store transformed tags only if needed

7 years agotags: remove useless ifdef
Mehdi Abaakouk [Tue, 19 Sep 2017 12:05:09 +0000 (14:05 +0200)]
tags: remove useless ifdef

OP_MAIN_MODIFY_LABELS and OP_MAIN_MODIFY_LABELS_THEN_HIDE no more
an notmuch thing. So make them always compiled.

7 years agotags: rename HeaderTag to TagList
Mehdi Abaakouk [Mon, 18 Sep 2017 22:04:44 +0000 (00:04 +0200)]
tags: rename HeaderTag to TagList

7 years agotags: make private method private
Mehdi Abaakouk [Mon, 18 Sep 2017 21:20:23 +0000 (23:20 +0200)]
tags: make private method private

7 years agotags: remove needs of HEADER_TAGS macro
Mehdi Abaakouk [Mon, 18 Sep 2017 21:19:37 +0000 (23:19 +0200)]
tags: remove needs of HEADER_TAGS macro

7 years agonotmuch: remove unused methods declaration
Mehdi Abaakouk [Mon, 18 Sep 2017 17:06:19 +0000 (19:06 +0200)]
notmuch: remove unused methods declaration

7 years agoimap: fix memory leak
Mehdi Abaakouk [Fri, 15 Sep 2017 17:44:26 +0000 (19:44 +0200)]
imap: fix memory leak

In imap_commit_message_tags() cmd is not freed in case of error.

7 years agotags: always pass correct buffer length
Mehdi Abaakouk [Fri, 15 Sep 2017 20:18:43 +0000 (22:18 +0200)]
tags: always pass correct buffer length

In notmuch editor we was passing sizeof(buf) with buf a char* with an
unknown allocated size.

In imap, we have assumed/hardcoded LONGSTRING. That's true, but we
should not do that.

edit_msg_tags() now takes the buflen as parameter so the root caller
can pass the size of the buffer.

7 years agoTidying the code
Mehdi Abaakouk [Fri, 21 Jul 2017 21:34:18 +0000 (23:34 +0200)]
Tidying the code

7 years agoShare label editing between imap/notmuch
Mehdi Abaakouk [Tue, 21 Feb 2017 09:50:35 +0000 (10:50 +0100)]
Share label editing between imap/notmuch

7 years agoAdd IMAP keywords support
Mehdi Abaakouk [Mon, 20 Feb 2017 19:49:23 +0000 (20:49 +0100)]
Add IMAP keywords support

This change introduces IMAP keyword support.

* index_format gets %g, %G, %J and %Gx to display them
* pattern gets g to search/match imap keywords
* colors.c gets index_tag/index_tags to color them
* OPS gets modify-labels to edit them
* tag-transforms/tag-formats/hidden_tags can be display them in more sexy manner

Most of the code is shared with the notmuch backend.

Upstream: https://dev.mutt.org/trac/ticket/3210
Closes neomutt/neomutt#225

7 years agotags: Add index_format %J
Mehdi Abaakouk [Mon, 20 Feb 2017 20:20:50 +0000 (21:20 +0100)]
tags: Add index_format %J

This change adds %J to index_format, to be able to show message tags
only when they are different from the previous one in a thread.

7 years agoMake the notmuch tags generic
Mehdi Abaakouk [Tue, 14 Feb 2017 09:45:45 +0000 (10:45 +0100)]
Make the notmuch tags generic

This change make the notmuch tags generic.

This is in preparation of reusing it for imap keywords feature.

7 years agomerge: upstream fixes (mutt/default)
Richard Russon [Mon, 2 Oct 2017 12:01:56 +0000 (13:01 +0100)]
merge: upstream fixes (mutt/default)

 * Fix uses of context->changed as a counter.
 * Make cmd_parse_fetch() more precise about setting reopen/check flags.
 * Enable $reply_self for group-reply, even with $metoo unset.

7 years agoEnable $reply_self for group-reply, even with $metoo unset.
Roger Pau Monne [Thu, 28 Sep 2017 18:57:56 +0000 (11:57 -0700)]
Enable $reply_self for group-reply, even with $metoo unset.

For a (r)eply, the $metoo variable does not have any effect because
there is a single recipient.

However with (g)roup reply, the To was initially set to the sender,
but subsequently removed my $nometoo.  The empty To line is then
replaced with the Cc line, resulting in a (logically correct but)
surprising outcome.

Change the behavior such that $nometoo will not strip a single To
recipient when $reply_self is set.

7 years agoMake cmd_parse_fetch() more precise about setting reopen/check flags.
Kevin McCarthy [Wed, 27 Sep 2017 20:45:36 +0000 (13:45 -0700)]
Make cmd_parse_fetch() more precise about setting reopen/check flags.

Previously any FETCH with FLAGS would result in either
  idata->reopen |= IMAP_EXPUNGE_PENDING;
  -or-
  idata->check_status = IMAP_FLAGS_PENDING;
being set.

This is unnecessary in the case of responses to FLAGS.SILENT updates
sent by mutt (which seem to commonly happen now-a-days).

Change imap_set_flags() to compare the old server flags against the
new ones, and report when _those_ updates would/did result in a local
header flag change.  Only set one of the reopen/check_status flags in
the event of an actual change (or potential change if a local change
has been made to the header.)

7 years agoFix uses of context->changed as a counter.
Kevin McCarthy [Wed, 27 Sep 2017 02:44:11 +0000 (19:44 -0700)]
Fix uses of context->changed as a counter.

The first was in mx_update_tables(), but only when "not committing".
This is used by mh/maildir during an "occult" update, and in imap when
expunging the mailbox.  It meant to simply turn on changed when a
single changed header is seen.

The second use was in imap_sync_message_for_copy().  Previously this
was used for a server side copy/save, but is now also used for
fast-trash copying.  Remove the code that was trying to decrement the
counter: this function is not capable of properly setting a status
bit.

7 years agopgpewrap: free opts on exit 809/head
Jelle van der Waa [Thu, 21 Sep 2017 19:41:11 +0000 (21:41 +0200)]
pgpewrap: free opts on exit

opts is allocated with malloc, but never free'd in both exit scenario's
leading to a memory leak of opts.

7 years agopgpewrap: remove duplicate if statement
Jelle van der Waa [Thu, 21 Sep 2017 19:36:49 +0000 (21:36 +0200)]
pgpewrap: remove duplicate if statement

The condition argc <= 1 is equal to argc < 2, remove the duplicate argc
<2 statement.

7 years agoimap: Fix mx.mbox leak in imap_get_parent_path 808/head
Jelle van der Waa [Sun, 1 Oct 2017 16:48:34 +0000 (18:48 +0200)]
imap: Fix mx.mbox leak in imap_get_parent_path

valgrind reports a memory leak in imap_get_parent_path due to no
free'ing mx.mbox. As described in imap_parse_path, the callee should
free mx.mbox.

7 years agofix: crash using notmuch expando with imap 807/head
Richard Russon [Sat, 30 Sep 2017 21:41:05 +0000 (22:41 +0100)]
fix: crash using notmuch expando with imap

The NotMuch code didn't check for a NotMuch mailbox when dereferencing
Header->data.

Thanks to @xunam.

Fixes #805

7 years agobool: include missing stdbool.h header 806/head
Anton Rieger [Sat, 30 Sep 2017 20:19:19 +0000 (22:19 +0200)]
bool: include missing stdbool.h header

7 years agobool: convert function parameters in mutt_notmuch.h 804/head
Anton Rieger [Sat, 30 Sep 2017 13:04:49 +0000 (15:04 +0200)]
bool: convert function parameters in mutt_notmuch.h

* nm_longrun_init()

Affected static functions in mutt_notmuch.c

* append_message()
* append_replies()
* append_thread()
* do_database_open()
* get_db()
* get_query()
* get_query_string()
* is_longrun()
* read_mesgs_query()
* read_threads_query()

7 years agoPadded and sorted prototypes in init.h 791/head
Anton Rieger [Tue, 26 Sep 2017 23:59:20 +0000 (01:59 +0200)]
Padded and sorted prototypes in init.h

7 years agospacing: Align function prototypes in init.h
Anton Rieger [Tue, 26 Sep 2017 22:12:50 +0000 (00:12 +0200)]
spacing: Align function prototypes in init.h

7 years agofix: digest_collapse was broken (#801)
Richard Russon [Fri, 29 Sep 2017 18:30:18 +0000 (19:30 +0100)]
fix: digest_collapse was broken (#801)

A recent upstream change stopped $digest_collapse from working.
The outer mime container wasn't being checked for type 'multipart/digest'.

A digest nested within another mime container should also be collapsed.

Fixes #789

7 years agoFix some problems with autoconf (#793)
Richard Russon [Fri, 29 Sep 2017 18:29:49 +0000 (19:29 +0100)]
Fix some problems with autoconf (#793)

* build: restore tabs in configure.ac

No functional changes

* build: fix out-of-tree build

* Built items in /doc weren't being installed.
* Force install to /usr/lib, not /usr/lib64

* build: stop yes/no include dirs

A bug in the curses detection often lead to things like:
* -Ino/include  -Lno/lib
* -Iyes/include -Lyes/lib

7 years agoclang-format
Richard Russon [Fri, 29 Sep 2017 13:10:52 +0000 (14:10 +0100)]
clang-format

7 years agoSTAILQify struct CryptModules 800/head
Pietro Cerutti [Fri, 29 Sep 2017 10:22:38 +0000 (10:22 +0000)]
STAILQify struct CryptModules

7 years agobool: convert function parameters in mutt.h 799/head
Anton Rieger [Thu, 28 Sep 2017 21:43:12 +0000 (23:43 +0200)]
bool: convert function parameters in mutt.h

* mutt_matches_ignore()

7 years agobool: convert extern variable in mbyte.h 798/head
Anton Rieger [Thu, 28 Sep 2017 19:32:10 +0000 (21:32 +0200)]
bool: convert extern variable in mbyte.h

* Charset_is_utf8
* mutt_hcache_restore()
* mutt_set_charset()

Charset_is_utf8 affects `convert` in mutt_set_charset() and mutt_hcache_restore()
-> affects several static functions in hcache/hcache.c

* dump_address()
* dump_body()
* dump_buffer()
* dump_char()
* dump_char_size()
* dump_envelope()
* dump_parameter()
* dump_stailq()

* restore_address()
* restore_body()
* restore_buffer()
* restore_char()
* restore_envelope()
* restore_parameter()
* restore_stailq()

7 years agomerge: rename mutt to neomutt
Richard Russon [Tue, 26 Sep 2017 23:17:56 +0000 (00:17 +0100)]
merge: rename mutt to neomutt

 * rename man pages
 * move helper programs to lib dir
 * move mime.types to doc dir
 * contrib: change mutt references to neomutt
 * build: don't install .dist files

7 years agobuild: don't install .dist files 763/head
Richard Russon [Tue, 26 Sep 2017 22:36:05 +0000 (23:36 +0100)]
build: don't install .dist files

7 years agocontrib: change mutt references to neomutt
Richard Russon [Mon, 18 Sep 2017 10:40:31 +0000 (11:40 +0100)]
contrib: change mutt references to neomutt

7 years agomove mime.types to doc dir
Richard Russon [Mon, 18 Sep 2017 10:23:13 +0000 (11:23 +0100)]
move mime.types to doc dir

Many distros have a package providing /etc/mime.types

We put our copy in:
    doc/neomutt/mime.types

7 years agomove helper programs to lib dir
Richard Russon [Sun, 17 Sep 2017 14:44:02 +0000 (15:44 +0100)]
move helper programs to lib dir

Programs:
    lib/neomutt/pgpewrap
    lib/neomutt/pgpring
    lib/neomutt/smime_keys

7 years agorename man pages
Richard Russon [Sun, 17 Sep 2017 10:35:50 +0000 (11:35 +0100)]
rename man pages

Man:
    man1/neomutt.1
    man1/pgpewrap_neomutt.1
    man1/pgpring_neomutt.1
    man1/smime_keys_neomutt.1
    man5/mbox_neomutt.5
    man5/mmdf_neomutt.5
    man5/neomuttrc.5

7 years agodrop unused param in mutt_bcache_put 782/head
Richard Russon [Tue, 26 Sep 2017 16:51:01 +0000 (17:51 +0100)]
drop unused param in mutt_bcache_put

The 'tmp' param was always true.
Factor it out.

Thanks to @gahr for the idea/patch.

7 years agobool: convert function parameters in bcache.h
Anton Rieger [Mon, 25 Sep 2017 00:04:53 +0000 (02:04 +0200)]
bool: convert function parameters in bcache.h

* mutt_bcache_put()

7 years agobuild: expand buffers to avoid gcc7 warnings
Richard Russon [Mon, 25 Sep 2017 01:02:37 +0000 (02:02 +0100)]
build: expand buffers to avoid gcc7 warnings

7 years agobool: convert function parameters in history.h 785/head
Anton Rieger [Mon, 25 Sep 2017 19:05:41 +0000 (21:05 +0200)]
bool: convert function parameters in history.h

* mutt_history_add()
* mutt_history_at_scratch()

7 years agobool: convert function parameters in buffy.h 783/head
Anton Rieger [Mon, 25 Sep 2017 01:10:01 +0000 (03:10 +0200)]
bool: convert function parameters in buffy.h

* buffy_check()
* buffy_maildir_check()
* buffy_mbox_check()
* mh_buffy()

7 years agobool: convert function parameters in attach.h 776/head
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()

7 years agofix: crash looking up mime body type 787/head
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

7 years agofix: crash in mutt_substrdup 781/head
Richard Russon [Sun, 24 Sep 2017 22:35:48 +0000 (23:35 +0100)]
fix: crash in mutt_substrdup

Fixes #780

7 years agofix: crash in mbox_to_udomain 779/head
Richard Russon [Sun, 24 Sep 2017 11:18:25 +0000 (12:18 +0100)]
fix: crash in mbox_to_udomain

Fixes #778

7 years agoFix off-by-one buffer overflow in add_index_color 775/head
Jakub Wilk [Sat, 23 Sep 2017 15:35:29 +0000 (17:35 +0200)]
Fix off-by-one buffer overflow in add_index_color

7 years agomerge: upstream fixes (mutt/default)
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)

7 years agoChange 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.

7 years agoAdd missing IMAP_CMD_POLL flag in imap buffy check.
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.

7 years agoClose the imap socket for the selected mailbox on error.
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.

7 years agoFix imap sync segfault due to inactive headers during an expunge. (closes #3971)
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.

7 years agoUpdated French translation.
Vincent Lefevre [Tue, 5 Sep 2017 15:33:45 +0000 (17:33 +0200)]
Updated French translation.

7 years agoDisplay an error message when delete mailbox fails. (see #3968)
Kevin McCarthy [Wed, 20 Sep 2017 17:43:33 +0000 (10:43 -0700)]
Display an error message when delete mailbox fails. (see #3968)

7 years agoclang-format
Richard Russon [Tue, 26 Sep 2017 13:49:04 +0000 (14:49 +0100)]
clang-format

7 years agoUnsubscribe after deleting an imap folder (#730)
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.

7 years agoRemove spurious error message (#773)
Pietro Cerutti [Fri, 22 Sep 2017 14:51:03 +0000 (15:51 +0100)]
Remove spurious error message (#773)

Issue #772

7 years agorestore ~/.config/mutt to config search path
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

7 years agoKill include line altogether
Pietro Cerutti [Fri, 15 Sep 2017 12:27:43 +0000 (12:27 +0000)]
Kill include line altogether

Issue #755

7 years agoDo not include sys/cdefs.h
Pietro Cerutti [Thu, 14 Sep 2017 05:52:48 +0000 (05:52 +0000)]
Do not include sys/cdefs.h

Issue #755

7 years agorestore quote_regexp and reply_regexp
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

7 years agofix: %{fmt} date format
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

7 years agorename regexp to regex
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.

7 years agoImprove imap fetch handler to accept an initial UID. (closes #3969)
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.

7 years agoChange imap copy/save and trash to sync flags, excluding deleted. (closes #3966)...
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.

7 years agoRemove \Seen flag setting for imap trash. (see #3966) (see #3860)
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.

7 years agoDo not pop from MuttrcStack what wasn't pushed
Pietro Cerutti [Wed, 13 Sep 2017 13:05:34 +0000 (13:05 +0000)]
Do not pop from MuttrcStack what wasn't pushed

Issue #751

7 years agofix: set mbox_type
Richard Russon [Wed, 13 Sep 2017 20:59:45 +0000 (21:59 +0100)]
fix: set mbox_type

Thanks to Floyd Anderson (@floand)

Fixes: #754
7 years agoFix two too many s/Mutt/Neo&/
Pietro Cerutti [Wed, 13 Sep 2017 08:14:12 +0000 (08:14 +0000)]
Fix two too many s/Mutt/Neo&/

7 years agomerge: Rename Mutt to NeoMutt
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

7 years agoupdate translations to match code changes
Richard Russon [Sat, 9 Sep 2017 22:47:04 +0000 (23:47 +0100)]
update translations to match code changes

7 years agodocs: remove old vim syntax file
Richard Russon [Sun, 10 Sep 2017 00:11:15 +0000 (01:11 +0100)]
docs: remove old vim syntax file

7 years agocode: change mutt references to neomutt
Richard Russon [Sat, 9 Sep 2017 18:15:28 +0000 (19:15 +0100)]
code: change mutt references to neomutt

7 years agodocs: rename some files
Richard Russon [Sun, 10 Sep 2017 00:24:02 +0000 (01:24 +0100)]
docs: rename some files

7 years agodocs: change muttrc references to neomuttrc
Richard Russon [Sat, 9 Sep 2017 16:44:24 +0000 (17:44 +0100)]
docs: change muttrc references to neomuttrc

7 years agodocs: replace mutt refs with neomutt
Richard Russon [Sat, 9 Sep 2017 16:08:56 +0000 (17:08 +0100)]
docs: replace mutt refs with neomutt

7 years agorename contrib files
Richard Russon [Sat, 9 Sep 2017 13:18:27 +0000 (14:18 +0100)]
rename contrib files

Change references from "mutt" to "neomutt"

7 years agorename binary from mutt to neomutt
Richard Russon [Sat, 9 Sep 2017 12:27:57 +0000 (13:27 +0100)]
rename binary from mutt to neomutt

7 years agodrop upstream mutt references
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.

7 years agoNeoMutt 2017-09-12 (1.9.0) neomutt-20170912
Richard Russon [Tue, 12 Sep 2017 15:01:47 +0000 (16:01 +0100)]
NeoMutt 2017-09-12 (1.9.0)

7 years agoupdate translations
Richard Russon [Tue, 12 Sep 2017 14:43:12 +0000 (15:43 +0100)]
update translations

7 years agoNeoMutt 2017-09-12 (1.9.0)
Richard Russon [Tue, 12 Sep 2017 14:40:22 +0000 (15:40 +0100)]
NeoMutt 2017-09-12 (1.9.0)

7 years agofix: crash in vfolder-from-query
Florian Klink [Tue, 12 Sep 2017 11:53:09 +0000 (13:53 +0200)]
fix: crash in vfolder-from-query

see #746