]> granicus.if.org Git - neomutt/log
neomutt
6 years agoHandle improperly encoded pgp/mime octetstream part
Kevin McCarthy [Fri, 21 Dec 2018 18:13:17 +0000 (10:13 -0800)]
Handle improperly encoded pgp/mime octetstream part

Some clients (or even mail servers) improperly encode the octetstream
part.

Thanks to Riccardo Schirone for the original merge request patch.
This commit also handles the attachment menu, and makes the decoding
conditional so it's not done if it isn't necessary.

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoDisplay mail sent message after Fcc finishes
Kevin McCarthy [Fri, 21 Dec 2018 17:42:26 +0000 (09:42 -0800)]
Display mail sent message after Fcc finishes

For the case of IMAP, the uploading message would otherwise stay on
the screen.  In any case, it's best to show that message as the last
thing before returning to the index.

Thanks to chdiza for reporting the issue!

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoFix flags if mutt_get_postponed() has no messages
Kevin McCarthy [Thu, 20 Dec 2018 02:48:04 +0000 (18:48 -0800)]
Fix flags if mutt_get_postponed() has no messages

Flags needs to be reset so memory cleanup is done at the end.

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoMore postpone cleanup
Kevin McCarthy [Thu, 20 Dec 2018 02:36:19 +0000 (18:36 -0800)]
More postpone cleanup

Provide an error message if $postponed is not set.

Make sure the clear content is freed for encrypted messages.

If the write_fcc() fails, make sure to restore the clear content.

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoWhen postponing, encode descriptions before encrypting
Kevin McCarthy [Thu, 20 Dec 2018 01:43:26 +0000 (17:43 -0800)]
When postponing, encode descriptions before encrypting

This matches the behavior of the normal send process.  I don't think
there is actually an issue here since nothing is sent, but it makes
sense to be consistent.

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoRefactor postpone_message()
Kevin McCarthy [Thu, 20 Dec 2018 00:20:23 +0000 (16:20 -0800)]
Refactor postpone_message()

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoPrompt when mutt_write_fcc() fails
Kevin McCarthy [Wed, 19 Dec 2018 23:42:24 +0000 (15:42 -0800)]
Prompt when mutt_write_fcc() fails

Allow the user to retry, specify an alternate mailbox, or skip.

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoMove fcc after send
Kevin McCarthy [Wed, 19 Dec 2018 22:35:22 +0000 (14:35 -0800)]
Move fcc after send

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoRefactor save_fcc() function
Kevin McCarthy [Wed, 19 Dec 2018 22:24:46 +0000 (14:24 -0800)]
Refactor save_fcc() function

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoAdd rfc2047_encode_envelope helper
Kevin McCarthy [Sun, 16 Dec 2018 22:23:54 +0000 (14:23 -0800)]
Add rfc2047_encode_envelope helper

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoAdd protected header received email support
Kevin McCarthy [Tue, 11 Dec 2018 22:11:30 +0000 (14:11 -0800)]
Add protected header received email support

Add $crypt_protected_headers_read config variable to enable reading
and updating the index/header cache.

Print protected Subject header in the pager as parts are rendered.

Once opened, update the index, subject hash, and header cache.

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoAdd mx operation save_to_header_cache
Kevin McCarthy [Sat, 15 Dec 2018 22:49:55 +0000 (14:49 -0800)]
Add mx operation save_to_header_cache

This will be used when reading protected headers, to store the
encrypted subject in the header cache so it can be searched with.

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoParse and store mime headers in the BODY
Kevin McCarthy [Mon, 10 Dec 2018 01:41:58 +0000 (17:41 -0800)]
Parse and store mime headers in the BODY

Don't store the field in the header cache though.

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoFactor out rfc2047_decode_envelope()
Kevin McCarthy [Mon, 10 Dec 2018 03:52:21 +0000 (19:52 -0800)]
Factor out rfc2047_decode_envelope()

Co-authored-by: Richard Russon <rich@flatcap.org>
6 years agoclang-format
Richard Russon [Mon, 7 Jan 2019 11:49:12 +0000 (11:49 +0000)]
clang-format

