aboutsummaryrefslogtreecommitdiffstats
path: root/worker/maildir/search.go
Commit message (Collapse)AuthorAgeFilesLines
* maildir,notmuch: avoid leaking open filesNguyễn Gia Phong2022-01-191-0/+1
| | | | | | | | | | Previously, Message.NewReader returned the wrapped buffered reader without a reference to the opened file, so the files descriptors were left unclosed after reading. Now, the file reader is returned directly and closed on the call site. Buffering is not needed here because it is an implementation detail of go-message. Fixes: https://todo.sr.ht/~rjarry/aerc/9
* go.mod: change base git urlRobin Jarry2021-11-051-2/+2
| | | | | | | I'm not sure what are the implications but it seems required. Link: https://github.com/golang/go/issues/20883 Signed-off-by: Robin Jarry <robin@jarry.cc>
* Remove hard coded bodystruct path everywhereReto Brunner2020-07-271-1/+7
| | | | | | | Aerc usually used the path []int{1} if it didn't know what the proper path is. However this only works for multipart messages and breaks if it isn't one. This patch removes all the hard coding and extracts the necessary helpers to lib.
* Add flag based search optionsTobias Wölfel2020-07-251-1/+18
| | | | | | | Provide search and filter with the option to specify more flag based conditions. Use '-x <flag>' to search for messages with a flag (seen, answered, flagged) and '-X <flag>' to search for messages without a flag.
* Make search more lenientJeffas2020-02-261-1/+2
| | | | | When we fail to read a single message we don't need to fail the whole search, just log the error and we can still get results back.
* Change search flagsJeffas2019-09-201-2/+6
| | | | | | | | This changes the search flags for maildir and imap backends. They now no longer use -t for searching all text. This seems to make more sense as being the targeted recipient. I have similarly added Cc for -c. The text search now resides under -a for all text.
* Add basic searching to the maildir backendJeffas2019-09-161-0/+245
Basic searching is supported with the following: - read messages - unread messages - from addresses - text in body - text in subject - text in all The implementation loops through all messages in the selected directory. It tries to be smart by detecting which parts of each message the search query needs to use and only loads these from the filesystem.