aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* jmap: fix typo in man pageAiden Fox Ivey2024-07-171-1/+1
| | | | | | | Fix small typo within docs. Signed-off-by: Aiden Fox Ivey <aiden@aidenfoxivey.com> Acked-by: Robin Jarry <robin@jarry.cc>
* calendar: fix error with non-gnu awkTimon Reinold2024-07-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the POSIX-specified function Awk keyword instead of the non-standard func to define the prepare function in the text/calendar filter. The GNU Awk manual[1] mentions that gawk supports abbreviating function to func, but recommends against using the func abbreviation, as POSIX only specifies function. On my system (Debian sid), gawk isn't installed and mawk (Debian priority "required", i.e. installed by default) provides /usr/bin/awk instead. mawk appears to not support the abbreviated func keyword. When viewing a text/calendar part, I only see the following: awk: /usr/libexec/aerc/filters/calendar: line 211: return outside function body Using the standardized function keyword allows mawk to parse the prepare function (including its return) and execute the script as intended. [1]: https://www.gnu.org/software/gawk/manual/html_node/Definition-Syntax.html (section 9.2.1 "Function Definition Syntax") Fixes: 0db924dc14a3 ("filters: fix calendar filter parsing") Changelog-fixed: Builtin `calendar` filter error with non-GNU Awk. Signed-off-by: Timon Reinold <tirei+aerc@agon.one> Acked-by: Robin Jarry <robin@jarry.cc>
* depends-diff: only print changes if anyRobin Jarry2024-07-151-13/+16
| | | | | | | Only print the New, Updated and Removed sections if they contain changes. If there are no dependency changes, only print "none". Signed-off-by: Robin Jarry <robin@jarry.cc>
* Release version 0.18.10.18.1Robin Jarry2024-07-152-1/+11
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* smtp: take smtp-domain into account for tls connectionsRobin Jarry2024-07-151-2/+9
| | | | | | | | | | | | | smtp-domain is ignored when using smtps:// transport. It is only configured for clear text and STARTTLS connections. Also use it for TLS encrypted connections. Fixes: c10cb370bb94 ("config: add option for SMTP HELO/EHLO local domain") Changelog-fixed: `smtp-domain` is now properly taken into account for TLS connections. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io>
* smtp: fix error when setting smtp-domain with starttlsRobin Jarry2024-07-152-3/+3
| | | | | | | | | | | | | | | | | | | | | | Some MTA servers require clients to specify their fully qualified hostname in the HELO command. By default, go-smtp uses "localhost". SMTP error 504: <localhost>: Helo command rejected: need fully qualified hostname In go-smtp v0.21.0, there is a regression preventing manually issuing a HELO command after starttls authentication: Connection failed: Hello: smtp: Hello called after other methods The regression was fixed in go-smtp v0.21.3. Update our dependency. Fixes: 7c789624d7da ("mod: update all dependencies") Changelog-fixed: Error when trying to configure `smtp-domain` with STARTTLS enabled. Reported-by: Stefano <foxy@teapot.ovh> Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io>
* rfc822: make header parsing less pedanticRobin Jarry2024-07-152-66/+45
| | | | | | | | | | | | | When receiving invalid headers, just log the errors and move on with our life. When failing to decode addresses, do whatever is possible to at least make the message readable. Changelog-fixed: Aerc is now less pedantic about invalid headers for the maildir and notmuch backends. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Tested-by: Vitaly Ovchinnikov <v@ovch.ru> Tested-by: inwit <inwit@sindominio.net>
* log: create directories if necessaryJens Grassel2024-07-151-0/+5
| | | | | | | | | | | | | | If a log file is configured via `log-file` and the parent directory does not exist then aerc exits with an error message on startup. Check if the directory for the log file exists and create it if necessary using sensible permissions (0700). Errors occurring while creating the directory structure are returned and printed out. Changelog-fixed: Startup error if `log-file` directory does not exist. Signed-off-by: Jens Grassel <jens@wegtam.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* Release version 0.18.00.18.0Robin Jarry2024-07-022-1/+88
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* ui: make textinput grapheme awareTim Culverhouse2024-07-022-22/+37
| | | | | | | | | | | | | | | | | The textinput widget operated on a slice of runes, and naively assumed a rune was a "character". When deleting or navigating the cursor through text which contains multi-codepoint characters (such as emoji), the cursor index could desync and cause panics. Use a slice of vaxis.Characters instead of runes to more accurately reflect the index state of the cursor with respect to characters. Fixes: https://todo.sr.ht/~rjarry/aerc/263 Reported-by: Bence Ferdinandy <bence@ferdinandy.com> Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Reviewed-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* mk: handle stale files when scdoc failsBrandon Maier2024-07-021-0/+2
| | | | | | | | | | | | | | | If scdoc fails for any reason, for example because a user hasn't installed it yet, the `> $$@` redirection will still create an empty destination file. On re-runs gmake will see the empty file and assume the target has already completed. This led to installing a blank man page. Use the GNU Make '.DELETE_ON_ERROR' special target which automatically deletes the target if a recipe fails. Link: https://www.gnu.org/software/make/manual/html_node/Special-Targets.html#index-removing-targets-on-failure Signed-off-by: Brandon Maier <brandon.maier@collins.com> Acked-by: Robin Jarry <robin@jarry.cc>
* rfc822: be liberal with invalid address headersRobin Jarry2024-07-022-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | Some email clients format email addresses with quotes around B encoded names. E.g.: "=?utf-8?B?U21pZXRhbnNraSwgV29qY2llY2ggVGFkZXVzeiBpbiBUZWFtcw==?=" This seems non standard. I tried reading the multiple RFCs that describe the MIME headers encoding but could not find any precise answer to determine if adding quotes around encoded words is valid or not. In any case, ParseAddressList completely ignores any encoding when it encounters a double quote. When that happens, try to detect it and force decoding a second time after the quotes have been removed. Link: https://datatracker.ietf.org/doc/html/rfc2045#section-3 Link: https://datatracker.ietf.org/doc/html/rfc2047#section-2 Link: https://datatracker.ietf.org/doc/html/rfc822#section-3.3 Reported-by: Bence Ferdinandy <bence@ferdinandy.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: wait random delay before un-flipping tablesRobin Jarry2024-07-021-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unflipping tables instantly is not very considerate and certainly does not have the same emotional impact compared to waiting for a moment to digest the table flipping. Wait for a random period of time using a log normal distribution: | # | # # | # # | # # | # # | # # # | # # # # | # # # # | # # # # # | # # # # # # | # # # # # # # | # # # # # # # # | # # # # # # # # # # # # | # # # # # # # # # # # # # # # # . . . +----------------------------------------------------- 0 1 2 3 4 5 6 7 8 delay(seconds) Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
* jmap: do not keep invalid sessions in cacheRobin Jarry2024-07-028-58/+59
| | | | | | | | | | | If a session is found in the cache, check that it works by issuing a GetIdentities request. If that request fails, invalidate the cache and go through the authentication. Ensure that the session is valid and explicitly fail if it is not. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
* imap: report errors from serverRobin Jarry2024-07-013-24/+50
| | | | | | | | | | | | Avoid eternal spinner on the message list when the imap server advertises some message UIDs but fails to provide their headers when aerc asks from them. When an error occurs, or if some UIDs are not returned, make sure to report the errors to the message list UI. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io>
* rfc822: properly parse address listsRobin Jarry2024-06-291-10/+7
| | | | | | | | | | | | | | | | h.Text() parses blobs of encoded text without taking into account specific handling for email addresses. h.AddressList(key) uses mail.ParseAddressList(h.Get(key)) already deals with charsets and quoted-printable stuff. Pass it the raw header value. In some cases, mail.ParseAddressList will return a list of addresses *and* an UnknownCharset error. In this specific case, ignore the error. Fixes: https://todo.sr.ht/~rjarry/aerc/257 Reported-by: Inwit <inwit@sindominio.net> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Inwit <inwit@sindominio.net> Reviewed-by: Tristan Partin <tristan@partin.io>
* jmap: revert fetch threads supportRobin Jarry2024-06-295-227/+32
| | | | | | | | | | | | | | This reverts commits: 9e93d9efdb88 ("jmap: fix go static check failure") 0465509eedad ("jmap: skip Email/get call if no emails to get") 9f97c698e3dd ("jmap: fetch entire threads") Issues have been reported about disappearing sent messages. Reported-by: Tristan Partin <tristan@partin.io> Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tristan Partin <tristan@partin.io>
* ircbot: implement table unflippingRobin Jarry2024-06-281-0/+6
| | | | | | | | Some IRC users have a tendency to flip tables when they are upset. Improve our bot to put furniture back where it belongs. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: improve karma pluginRobin Jarry2024-06-281-14/+23
| | | | | | | Handle NICK++ and NICK-- in the middle of sentences. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: import upstream karma pluginRobin Jarry2024-06-283-0/+578
| | | | | | | | | Just a copy of the upstream code verbatim. I'll patch the plugin in the next commits. Link: https://github.com/progval/Limnoria/tree/a6aa553/plugins/Karma Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: use tabs for nginx configRobin Jarry2024-06-281-25/+25
| | | | | | | Who indents nginx config files with 8 spaces? Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: update nginx config after sourcehut migrationRobin Jarry2024-06-281-3/+2
| | | | | | | | Since January 2024, Sourcehut infra has moved to the EU. Their IP block was changed. Update our nginx config accordingly. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: update webhook to handle applied patchesRobin Jarry2024-06-282-23/+102
| | | | | | | | | | | Register another webhook for all received emails and track the X-Sourcehut-Patchset-Update header value. If it is APPLIED, then send an IRC announce accordingly. Use green for "applied" and light gr{e,a}y for "received". Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* main: add aliases for flags and optionsRobin Jarry2024-06-282-19/+28
| | | | | | | | | | Add --help and --version as aliases of -h and -v, respectively. Also add short flags for other options. Reported-by: Peter Sanchez <pjs@petersanchez.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* main: detect invalid arguments earlyRobin Jarry2024-06-281-0/+10
| | | | | | | | | | | | | | | | | | | | | Currently, when running aerc --help or aerc --version, we get an obscure error when aerc is already running. $ aerc --help response: command not understood When it is not running, it starts but prints the same error message in the status line with weird colors. Avoid sending garbage into the control socket. Try to detect invalid arguments early. $ aerc --foobaz error: unknown argument: --foobaz Reported-by: Peter Sanchez <pjs@petersanchez.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* wrap: fix cjk prose ratio on macosRobin Jarry2024-06-251-15/+46
| | | | | | | | | | | | | | | Depending on the locale and the libc implementation, iswalpha() may return true or false for CJK symbols. Reuse the same logic as in the split point detection introduced in commit 99bc69918ea7 ("wrap: fix wide CJK characters support"). Include all missing Korean and Japanese specific Unicode blocks. Handle syllabic symbols with a parameter to avoid wrapping in the middle of syllables. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Gregory Anders <greg@gpanders.com>
* threadbuilder: allow threading by subjectRobin Jarry2024-06-257-12/+43
| | | | | | | | | | | | If no match were found in the References and In-Reply-To headers, allow threading by looking at subjects. This behaviour is disabled by default. Add a setting to enable it. Changelog-added: Allow fallback to threading by subject with `[ui].threading-by-subject`. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Matěj Cepl <mcepl@cepl.eu>
* threadbuilder: show siblings even when no parent foundKoni Marti2024-06-258-32/+62
| | | | | | | | | | | | | | | Show all threading associations even when not all nodes are present. Indicate if a thread is incomplete, i.e. misses a direct parent node. Use the `msglist_thread_orphan.fg=red` styleobject in your stylesheet to indicate whether a messsage has a missing parent. Also use a different thread prefix ("┬─" instead of "├─") not to confuse them with regular threads that have a visible parent. Signed-off-by: Koni Marti <koni.marti@gmail.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Matěj Cepl <mcepl@cepl.eu>
* 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>