6 years agoacutest: sync to upstream
Pietro Cerutti [Mon, 7 Jan 2019 14:54:47 +0000 (14:54 +0000)]
acutest: sync to upstream

6 years agomerge: factor Context out of mailbox functions
Richard Russon [Sat, 5 Jan 2019 14:46:13 +0000 (14:46 +0000)]
merge: factor Context out of mailbox functions

 * imap: drop Context from imap_copy_messages()
 * tidy mbox_close
 * mailbox: add notify callback
 * mx_fastclose_mailbox: use mailbox notifications
 * mx_fastclose_mailbox: factor out Context
 * imap_expunge_mailbox: use mailbox notifications
 * imap: drop mdata->ctx
 * mbox_open: factor out Context
 * mbox_check: use mailbox notifications
 * mbox_check: factor out Context
 * mbox_sync: use mailbox notifications
 * mbox_sync: factor out Context
 * split out context functions
 * mx_mbox_close drop index_hint
 * imap tidy

6 years agoimap tidy
Richard Russon [Fri, 28 Dec 2018 14:16:29 +0000 (14:16 +0000)]
imap tidy

6 years agomx_mbox_close drop index_hint
Richard Russon [Sun, 30 Dec 2018 02:29:04 +0000 (02:29 +0000)]
mx_mbox_close drop index_hint

6 years agosplit out context functions
Richard Russon [Fri, 28 Dec 2018 11:08:37 +0000 (11:08 +0000)]
split out context functions

6 years agombox_sync: factor out Context
Richard Russon [Wed, 26 Dec 2018 18:14:46 +0000 (18:14 +0000)]
mbox_sync: factor out Context

6 years agombox_sync: use mailbox notifications
Richard Russon [Wed, 26 Dec 2018 18:10:36 +0000 (18:10 +0000)]
mbox_sync: use mailbox notifications

6 years agombox_check: factor out Context
Richard Russon [Mon, 24 Dec 2018 11:57:57 +0000 (11:57 +0000)]
mbox_check: factor out Context

6 years agombox_check: use mailbox notifications
Richard Russon [Mon, 24 Dec 2018 11:50:31 +0000 (11:50 +0000)]
mbox_check: use mailbox notifications

6 years agombox_open: factor out Context
Richard Russon [Mon, 24 Dec 2018 11:23:23 +0000 (11:23 +0000)]
mbox_open: factor out Context

6 years agoimap: drop mdata->ctx
Richard Russon [Sun, 23 Dec 2018 00:14:10 +0000 (00:14 +0000)]
imap: drop mdata->ctx

6 years agoimap_expunge_mailbox: use mailbox notifications
Richard Russon [Sun, 23 Dec 2018 00:11:20 +0000 (00:11 +0000)]
imap_expunge_mailbox: use mailbox notifications

6 years agomx_fastclose_mailbox: factor out Context
Richard Russon [Sun, 23 Dec 2018 00:06:32 +0000 (00:06 +0000)]
mx_fastclose_mailbox: factor out Context

6 years agomx_fastclose_mailbox: use mailbox notifications
Richard Russon [Thu, 20 Dec 2018 13:37:38 +0000 (13:37 +0000)]
mx_fastclose_mailbox: use mailbox notifications

6 years agomailbox: add notify callback
Richard Russon [Wed, 19 Dec 2018 13:24:17 +0000 (13:24 +0000)]
mailbox: add notify callback

6 years agotidy mbox_close
Richard Russon [Mon, 31 Dec 2018 02:05:20 +0000 (02:05 +0000)]
tidy mbox_close

6 years agoimap: drop Context from imap_copy_messages()
Richard Russon [Mon, 31 Dec 2018 18:03:15 +0000 (18:03 +0000)]
imap: drop Context from imap_copy_messages()

6 years agofolder-hook: try matching on description
Austin Ray [Fri, 4 Jan 2019 02:20:21 +0000 (21:20 -0500)]
folder-hook: try matching on description

Use the description, in addition to the path, when determining to
execute a `folder-hook`. Since `named-mailboxes` and `virtual-mailboxes`
use descriptions to hide ugliness of raw paths, the description may
differ from the path and/or contain information not included in the
path.

