Commit graph

24 commits

Author SHA1 Message Date
ARaspiK
0535f6333f Add additional flagging functionality
More mail flags can now be set, unset, and toggled, not just the
read/seen flag.

This functionality is implemented with a new `:flag` and `:unflag`
command, which are extensions to the matching `:read` and `:unread`
commands, adding support for different flags.  In fact, the
`read`/`unread` commands are now recognized aliases to `flag`/`unflag`.
The new commands are also well documented in aerc(1).

The change mostly extends the previous read/unread setting functionality
by adding a selection for the flag to change.
2020-07-08 09:13:03 +02:00
Reto Brunner
3e6189f243 notmuch: fix docstring 2020-07-08 01:02:46 +02:00
Reto Brunner
5f9c005872 notmuch: handle the answered flag 2020-07-05 15:40:12 +02:00
Srivathsan Murali
6c4ed3cfe2 notmuch: undefined variable when setting reply flag 2020-05-26 11:18:11 -04:00
Srivathsan Murali
b1eb7ad18d Set AnsweredFlag on successful reply 2020-05-25 11:29:53 -04:00
Reto Brunner
ee1d971554 notmuch: remove read handling from FetchMessageBodyPart 2020-05-11 09:47:19 -04:00
Reto Brunner
979da6d6f7 notmuch: emit dirinfo upon label change 2020-03-01 11:58:39 +01:00
Reto Brunner
fb2df7e169 notmuch: align dirInfo logic to the maildir worker 2020-02-29 13:16:33 -05:00
Jeffas
00ed2ef06a Add missing notmuch build tags 2020-02-26 21:46:31 +01:00
Reto Brunner
78dd043057 notmuch: refresh dirlist in background 2020-02-16 10:41:19 -05:00
Reto Brunner
8d216ab10e notmuch: add internal event loop 2020-02-16 10:41:18 -05:00
Reto Brunner
bb09694f07 notmuch: emit DirInfo upon request 2020-02-16 10:41:18 -05:00
Reto Brunner
3e7e236f50 notmuch: avoid stale DBs
Opening a notmuch DB gives you a snapshot of the stage at that specific time.
Prior to this, we only reopened the DB upon writing.
However, if say a mail sync program like offlineimap is fetching new mail,
we would never pick it up.

This commit caches a db for a while, so that we don't generate too much overhead
and does a reconnect cycle after that.

I hardcoded a value as I don't think that having an option would be beneficial.
Any write operation (meaning reading mail) anyhow flushes the DB by necessity.
(we need to close to commit tag changes, which changing the read state is)
2020-02-16 10:41:10 -05:00
Reto Brunner
63391b7dca Add labels to index format (%g)
Exposes the notmuch tags accordingly, stubs it for the maildir worker.
2019-12-27 10:20:29 -07:00
Reto Brunner
40ceee969b notmuch: emit LabelList event 2019-12-21 11:20:11 -05:00
Reto Brunner
6dc537fbe3 Notmuch: be resilient to config errors
Right now notmuch panics if something goes wrong in the configure event.
This patch checks for that and returns an error instead, so that we can at least
get the UI up and running (and all the other accounts)

The experience will be completely degraded until another configure event occurs.
2019-11-01 11:02:01 -04:00
Matt Snider
cd39e8f90c notmuch: ignore comments and blank lines when processing query-map file
A segmentation fault occurs when using the notmuch backend and a `query-map`
file that contains blank lines or comments.
2019-11-01 11:02:01 -04:00
Reto Brunner
3ec9fd216d notmuch: add sort functionality 2019-09-20 15:01:07 -04:00
Reto Brunner
edfab1b201 notmuch: implement ModifyLabels 2019-09-16 12:19:15 -04:00
Reto Brunner
3f452ca283 notmuch: sync maildir flags
Syncs back special notmuch tag like unread to the underlying maildir store
2019-09-16 12:19:14 -04:00
Reto Brunner
83207c1e1d notmuch: extract all notmuch db operations.
For some reason the current code frequently segfaults due to an
invalid C memory address. This commit mediates that by never keeping an object
alive longer than absolutely necessary.
2019-09-16 12:19:13 -04:00
Reto Brunner
f13f9a8684 notmuch: add search / filter capabilities 2019-08-29 08:44:11 +09:00
Reto Brunner
a2c5233f71 Notmuch: use adhoc write connection.
Notmuch only allows a single write connection, all other clients trying to
modify the db block. Hence we should only open one when we actually need it.

Apparently we also need to refresh the RO DB connection upon modification,
else we get stale message tag results
2019-08-26 09:56:44 +09:00
Reto Brunner
c38ddf8d30 Add notmuch backend
This commit introduces the notmuch backend.
The backend is conditionally compiled in if the "notmuch" tag is provided.

Most of the message types are implemented, with the notable exceptions
of DeleteMessages as well as any copy / move / append type.
Reason being, that those aren't normally applicable in a notmuch based workflow.

Changes v2 --> v3, based on review comments
* Use account config for configuration
2019-08-08 10:10:34 +09:00