aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cc,bcc,forward: add completion from address bookRobin Jarry2024-06-252-2/+10
| | | | | | | | | | | | Allow using the address book for completion in the :cc, :bcc and :forward commands. Changelog-added: The address book is now used for `:cc`, `:bcc` and `:forward`. Requested-by: Maximilian Bosch <maximilian@mbosch.me> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Tested-by: Maximilian Bosch <maximilian@mbosch.me>
* next,prev: fix panic when message list is emptyRobin Jarry2024-06-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | When running :filter -u and iterating over all messages with maildir, the list will eventually become empty (e.g. all messages have been read, no unread messages can be displayed). At this point, :next or :prev will fail to select anything and the maildir backend will return an error. Since the error is not caught, the message viewer is reloaded with a broken message. At this point, any key press causes a panic. This only happens with maildir because message list filters are updated dynamically in the background everytime a filsystem event is triggered. Avoid reloading the message viewer if an error is returned by the backend. Just display the error and abort. Link: https://lists.sr.ht/~rjarry/aerc-devel/%3CD1761AO8LJUL.12698V9VQDR9B@gmail.com%3E Reported-by: Matthew Bystrin <dev.mbstr@gmail.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Koni Marti <koni.marti@gmail.com>
* completer: use AddressForHumansRobin Jarry2024-06-251-13/+2
| | | | | | | | No need for convoluted reverse parsing of the wire format. Simply use the AddressForHumans function we already have. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* vaxis: update to 0.9.2Tim Culverhouse2024-06-232-3/+3
| | | | | | | | | | | | | Fixes several behind the scenes issues, but notably addresses scrolling of CJK characters in the terminal widget as well as wrapping of wide characters Reported-by: Tianhao Wang <shrik3@mailbox.org> Reported-by: ~runxiyu Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Tianhao Wang <shrik3@mailbox.org> Acked-by: Robin Jarry <robin@jarry.cc>
* dirlist: store previous folder infoKoni Marti2024-06-234-13/+20
| | | | | | | | | | Store the previous folder in the dirlist and retire the global 'history' map in the commands package. This ensures that the previous folder is always available when using ':cf -'. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* rmdir: allow specifying folder to deleteJason Cox2024-06-232-23/+49
| | | | | | | | | | | It's useful to delete folders other than the current one. If a folder is specified, delete that one; otherwise, delete the current one. Changelog-added: Allow specifying the folder to delete with `:rmdir`. Signed-off-by: Jason Cox <me@jasoncarloscox.com> Tested-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* query: allow forcing overwrite of existing folderBence Ferdinandy2024-06-239-14/+21
| | | | | | | | | | | | | | Currently, when using :query the user is forced to create a new folder for every query, since aerc doesn't allow overwriting an existing folder. Actually, "overwriting" an existing folder with a query is a non-destructive operation in the sense, that the underlying maildir is not touched, the only thing lost is the state in aerc. The current behaviour doesn't allow for a simple `:query -n query ` type of binding. Allow overwriting an existing folder with the -f flag. Changelog-added: Allow using existing directory name with `:query -f`. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* binds: allow per folder sections for the message viewerRobin Jarry2024-06-232-2/+5
| | | | | | | | | | Allow creating [view:folder=FooBar] in binds.conf. Changelog-added: Per folder key bindings can now be defined for the message viewer. Requested-by: Matěj Cepl <mcepl@cepl.eu> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Matěj Cepl <mcepl@cepl.eu>
* release.sh: better list dependency changesRobin Jarry2024-06-182-1/+101
| | | | | | | | | Instead of a dumb diff, add a script to render a pretty list of changed dependency versions. Separate the new and removed dependencies from the version updates. Signed-off-by: Robin Jarry <robin@jarry.cc>
* contributing: fix double backtickRobin Jarry2024-06-171-1/+1
| | | | | | | This breaks mardown conversion to html. Fixes: 70f46757449c ("logging: homogenize levels") Signed-off-by: Robin Jarry <robin@jarry.cc>
* selector: fix body text truncationRobin Jarry2024-06-161-0/+12
| | | | | | | | | | | | | | | | | When the selector dialog body text contains multiple lines, its height is adjusted automatically. Since commit 3d529aa09330 ("config: make popover dialogs configurable"), all text after the first line is truncated. This happens because SelectorDialog no longer satisfies the Dialog interface which got an extra ContextWidth() method. Implement that method using the full width. The [ui].dialog-* settings are ignored as they were before for that dialog. Fixes: 3d529aa09330 ("config: make popover dialogs configurable") Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
* wrap: fix wide CJK characters supportRobin Jarry2024-06-163-5/+139
| | | | | | | | | | | | | | | | | | | | Neither Chinese, Japanese nor Korean use spaces as words separators. It is OK to hard wrap before any symbol (except CJK punctuation which should probably stay attached to its previous symbol and not be left alone at the start of a line). I did not include Japanese Hiragana and Katakana symbols as word breaks on purpose since these are phonetic alphabets. It didn't make sense to wrap a line in the middle of a "word" made of these phonetic symbols. Update the code to allow considering either a space or a CJK known symbol as a split point for hard wrapping. Add test case with Chinese, Japanese and Korean generated lorem ipsum style text. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Runxi Yu <me@runxiyu.org>
* jmap: fix message list order directionRobin Jarry2024-06-051-1/+1
| | | | | | | | | | | | | Since the update to go-jmap 0.5.0, the IsAscending property is now taken into account even if it is false. The initial JMAP implementation wrongfully assumed the behaviour and inverted the sort -r logic. Fix that so that messages are ordered as expected. Link: https://git.sr.ht/~rockorager/go-jmap/commit/1db959676c10398a8 Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* commands: use AccountConfig.Backend instead of reflectBence Ferdinandy2024-06-053-14/+4
| | | | | | | | | Currently we use a convoluted way based on reflect to check what type of backend a command is running in. Use the new Backend variable available in AccountConfig instead to simplify the logic. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* hooks: add AERC_ACCOUNT_BACKEND to hooks with AERC_ACCOUNTBence Ferdinandy2024-06-059-0/+24
| | | | | | | | | | It can be good to know the backend used for an account in a hook. Add this information to all hooks that already pass the account name along. Changelog-added: Added `AERC_ACCOUNT_BACKEND` to hooks with `AERC_ACCOUNT`. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* templates: add .AccountBackendBence Ferdinandy2024-06-055-1/+36
| | | | | | | | | | | It's useful to know what the current account's backend is, especially if one has multiple configs where the same account name might use a different backend. Add AccountBackend to templates. Changelog-added: Added `{{.AccountBackend}}` to templates. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* hooks: add AERC_FOLDER_ROLE to hooks with AERC_FOLDERBence Ferdinandy2024-06-056-0/+21
| | | | | | | | | | It's logical to pass this information as well, when we pass a folder name. Changelog-added: Added `AERC_FOLDER_ROLE` to hooks that have `AERC_FOLDER`. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* accounts: skip accounts with errors instead of exitingBence Ferdinandy2024-06-051-6/+24
| | | | | | | | | | | | | | | | | | | | | | Currently, if something is wrong with an account, say the password command has issues, aerc will exit. When you have multiple accounts, not starting any of them does not make much sense. Instead of exiting, drop the account that failed to parse and log the appropriate error messages. Since the current behaviour when starting aerc with the -a flag is that if the user specifies an account that doesn't exist, aerc exits with an error, the above modification will still lead to aerc exiting when using the -a flag and having an unparsable account. Instead of exiting, log an error message. The only sideeffect of the above modifications, is that in case all the potential accounts are dropped, the user will be shown the new account dialog instead of exiting. Changelog-changed: Unparsable accounts are skipped, instead of aerc exiting with an error. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* jmap: bump go-jmap to v0.5.0Tim Culverhouse2024-06-042-3/+3
| | | | | | | | | Update go-jmap to latest release. Includes relevant jmap.ID validation for aerc Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* doc: fix the syntax for -d in the usage exampleJules Maselbas2024-06-041-2/+2
| | | | | | | The -d option expects `..` for a range and not `,` Signed-off-by: Jules Maselbas <jmaselbas@zdiv.net> Acked-by: Robin Jarry <robin@jarry.cc>
* doc: update and rephrase -H header search syntaxJules Maselbas2024-06-041-6/+7
| | | | | | | | | | | | | | | | | The syntax for the -H option's argument was confusing, warning about requiring the value to be from the header by a space without hinting that it also expect a single argument: requiring the query to be wrapped with quotes. Since 8464b3738 ("search: use a common api for all workers") the parser and the syntax has changed, now: the query is split around `:` without needing a space. Update the man page to reflect this change. Signed-off-by: Jules Maselbas <jmaselbas@zdiv.net> Reviewed-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* move: avoid crash when message list is not readyRobin Jarry2024-06-041-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following crash: panic: runtime error: invalid memory address or nil pointer dereference goroutine 1 [running]: runtime/panic.go:770 +0x132 git.sr.ht/~rjarry/aerc/lib.(*MessageStore).Selected(...) git.sr.ht/~rjarry/aerc/lib/msgstore.go:709 git.sr.ht/~rjarry/aerc/commands/msg.Move.CallBack() git.sr.ht/~rjarry/aerc/commands/msg/move.go:178 +0x78 git.sr.ht/~rjarry/aerc/commands/msg.Move.Execute.func1() git.sr.ht/~rjarry/aerc/commands/msg/move.go:75 +0x90 git.sr.ht/~rjarry/aerc/lib.(*MessageStore).Move.func1() git.sr.ht/~rjarry/aerc/lib/msgstore.go:645 +0x138 When a move operation finishes, the callback is invoked but there is no guarantee that the target account has any message store ready (e.g. IMAP may be disconnected). Only access acct.Store() in the happy code path and even there, only use store if is is not nil. Fixes: 40c25caafd58 ("mv: allow to move messages across accounts") Link: https://lists.sr.ht/~rjarry/aerc-devel/%3CD114PEHTFKRE.2R9XF4U2BBDD6@mailbox.org%3E Link: https://lists.sr.ht/~rjarry/aerc-devel/%3CD118R1N4XZ1X.1ZFQPGG8DSCDA@schaeffer.tk%3E Link: https://lists.sr.ht/~rjarry/aerc-devel/%3CD1B2PVIVGPOZ.1925R9LL60EAZ@disroot.org%3E Reported-by: Alex Freudenberg <alexfxd@mailbox.org> Reported-by: Evin Yulo <yujiri@disroot.org> Reported-by: Maarten Aertsen <sagi+aerc-devel@rtsn.nl> Reported-by: Yuri Schaeffer <yuri@schaeffer.tk> Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Tristan Partin <tristan@partin.io>
* jmap: skip Email/get call if no emails to getTristan Partin2024-06-041-0/+4
| | | | | | | | No need to send a JMAP request if there are no object to fetch. Signed-off-by: Tristan Partin <tristan@partin.io> Acked-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* app: propagate bell from the built-in terminalKarel Balej2024-06-041-0/+2
| | | | | | | | | Make aerc ring the terminal bell if a program running in it's built-in terminal attempts to do the same. Changelog-added: Propagate terminal bell from the built-in terminal. Signed-off-by: Karel Balej <balejk@matfyz.cz> Acked-by: Robin Jarry <robin@jarry.cc>
* sendemail-validate: put prefix directly after -t flagGregory Anders2024-05-291-1/+1
| | | | | | | | | On macOS the -t option must immediately precede the prefix template or else the generated temp name includes a newline (!), which causes the rest of the sendemail-validate script to fail. Signed-off-by: Gregory Anders <greg@gpanders.com> Acked-by: Robin Jarry <robin@jarry.cc>
* wrap: include xlocale.h header on macOSGregory Anders2024-05-291-0/+4
| | | | | | | | | | | | Compiling the wrap filter fails on macOS because the locale.h header does not include declarations for locale_t, freelocale, or newlocale. Instead, these are included in the xlocale.h header. We use a conditional include because glibc no longer ships the xlocale.h header in its distribution. Signed-off-by: Gregory Anders <greg@gpanders.com> Acked-by: Robin Jarry <robin@jarry.cc>
* jmap: fix go static check failureTristan Partin2024-05-291-1/+1
| | | | | | | | The missing variable was being set but unused. Fixes: 9f97c698e3dd ("jmap: fetch entire threads") Signed-off-by: Tristan Partin <tristan@partin.io> Acked-by: Robin Jarry <robin@jarry.cc>
* jmap: fix error messageTristan Partin2024-05-291-1/+1
| | | | | | | | A v1 got committed when a v2 existed. Fixes: f9113810cc6c ("jmap: invalidate cache if mailbox state is not consistent") Signed-off-by: Tristan Partin <tristan@partin.io> Acked-by: Robin Jarry <robin@jarry.cc>
* ui: add select-last-message optionKoni Marti2024-05-285-1/+22
| | | | | | | | | | | | | | Add a [ui].select-last-message option to position the cursor at the bottom of the message list view. Fixes: https://todo.sr.ht/~rjarry/aerc/254 Changelog-added: Add `[ui].select-last-message` option to position cursor at the bottom of the view. Suggested-by: Bence Ferdinandy <bence@ferdinandy.com> Requested-by: Tomasz Kramkowski <tomasz@kramkow.ski> Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Tomasz Kramkowski <tomasz@kramkow.ski> Acked-by: Robin Jarry <robin@jarry.cc>
* jmap: fetch entire threadsTristan Partin2024-05-285-32/+223
| | | | | | | JMAP was missing good thread support, especially when compared to Gmail. This will fetch entire threads when possible. Signed-off-by: Tristan Partin <tristan@partin.io>
* jmap: invalidate cache if mailbox state is not consistentTristan Partin2024-05-282-11/+57
| | | | | | | | | We weren't checking if the cached state was the same as the remote state before reading it. This led to aerc not knowing about new mailboxes on the remote. Signed-off-by: Tristan Partin <tristan@partin.io> Acked-by: Robin Jarry <robin@jarry.cc>
* sendemail-validate: optionally use patatt to attest patchesMatěj Cepl2024-05-281-1/+8
| | | | | | | | | | | | | | | One weakness of the email based workflow as used on Sourcehut is that git send-email strips all signatures from commits. patatt is not strict equivalent of signed commits, but at least there is a cryptographic attestation that the patch was send by the person it pretends it was sent. Optional, default off, switched on by setting $ git config --bool sendemail.runPatatt true Signed-off-by: Matěj Cepl <mcepl@cepl.eu> Acked-by: Robin Jarry <robin@jarry.cc>
* wrap: use nl_langinfo to get locale codesetMatěj Cepl2024-05-281-2/+6
| | | | | | | | | | | | Using more and more complicated constructs comparing locale strings doesn't lead to anywhere. Even with the current two steps long comparison the program is wrong on systems which use "utf8" in their locale names (e.g., my openSUSE/Tumbleweed). It is better to use proper locale functions to get canonical name of the current codeset. Link: https://lists.sr.ht/~rjarry/aerc-devel/%3CD1L7746XIJ3Z.3SN11SOVO175Q@cepl.eu%3E Signed-off-by: Matěj Cepl <mcepl@cepl.eu> Acked-by: Robin Jarry <robin@jarry.cc>
* binds: fix default d binding to actually ask a questionMatěj Cepl2024-05-281-1/+1
| | | | | | | | | The previous version of the binding must be intended for some older version of those commands, because it just could not work with the current version of aerc. Signed-off-by: Matěj Cepl <mcepl@cepl.eu> Acked-by: Robin Jarry <robin@jarry.cc>
* doc: fix new-account mentions for all protocolsRobin Jarry2024-05-286-8/+13
| | | | | | | | | | | The new-account wizard now supports all backends. Fixes: 28c7dd8746a0 ("wizard: add jmap support") Fixes: 459724889a62 ("wizard: add sendmail support") Fixes: a78814a9aa55 ("wizard: add notmuch support") Fixes: aa70b46fb3d5 ("wizard: add support for maildir") Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
* github: fix macos buildRobin Jarry2024-05-091-3/+17
| | | | | | | | | | setup-go@v2 does not work anymore. Let's not run on deprecated stuff. Update action versions. Also, homebrew base prefix has changed and is not in the default clang search path anymore. Update CGO_*FLAGS accordingly. Signed-off-by: Robin Jarry <robin@jarry.cc>
* config: fix typos in aerc.conf commentsRyan Winograd2024-05-091-2/+2
| | | | | | | | | I've recently started using aerc and I love it. I hope this exceedingly small contribution is helpful. Signed-off-by: Ryan Winograd <ryan@thewinograds.com> Acked-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* readme: fix broken arch binary linkJoey Schaff2024-05-091-1/+1
| | | | | | | | Modified the Arch binary link in README.md to not point towards a 404 page. Signed-off-by: Joey Schaff <j@jaoh.xyz> Acked-by: Robin Jarry <robin@jarry.cc>
* imap: fix panic in connectKoni Marti2024-05-091-2/+3
| | | | | | | | | | | | | Fix a nil pointer dereference panic in connect when trying to obtain the folder delimiter. There is a List call to the imap server that in some instances can return a nil *imap.MailboxInfo that is not checked before it is dereferenced. Link: https://lists.sr.ht/~rjarry/aerc-devel/%3CEDE672E5-3F6F-402D-B1A4-5477183FC13C@ukr.net%3E Reported-by: Misha <ulianich_mihail@ukr.net> Signed-off-by: Koni Marti <koni.marti@gmail.com> Reviewed-by: Tim Culverhouse <tim@tim.culverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* docs: remove msmtp noticeKarel Balej2024-05-091-3/+0
| | | | | | | | | Remove the warning about the behaviour of the msmtp --read-envelope-from flag with bouncing as it ceased to be true with the release of msmtp version 1.8.26. Signed-off-by: Karel Balej <balejk@matfyz.cz> Acked-by: Robin Jarry <robin@jarry.cc>
* msgstore: restore the directoryChange bool to fix new message bellKarel Balej2024-05-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 24eab0f5ef63 the condition under which the triggerDirectoryChange callback is executed was changed so that it would now only run if there were new messages in the currently scrolled into view part of the message list whereas previously it ran for new messages anywhere in the list. The motivation for this was to make the mail-received hook work even when the tab of the receiving account is not currently focused by fetching the new message's/s' headers needed for the hook to execute based on what changed in the scrolled into part of the list. This limitation is needed because apparently we don't currently have a better way to recognize new messages other than comparing the list of UIDs provided by the worker and that kept by the store. My current understanding is that we cannot remove the scroll view limit because then we would be fetching headers for all messages in the directory which can be a somewhat intensive operation. However we can disregard the view limit for the bell as that does not require the headers: it only cares about that something has changed. It is noteworthy that the bell is rung on aerc startup: I assume that this occurs with the initial load of the message store for every account when the else branch where directoryChange is set to true inevitably executes. Overall, this patch is more of a workaround than a proper fix: the ideal situation would be if we were able to fetch headers for new messages independently of the scroll status. However as this is how this was before, it should be suitable as a temporary solution. There are also further problems here: currently we have triggerNewEmail and triggerDirectoryChange callbacks which are both supposed to run when new mail is received, the latter only implicitly. And yet they both use a different mechanism and thus execute under different circumstances. It would be ideal to move the bell into the new mail trigger and get rid of the directory change one as it is otherwise unused. However this is not done here because for some setups the new mail trigger does not run until the tab is focused which is what the aforementioned commit was meant to fix but apparently succeeded in doing so only partially. The directoryChange trigger does not have this drawback and thus should be kept until the issue is resolved for all setups. Also note that for instance for O365 mail the bell still doesn't work properly as there new mail only appears in the store after the given folder is reopened (:prev-folder :next-folder) and the bell is thus rung only then. Fixes: 24eab0f5ef63 ("msglist: fetch headers even when not focused") Fixes: https://todo.sr.ht/~rjarry/aerc/249 Changelog-fixed: Restore previous behaviour of the new message bell which was broken in the last two releases for at least some setups. Signed-off-by: Karel Balej <balejk@matfyz.cz> Acked-by: Robin Jarry <robin@jarry.cc>
* app: make aerc satisfy the Beeper interface againKarel Balej2024-05-091-5/+3
| | | | | | | | | | | | | | During the Vaxis switchover, the Beeper interface was changed because Vaxis' Bell() function does not return error. However the corresponding change was not made on aerc making it not satisfy this interface and thus the DrawableInteractiveBeeper interface. This lead to the Bell function not getting registered making aerc unable to ring the terminal bell. Fix this. Fixes: 0fd5f4115792 ("ui: initialize vaxis directly, drop tcell.Screen initialization") Signed-off-by: Karel Balej <balejk@matfyz.cz> Reviewed-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* imap: add imaps+insecure modeMoritz Poldrack2024-05-012-0/+6
| | | | | | | | | | | | | | When connecting through environments bypassing hostnames, like SSH tunnels, the certificate verification of the server will fail, making it impossible to connect, if plain IMAP has been disabled. Add handling for the insecure modifier to the imaps connection. Changelog-added: Add `imaps+insecure` to the available protocols, for connections that should ignore issues with certificate verification. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* config: add tag-modified hook to default configMaarten Aertsen2024-04-161-0/+4
| | | | | | | | Add `tag-modified=` to the hooks section of aerc.conf. Signed-off-by: Maarten Aertsen <maarten@nlnetlabs.nl> Acked-by: Robin Jarry <robin@jarry.cc>
* config: add flag-changed hook to default configMaarten Aertsen2024-04-161-0/+4
| | | | | | | | | Add `flag-changed=` to the hooks section of aerc.conf, with a (commented) default corrensponding to the docs. Signed-off-by: Maarten Aertsen <maarten@nlnetlabs.nl> Acked-by: Robin Jarry <robin@jarry.cc>
* docs: correct flag-changed exampleMaarten Aertsen2024-04-161-1/+1
| | | | | | | | Correct the flag-changed example to use the flag-changed hook. Signed-off-by: Maarten Aertsen <maarten@nlnetlabs.nl> Acked-by: Robin Jarry <robin@jarry.cc>
* notmuch: fix disappearing messagesJulio B2024-04-141-1/+4
| | | | | | | | | | | The current implementation assumes that 'root[0].FirstChild' is nil, but this is not always the case. Instead of overwriting the FirstChild, detect and link the messages to the LastChild of root[0]. Fixes: 672b4edca7af ("notmuch: draw incomplete threads") Signed-off-by: Julio B <julio.bacel@gmail.com> Tested-by: Inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
* attach: use absolute paths instead of relativeBence Ferdinandy2024-04-142-1/+6
| | | | | | | | | | | | Sometimes it is easier to change folders when adding attachments, but currently we store relative paths, which doesn't work with this. Add the absolute paths when attaching files. Replace the current user home dir with ~ to make it prettier in the UI. Implements: https://todo.sr.ht/~rjarry/aerc/134 Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* notmuch: add completions for :cf, :filter and :searchBence Ferdinandy2024-04-142-4/+31
| | | | | | | | | | | Add completion of notmuch search-terms for :cf, :filter and :search. Implements: https://todo.sr.ht/~rjarry/aerc/244 Changelog-added: Notmuch completions for `:cf`, `:filter` and `:search`. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Tested-by: Julio B <julio.bacel@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* query: add completions for notmuch search-termsBence Ferdinandy2024-04-142-2/+60
| | | | | | | | | | | | | | Add completions to :query for the notmuch search terms. Most search terms that seemed valid for interactive use in aerc are listed as options. Some of them (from, to, tag, path, and folder) get actual completions. The function was designed, so later patches can reuse it to add completions to :cf, :filter and :search for notmuch accounts. References: https://todo.sr.ht/~rjarry/aerc/244 Changelog-added: Notmuch search term completions to `:query`. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Tested-by: Julio B <julio.bacel@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>