The inclusion of description checking makes `folder-hook`s improves its
ergonomics. `notmuch` users were particularly affect by poor
`folder-hook` ergonomics since `virtual-mailboxes` paths often had large
overlap, making it hard to craft a good regex. A workaround was to add a
unique dummy key.

6 years agomerge: add summary pages
Richard Russon [Fri, 4 Jan 2019 01:19:40 +0000 (01:19 +0000)]
merge: add summary pages

 * add ICommand for new :ex-style commands
 * Implement :set [all] commands
 * Implement :version command

6 years agoImplement :version command
ryt [Mon, 12 Nov 2018 21:26:44 +0000 (22:26 +0100)]
Implement :version command

6 years agoImplement :set [all] commands
ryt [Mon, 12 Nov 2018 19:49:57 +0000 (20:49 +0100)]
Implement :set [all] commands

6 years agoadd ICommand for new :ex-style commands
Christopher John CZETTEL [Sun, 25 Sep 2016 19:50:17 +0000 (21:50 +0200)]
add ICommand for new :ex-style commands

These are needed for the new summary tables feature
(and inspired by the Command lookup table in init.c)

added: ICommand wrapper / lookup table allowing easy addition of new
informational commands that will not be parsed in .muttrc files and
override any existing rc-line commands when executed in mutt.

added: hook in mutt_enter_command in command.c to integrate new
ICommands facility

Issue #162

6 years agombox: quieten probing
Richard Russon [Fri, 4 Jan 2019 00:36:38 +0000 (00:36 +0000)]
mbox: quieten probing

6 years agomerge: Tidy the command parsing functions
Richard Russon [Thu, 3 Jan 2019 17:18:52 +0000 (17:18 +0000)]
merge: Tidy the command parsing functions

 * Created enum to group command_t return codes
 * Change errors to warnings where applicable

6 years agoChange errors to warnings where applicable
Victor Fernandes [Tue, 1 Jan 2019 18:42:26 +0000 (19:42 +0100)]
Change errors to warnings where applicable

6 years agoCreated enum to group command_t return codes
Victor Fernandes [Mon, 24 Dec 2018 00:18:04 +0000 (01:18 +0100)]
Created enum to group command_t return codes

Old return codes have been replaced by the enum ones
in init.c, but other files have functions that must be
changed too.

6 years agoclang-format
Richard Russon [Thu, 3 Jan 2019 13:36:30 +0000 (13:36 +0000)]
clang-format

6 years agofix: mutt/charset.c: only include libintl.h if ENABLE_NLS is defined
Naveen Nathan [Thu, 3 Jan 2019 02:21:59 +0000 (13:21 +1100)]
fix: mutt/charset.c: only include libintl.h if ENABLE_NLS is defined

6 years agonotmuch: make sure nm_db_longrun_done() release DB
Karel Zak [Thu, 3 Jan 2019 10:51:49 +0000 (11:51 +0100)]
notmuch: make sure nm_db_longrun_done() release DB

Since commit 1cdfc0da08e09b1756a7b4d422996e907c4390d0 the function
nm_db_release() does not release DB if long-run state is enabled.
This change make code more readable and shorter.

Unfortunately, nm_db_release() is called from nm_db_longrun_done(), so
after the change the function nm_db_longrun_done() is no-op and long
transaction never finish. It means:

 - changes are not committed the database
 - after mutt restart old state (tags) is read from DB
 - mismatch between notmuch tags and maildir filenames

This commit disables long-run state in nm_db_longrun_done() before
nm_db_release() is called.

6 years agoIndex: try description when changing mailboxes 1516/head
Austin Ray [Tue, 1 Jan 2019 20:59:48 +0000 (15:59 -0500)]
Index: try description when changing mailboxes

Mailbox: find mailbox by description

Introduce `mutt_find_mailbox_desc()`, which takes a pointer to a
description, and tries to find a mailbox that corresponds to it.

With the introduction of `named-mailboxes` and removal of
`virtual-mailboxes` special cases, users may prefer to operate with
descriptions instead of (potentially) ugly paths. We can no longer
assume that a buffer is a path and require a method to find by
description.

This is not included as an `mxapi` function since `desc` is common to
all mailboxes so the backends do not need implement their own function.

Index: try description when changing mailboxes

Since mailbox descriptions are more prevalent with `named-mailboxes` and
`virtual-mailbox` special cases being removed, some users will try to
change folders with a description instead of a path.

This commit modifies `main_change_folder()` to look for a mailbox with a
given description if path probing fails.

6 years agodemote 'last message' errors to messages
Richard Russon [Wed, 2 Jan 2019 13:23:22 +0000 (13:23 +0000)]
demote 'last message' errors to messages

These error messages were annoying:
- You are on the last message
- You are on the first message
- Top of message is shown
- Bottom of message is shown

6 years agosolarized dark color scheme: Remove outdated comment about ncurses
Thomas Jarosch [Wed, 2 Jan 2019 11:27:58 +0000 (12:27 +0100)]
solarized dark color scheme: Remove outdated comment about ncurses

slang is no longer a requirement for proper colors, one likely related fix is

commit a7102c721893d6a6fc33a8e9590f99c450e9fe9e
Author: Fabrice Bellet <fabrice@bellet.info>
Date:   Fri Aug 4 21:16:53 2017 +0200

    color: call use_default_colors() in a single location

    we call use_default_colors() when parsing colors in rc files only, and
    unconditionally when defining the color of the tree element, because the
    foreground color of the tree element may be combined dynamically with
    the default background color of another element, not explicitely defined
    in an rc file. This patch fixes a bug visible with some versions of the
    ncurses library: use_default_colors() was used too late, and generated
    color leakage effects. (#689)

-> colors look fine on Fedora 28 with ncurses backend. The comment about slang
was in there since the first submission to git in early 2017.

6 years agoFix use of uninitialized memory in mutt_parse_unmailboxes()
Thomas Jarosch [Sat, 29 Dec 2018 17:44:07 +0000 (18:44 +0100)]
Fix use of uninitialized memory in mutt_parse_unmailboxes()

The buffer 'tmp' is not initialized when clearing all mailboxes,
therefore don't try to use it in mutt_str_strcasecmp().

The issue was uncovered when switching between different accounts,
"unvirtual-mailboxes *" sometimes cleared regular mailboxes, too.

Important bits from the config:

-----------------------------------
unmailboxes *
mailboxes "+INBOX"

unvirtual-mailboxes *
virtual-mailboxes "virtual INBOX" "notmuch://?query=folder:INBOX%20not%20tag:spam%20not%20tag:archive"
-----------------------------------

-> normal "INBOX" sometimes gets cleared.

valgrind backtrace of the issue without the patch:
==223072== Use of uninitialised value of size 8
==223072==    at 0x593E823: tolower (in /usr/lib64/libc-2.27.so)
==223072==    by 0x4C32BC5: strcasecmp (vg_replace_strmem.c:693)
==223072==    by 0x43FFEB: mutt_parse_unmailboxes (mailbox.c:500)
==223072==    by 0x43B134: mutt_parse_rc_line.part.18 (init.c:3145)
==223072==    by 0x43B42B: mutt_parse_rc_line (init.c:3120)
==223072==    by 0x43B42B: source_rc (init.c:823)
==223072==    by 0x43B93A: parse_source (init.c:1845)
==223072==    by 0x43B134: mutt_parse_rc_line.part.18 (init.c:3145)
==223072==    by 0x43B42B: mutt_parse_rc_line (init.c:3120)
==223072==    by 0x43B42B: source_rc (init.c:823)
==223072==    by 0x43C1B2: mutt_init (init.c:3045)
==223072==    by 0x406EB0: main (main.c:688)

The same problem is also present in the official neomutt 2018-07-16,
I've forward-ported and tested the fix for git HEAD.

The code was slightly refactored to be more readable.

6 years agorename menu.h back to mutt_menu.h
Richard Russon [Tue, 1 Jan 2019 11:23:31 +0000 (11:23 +0000)]
rename menu.h back to mutt_menu.h

The short name causes a clash with ncurses on MacPort.

6 years agoimap: command: Adds unique sequence IDs
Mark Stenglein [Tue, 1 Jan 2019 00:57:37 +0000 (19:57 -0500)]
imap: command: Adds unique sequence IDs

This patch adds support for unique sequence IDs to be logged. Each
new imap account is assigned an ID letter (seqid) which increments
to the next letter (and wraps at 'z') each time a new imap account
is created.

Signed-off-by: Mark Stenglein <mark@stengle.in>
6 years agoAdd $auto_subscribe variable.
Kevin McCarthy [Sat, 8 Dec 2018 23:15:56 +0000 (15:15 -0800)]
Add $auto_subscribe variable.

When set, it automatically subscribes to mailing lists found in
List-Post headers.

This commit is based on Michael Elkins's patch from the thread
<https://marc.info/?l=mutt-users&m=127076105423565&w=2>.

I've added an opt-in variable $auto_subscribe and a hash table cache
to speed up reading headers when the variable is set.

Co-authored-by: Austin Ray <austin@austinray.io>
6 years agomanual: Fix small typo
Thomas Jarosch [Sun, 30 Dec 2018 09:41:06 +0000 (10:41 +0100)]
manual: Fix small typo

6 years agopager: prevent negative index
Richard Russon [Thu, 27 Dec 2018 11:13:32 +0000 (11:13 +0000)]
pager: prevent negative index

6 years agolight tidy
Richard Russon [Thu, 27 Dec 2018 12:11:34 +0000 (12:11 +0000)]
light tidy

6 years agoFix mistaken hdrs -> email
Alvaro Herrera [Thu, 27 Dec 2018 18:25:17 +0000 (15:25 -0300)]
Fix mistaken hdrs -> email

Search & replace was a bit too enthusiastic, causing some config files
to become invalid, and giving an invalid example.

6 years agorefactor hash
Richard Russon [Sat, 22 Dec 2018 21:28:22 +0000 (21:28 +0000)]
refactor hash

6 years agolight tidying
Richard Russon [Sat, 22 Dec 2018 20:47:49 +0000 (20:47 +0000)]
light tidying

6 years agoimap: remove ImapCache
Mehdi Abaakouk [Fri, 21 Dec 2018 18:28:19 +0000 (19:28 +0100)]
imap: remove ImapCache

The ImapCache is useless since it's used only when we fail bcache.
And this is not really expected.

6 years agombox: allow non-file mailboxes
Richard Russon [Fri, 21 Dec 2018 16:54:46 +0000 (16:54 +0000)]
mbox: allow non-file mailboxes

We disallow directories, but allow files or other devices.
This means we can run `neomutt -f /dev/null` again.

6 years agomxapi: fix creation of new mailboxes
Richard Russon [Fri, 21 Dec 2018 13:17:01 +0000 (13:17 +0000)]
mxapi: fix creation of new mailboxes

6 years agombox: fix dodgy stat buffer
Richard Russon [Fri, 21 Dec 2018 12:31:08 +0000 (12:31 +0000)]
mbox: fix dodgy stat buffer

6 years agofix email macros
Richard Russon [Thu, 20 Dec 2018 14:29:41 +0000 (14:29 +0000)]
fix email macros

6 years agomailbox: rename hdrmax to email_max
Richard Russon [Thu, 20 Dec 2018 14:33:15 +0000 (14:33 +0000)]
mailbox: rename hdrmax to email_max

6 years agomailbox: rename hdrs to emails
Richard Russon [Thu, 20 Dec 2018 14:21:37 +0000 (14:21 +0000)]
mailbox: rename hdrs to emails

6 years agomxapi: remove Context from mbox_close()
Richard Russon [Thu, 20 Dec 2018 13:12:08 +0000 (13:12 +0000)]
mxapi: remove Context from mbox_close()

6 years agoimap: Don't use Context in imap_mbox_close
Mehdi Abaakouk [Thu, 20 Dec 2018 06:48:42 +0000 (07:48 +0100)]
imap: Don't use Context in imap_mbox_close

6 years agoimap: Move Context to ImapMboxData
Mehdi Abaakouk [Thu, 20 Dec 2018 07:50:59 +0000 (08:50 +0100)]
imap: Move Context to ImapMboxData

6 years agonntp: fix hcache unterminated string
Richard Russon [Mon, 17 Dec 2018 23:10:31 +0000 (23:10 +0000)]
nntp: fix hcache unterminated string

6 years agobuild: add -lgpg-error to gpgme build
Pietro Cerutti [Mon, 17 Dec 2018 11:48:07 +0000 (11:48 +0000)]
build: add -lgpg-error to gpgme build

Fixes #1493

6 years agoFix double evaluation of mutt_escape_path() inside a macro
Ian Zimmerman [Sun, 16 Dec 2018 00:55:51 +0000 (16:55 -0800)]
Fix double evaluation of mutt_escape_path() inside a macro

6 years agodoc: fix echo example
Richard Russon [Sat, 15 Dec 2018 22:07:52 +0000 (22:07 +0000)]
doc: fix echo example

6 years agocontrib: add mairix_filter.pl
Ian Zimmerman [Sun, 16 Dec 2018 00:02:48 +0000 (16:02 -0800)]
contrib: add mairix_filter.pl

Sample implementation of external search filter (mairix)

6 years agoPass current folder to external search tool
Ian Zimmerman [Sat, 15 Dec 2018 22:56:21 +0000 (14:56 -0800)]
Pass current folder to external search tool

Or "/", if needed

6 years agoMove escape_path to the library
Ian Zimmerman [Sat, 15 Dec 2018 22:45:26 +0000 (14:45 -0800)]
Move escape_path to the library

Also, make its source argument const

6 years agoimap: use imap_mailbox_status() in imap_mbox_check_stats()
Mehdi Abaakouk [Thu, 13 Dec 2018 15:01:36 +0000 (16:01 +0100)]
imap: use imap_mailbox_status() in imap_mbox_check_stats()

This change calls imap_mailbox_status() instead of imap_status()
in imap_mbox_check_stats() as we known the Mailbox.

This also add more sanity check in imap_mailbox_status().

6 years agoFix possible smime crash if the read mime header p is NULL.
Kevin McCarthy [Wed, 12 Dec 2018 02:41:37 +0000 (18:41 -0800)]
Fix possible smime crash if the read mime header p is NULL.

6 years agoFix memory leak in smime.c.
Kevin McCarthy [Tue, 11 Dec 2018 23:29:57 +0000 (15:29 -0800)]
Fix memory leak in smime.c.

smime_application_smime_handler() was not freeing the BODY returned by
smime_handle_entity().

6 years agodocs: strip out fake curly quotes in comments
Richard Russon [Thu, 13 Dec 2018 23:02:25 +0000 (23:02 +0000)]
docs: strip out fake curly quotes in comments

6 years agominor code tidying
Richard Russon [Thu, 13 Dec 2018 20:32:26 +0000 (20:32 +0000)]
minor code tidying

boolify variables
make function static
fix translation typo

6 years agomerge: refactor GroupContext to GroupList
Richard Russon [Wed, 12 Dec 2018 15:22:27 +0000 (15:22 +0000)]
merge: refactor GroupContext to GroupList

 * Convert GroupContext to use STAILQ
 * Rename Group-related structures
 * Move group.[ch] to mutt/
 * Sort functions prototypes
 * Get rid of global variable
 * Explicitly allocate/free Groups memory
 * Simplify the API when we cannot fail
 * Tidy API: s/group_context/grouplist/

6 years agoTidy API: s/group_context/grouplist/ 1187/head
Pietro Cerutti [Fri, 25 May 2018 12:15:00 +0000 (12:15 +0000)]
Tidy API: s/group_context/grouplist/

6 years agoSimplify the API when we cannot fail
Pietro Cerutti [Fri, 25 May 2018 11:49:43 +0000 (11:49 +0000)]
Simplify the API when we cannot fail

6 years agoExplicitly allocate/free Groups memory
Pietro Cerutti [Fri, 25 May 2018 11:21:38 +0000 (11:21 +0000)]
Explicitly allocate/free Groups memory

6 years agoGet rid of global variable
Pietro Cerutti [Fri, 25 May 2018 10:53:37 +0000 (10:53 +0000)]
Get rid of global variable

6 years agoSort functions prototypes
Pietro Cerutti [Fri, 25 May 2018 10:40:51 +0000 (10:40 +0000)]
Sort functions prototypes

6 years agoMove group.[ch] to mutt/
Pietro Cerutti [Fri, 25 May 2018 10:38:51 +0000 (10:38 +0000)]
Move group.[ch] to mutt/

6 years agoRename Group-related structures
Pietro Cerutti [Fri, 25 May 2018 09:44:54 +0000 (09:44 +0000)]
Rename Group-related structures

6 years agoConvert GroupContext to use STAILQ
Bo YU [Fri, 4 May 2018 10:56:06 +0000 (18:56 +0800)]
Convert GroupContext to use STAILQ

6 years agomerge: imap refactoring
Richard Russon [Wed, 12 Dec 2018 12:52:48 +0000 (12:52 +0000)]
merge: imap refactoring

 * imap_expunge_mailbox use m instead of adata->mailbox
 * move some functions Mailbox
 * imap_fix/cache_path don't need ImapAccountData
 * use Mailbox in imap_sync_message_for_copy()
 * Change more functions with Mailbox

6 years agoimap: Change more functions with Mailbox 1487/head
Mehdi Abaakouk [Sat, 8 Dec 2018 20:15:23 +0000 (21:15 +0100)]
imap: Change more functions with Mailbox

make_msg_set()
imap_exec_msgset()
sync_helper()

6 years agoimap: use Mailbox in imap_sync_message_for_copy()
Mehdi Abaakouk [Sat, 8 Dec 2018 19:50:46 +0000 (20:50 +0100)]
imap: use Mailbox in imap_sync_message_for_copy()

6 years agoimap: imap_fix/cache_path don't need ImapAccountData
Mehdi Abaakouk [Sat, 8 Dec 2018 19:37:51 +0000 (20:37 +0100)]
imap: imap_fix/cache_path don't need ImapAccountData

6 years agoimap: move some functions Mailbox
Mehdi Abaakouk [Sat, 8 Dec 2018 17:59:35 +0000 (18:59 +0100)]
imap: move some functions Mailbox

To increase readability some functions take Mailbox instead of
ImapAccountData.

* imap_read_headers()
* imap_set_flags()
* imap_cache_del()
* imap_cache_clean()
* imap_cache_put()
* msg_cache_commit()

6 years agoimap: imap_expunge_mailbox use m instead of adata->mailbox
Mehdi Abaakouk [Sat, 8 Dec 2018 17:51:49 +0000 (18:51 +0100)]
imap: imap_expunge_mailbox use m instead of adata->mailbox

6 years agoimap: ensure '\0' and INBOX are the same Mailbox
Mehdi Abaakouk [Tue, 11 Dec 2018 18:00:21 +0000 (19:00 +0100)]
imap: ensure '\0' and INBOX are the same Mailbox

INBOX and '\0  was considered as different mailbox. But when '\0' was
opened, the path/realpath was updated to "INBOX".

This change fixes m->path, m->realpath at the beginning to ensure INBOX
and '\0' are the same Mailbox.

Related #1486

6 years agomx: share code between ac_find implementations
Mehdi Abaakouk [Tue, 11 Dec 2018 19:51:40 +0000 (20:51 +0100)]
mx: share code between ac_find implementations

All mx_ops->ac_add() do almost the same thing.

Just move the common code to mx_ac_find()

6 years agomx: Ensure mailbox is always added to Account->mailboxes
Mehdi Abaakouk [Tue, 11 Dec 2018 20:00:38 +0000 (21:00 +0100)]
mx: Ensure mailbox is always added to Account->mailboxes

Currently if the user open a mailbox not in AllMailboxes.
We create a HIDDEN Mailbox and find an account with mx_ac_find().

In this case mx_ac_add is not called and the new Mailbox is not
added to the account.

Also some notmuch, pop and imap specific setup is not done.

This change fixes this

Close #1486

6 years agoAdd new pattern type ~I for external searches 1419/head
Ian Zimmerman [Wed, 14 Nov 2018 17:14:11 +0000 (09:14 -0800)]
Add new pattern type ~I for external searches

Call external commands, like mairix, to perform searches of the index.

6 years agoadd consts
Richard Russon [Mon, 10 Dec 2018 16:23:53 +0000 (16:23 +0000)]
add consts

6 years agoPrevent $charset from having multiple values
Richard Russon [Mon, 10 Dec 2018 14:26:28 +0000 (14:26 +0000)]
Prevent $charset from having multiple values