aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* doc: MIME type consistency spellingKirill Miazine2023-09-181-1/+1
| | | | | | | | Refer to MIME type as "MIME type", as that's how it's being called elsewhere. Signed-off-by: Kirill Miazine <km@krot.org> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* maildir: log mail checking errors, if anyVitaly Ovchinnikov2023-09-181-1/+8
| | | | | | | | | | | | Add the logging of stdout/stderr of mail checking process in maildir worker if it returns an error. The user still sees just the exit status, but log gets a more detailed information for further analysis. Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz> Acked-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
* compose: add option for LF-only editorsMoritz Poldrack2023-09-184-9/+46
| | | | | | | | | | | | Some editors only support LF line endings. For these, standard compliant eml files are not an option. Add an option compose.lf-editor to translate the eml file to lf lineendings. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc> Tested-by: Matěj Cepl <mcepl@cepl.eu>
* msgviewer: show attachment file names first if possibleVitaly Ovchinnikov2023-09-052-6/+99
| | | | | | | | | | | | | | | | | | | | Change the parts switcher so it displays the file names first (if any) and then the mime types. The mime types are aligned to the right to help the file names to be more visible. If there is no file name - the mime type is displayed on the left, as usual. The idea is that the file name (if present) is more important than the mime type. Especially when both file names and mime types are long - this quickly becomes a mess. If there is no space for both file name and mime, the mime type is truncated with ellipsis. If there is no space for mime at all - it is dropped completely. If then there is no space for the file name, it is also truncated with ellipsis. Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Inwit <inwit@sindominio.net>
* compose: delete empty headersRobin Jarry2023-09-051-2/+4
| | | | | | | | | | | | | | When [compose].edit-headers=true and emptying a header in the text editor (not deleting it, only deleting its contents), the operation is ignored and the header is preserved as-is. Delete the header after exiting the text editor if the header is empty or not present. Make sure not to add empty headers. Fixes: 11e5390fa0ac ("compose: implement embedded headers in editor") Reported-by: Inwit <inwit@sindominio.net> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Inwit <inwit@sindominio.net>
* doc: clarify notmuch+maildir behavior with respect to filesinwit2023-09-041-3/+9
| | | | | | | | | | While notmuch mainly deals with messages and queries, adding either of *maildir-store* or *maidlir-account-path* will give the impression that aerc actually deals with files and folders under the notmuch interface. Clarify this point to avoid confusions. Signed-Off-By: inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
* colorize: handle spaces in stylesetRobin Jarry2023-09-045-77/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid failure when the styleset [viewer] section contains spaces: ~$ cat foo [viewer] url.fg = #ffffaf url.underline = true header.fg = #af87ff signature.fg = #af87ff diff_meta.fg = #ffffff diff_meta.bold = true diff_chunk.fg = #00cdcd diff_add.fg = #00cd00 diff_del.fg = #cd0000 quote_1.fg = #5fafff quote_2.fg = #ff8700 quote_3.fg = #af87ff quote_4.fg = #ff5fd7 quote_x.fg = #808080 ~$ ./colorize -s foo < bar.eml error: invalid style attribute 'fg ' Be more restrictive with what characters are part of a style attribute. Add test styleset with as much weirdness as possible. Update vectors accordingly. Update sendemail-validate hook to export pedantic CFLAGS. Reported-by: Tristan Partin <tristan@partin.io> Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tristan Partin <tristan@partin.io>
* msgstore: ensure selection when calling sortTim Culverhouse2023-08-311-0/+5
| | | | | | | | | | | | | | | When using notmuch and changing labels, there is no reselection logic as there is when using a :mv command for other backends. This results in any label change that removes the message from the current query in having no selection. Add some simple reselection logic in the Sort callback so any call to Sort (which will refresh the message list) ensures the previously selected message is still selected, and if it isn't in the store anymore we select the same index of message as was previously selected. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
* notmuch: internally sort threads newest firstTim Culverhouse2023-08-311-1/+11
| | | | | | | | | For proper thread ordering, notmuch needs to use a SORT_NEWEST_FIRST sort order in it's query, and then we reverse the thread order. Also give a maximum guess for size of slice we'll be returning. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* notmuch: refactor SetFlagTim Culverhouse2023-08-311-17/+10
| | | | | | | | | Refactor SetFlag to be more readable by handling the special case of SeenFlag in a cleaner way. If we invert the operation ('enable') instead of invert the oldState, we can use the same logic for any tag. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* notmuch: track database stateTim Culverhouse2023-08-314-63/+77
| | | | | | | | | Track the notmuch database state. When a state change is detected, query if any changes affect the current query then send updates accordingly. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
* notmuch: fix modify labels dropping threadingTim Culverhouse2023-08-311-7/+4
| | | | | | | | | | | When using the notmuch backend, any modifications of labels changes the UI to an unthreaded state. Don't send a fresh DirectoryContents, and instead instruct the UI to fetch a new message list based on current threading/sorting/filtering criteria. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
* notmuch: check context when opening directoryTim Culverhouse2023-08-311-0/+3
| | | | | | | | | | Check for a canceled context when opening a directory with notmuch. The OpenDirectory message carries a context tied to the directory lister - checking for the context error can prevent us from opening a directory that has already been deselected (even after the dirlist-delay period) Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* mbox: remove datacounter dependency for size infoTim Culverhouse2023-08-313-12/+11
| | | | | | | | | | | | The mbox worker uses the only reference to the datacounter object (see previous commit where it was removed from 'postpone'). The counter object in mbox is counting the size of the mbox message. Use io.Discard and the result from the io.Copy call to set this size. This saves us from writing to memory, since io.Discard will not store any of the written bytes. It also removes the dependency on datacounter. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* postpone: remove datacounter passthrough writerTim Culverhouse2023-08-311-7/+5
| | | | | | | | | Remove the use of package datacounter and it's passthrough write counter. We can directly get the quantity of bytes written to our buffer with buf.Len() Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* dirlist: fix capturing of dirlist vars when selecting directoryTim Culverhouse2023-08-302-26/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The directory selecting logic allows for a delay in issuing the command to the backend. This delay is part of a goroutine which is supposed to capture variables intended to be used in a callback to set the selected directory. The callback does not capture the variable properly, specifically the context and the "dirlist.selecting" value. This results in contexts not being cancelled properly and incorrect selection logic. The flow of the issue only occurs when the delay is sufficiently low: 1. The user scrolls rapidly through the directory list. Each time passing over a directory, dirlist.selecting is set to that directory and a context is created for this selection. 2. If the delay is low enough that the context was not cancelled before the Action was posted, the worker could actually open this directory. The captured context is actually referencing to the _current_ context of the dirlist, and so even if this OpenDirectory Action makes it to the worker, which might properly check to see if the context is cancelled, it will be referring always to the current context and not be cancelled. 3. When posting back the Done result, the callback is processed. dirlist.selecting and the context are no longer referring to the values used when this Action was made. The backend thinks it has opened Directory A, but the callback sets the dirlist.selected to Directory B 4. The account widget grabs the selected msgstore (Directory B, even though the backend thinks its A). Sort messages are called, and all sorts of things are sent to the backend which now is out of sync. 5. Eventually this all comes back into sync once the correct directory has churned it's way through the worker and back to the account. Move the callback into the dirlist.Update method to ensure proper capture of all variables involved. Only reference the values set in the message instead of those referring to the dirlist. This ensures that the worker and UI are always in agreement for which directory is selected. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Koni Marti <koni.marti@gmail.com>
* notmuch: remove unused codeTim Culverhouse2023-08-301-15/+0
| | | | | | | The thread.go file hasn't been used for a long time. Remove it. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* notmuch: replace notmuch library with internal bindingsTim Culverhouse2023-08-306-321/+212
| | | | | | | Replace the notmuch library used with our internal bindings. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* notmuch: add notmuch bindingsTim Culverhouse2023-08-3011-0/+1078
| | | | | | | | | aerc is using an unmaintained fork of a not-well-functioning notmuch binding library. Add custom bindings directly into the aerc repo to make them more maintainable and more customizable to our needs. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* mk: evaluate variables with $(shell)Robin Jarry2023-08-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we use GNU make, instead of deferred evaluation when running the target commands, use $(shell) to evaluate commands when parsing the makefile and print prettier build commands. Before: go build -trimpath `contrib/goflags.sh` -ldflags \ "-X main.Version=`git describe --long --abbrev=12 --tags --dirty 2>/dev/null || echo 0.15.2` \ -X main.Flags=$(echo -- `contrib/goflags.sh` | base64 | tr -d '\r\n') \ -X git.sr.ht/~rjarry/aerc/config.shareDir=/usr/local/share/aerc \ -X git.sr.ht/~rjarry/aerc/config.libexecDir=/usr/local/libexec/aerc" \ -o aerc After: go build -trimpath -tags=notmuch -ldflags \ "-X main.Version=0.15.2-174-gf25e038dacd7-dirty \ -X main.Flags=LS0gLXRhZ3M9bm90bXVjaAo= \ -X git.sr.ht/~rjarry/aerc/config.shareDir=/usr/local/share/aerc \ -X git.sr.ht/~rjarry/aerc/config.libexecDir=/usr/local/libexec/aerc" \ -o aerc Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* postpone: change recall/postpone logic for custom foldersVitaly Ovchinnikov2023-08-305-32/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change `:recall -f` behavior so it remembers the source folder the message is taken from and the further `:postpone` call can save it back to that folder. Change the `:recall` tab closing behavior, so it no longer asks if the recalled message needs to be deleted. This is now done automatically. Add an optional `-t <folder>` parameter to `:postpone`, so the message can be saved in a different folder. Change `:postpone` behavior, so it checks if the message was force-recalled from a different folder, and then it saves the message there. The "breaking" change is made to the closing handler of the recalled message tab. There was a confirmation dialog that asked if the recalled message needs to be deleted. This is now removed and replaced with a pretty simple logic: if the recalled message is either sent or re-postponed - it is safe to delete the original. Otherwise (if the recalled message editing is discarded, any other reasons?) the message is left intact, there is no need to ask for deleting it. If the user don't need that message - they can delete it manually. Another "breaking" change to the same handler is that it always works this way regardless of the curently selected folder. There was an `if` that checked that, but as the recalled messages are now only deleted if they are re-sent or re-postponed, it seems that there is no need to check the current folder anymore. Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz> Acked-by: Robin Jarry <robin@jarry.cc>
* compose: use email domain name in Message-IdAdnan Maolood2023-08-286-7/+42
| | | | | | | | | | | | | RFC 5322 recommends using a domain name on the right-hand side of the "@" in Message-Ids. Since the local host domain name cannot be obtained reliably, use the sender email domain name by default. Add a new configuration option to maintain the old behavior. Link: https://www.rfc-editor.org/rfc/rfc5322.html#section-3.6.4 Signed-off-by: Adnan Maolood <adnan@maolood.com> Acked-by: Robin Jarry <robin@jarry.cc>
* xdg: get rid of deprecated dependenciesRobin Jarry2023-08-2722-181/+66
| | | | | | | | | | | github.com/mitchellh/go-homedir has not received any update since 2019. The last release of github.com/kyoh86/xdg was in 2020 and it has been marked as deprecated by its author. Replace these with internal functions. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
* xdg: add functions to deal with user home pathsRobin Jarry2023-08-274-0/+403
| | | | | | | | | | | | | These are intended to replace the following deprecated libraries: github.com/kyoh86/xdg github.com/mitchellh/go-homedir The feature set should be roughly equivalent with some tweaks to make our life easier in aerc. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
* wizard: improve welcome screenRobin Jarry2023-08-262-3/+6
| | | | | | | | | | The wizard now supports all protocols. Adapt welcome text accordingly. Display key bindings in a more consistent manner. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: add sendmail supportRobin Jarry2023-08-261-2/+30
| | | | | | | | Allow users to configure sendmail as outgoing protocol. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: add notmuch supportRobin Jarry2023-08-261-3/+53
| | | | | | | | Allow users configuring notmuch as email source. Try to determine configuration based on notmuch config commands. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: add support for maildirRobin Jarry2023-08-261-5/+41
| | | | | | | | Allow users configuring aerc for maildir. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: add jmap supportRobin Jarry2023-08-261-9/+42
| | | | | | | | | | | | | | Use DNS SRV discovery for JMAP along with the /.well-known/jmap URL path. Add sane defaults to accounts.conf. Also support JMAP as outgoing protocol. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tim Culverhouse <tim@timculverhouse.com> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: add oauth & xoauth optionsRobin Jarry2023-08-261-1/+11
| | | | | | | | These may be needed for some users. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: add imap cache-headers default settingRobin Jarry2023-08-261-3/+20
| | | | | | | | | | This seems like a sane default. Set it to true in accounts.conf. Add a note in the final screen to encourage users to review accounts.conf at their convenience. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: do not require full nameRobin Jarry2023-08-261-8/+7
| | | | | | | | Allow users to omit their full name. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: factorize ui layoutRobin Jarry2023-08-261-219/+156
| | | | | | | | | | Avoid code duplication. Use a struct to store all fields along with their respective labels. Generate a ui.Grid at once with the correct padding between the fields. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: better url generationRobin Jarry2023-08-261-44/+40
| | | | | | | | | Prepare for other protocols. Do not expect that there will be an username/password. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: add protocol & transport fieldsRobin Jarry2023-08-262-89/+152
| | | | | | | | | | | | | In preparation for other protocols, add a new "Protocol" field both in the source and outgoing sections. For now, there is only one source protocol and one outgoing protocol. Rename the "mode" fields to "transport". They will be reused later to include different authentication mechanisms. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: autofill improvementsRobin Jarry2023-08-261-18/+30
| | | | | | | | | | | | | | * Do not determine the IMAP server based on the email domain. It will most of the time be incorrect. * Only mirror the email address in usernames if they are unset. * Only mirror the IMAP username & password into their SMTP counterparts if these are unset. * Try to guess the SMTP server based on the IMAP server only if the former is empty. * Only display the password warning if the user did type a password. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: rename incoming to sourceRobin Jarry2023-08-261-138/+136
| | | | | | | | | | | | | | | | | | | Rename stuff in preparation of support for other protocols. Match the terminology from accounts.conf. This patch is more or less the result of the following command (with some manual tweaks and cleanups): sed -i -r -e 's/_INCOMING/_SOURCE/g' \ -e 's/IMAP_//g' \ -e 's/SMTP_//g' \ -e 's/([\.[:space:]])imap/\1source/g' \ -e 's/([\.[:space:]])smtp/\1outgoing/g' \ widgets/account-wizard.go Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: allow setting special copy-to folderRobin Jarry2023-08-261-16/+7
| | | | | | | | | | | Instead of a boolean, allow specifying the exact folder where to copy sent messages. Depending on the IMAP provider, the folders may be different. Instead of putting a default value which may not be correct, leave it empty. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: fix typo in validationRobin Jarry2023-08-261-1/+1
| | | | | | | | Require that smtpServer is not empty. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* wizard: close open fileRobin Jarry2023-08-261-0/+1
| | | | | | | | Avoid leaking open file descriptors. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* export-mbox: better path suggestion and name completionVitaly Ovchinnikov2023-08-251-8/+11
| | | | | | | | | | | | Change the `:export-mbox` path completion algorithm, so it works the same as `:import-mbox`: the user can select folders with auto-complete, the ~ symbol works as home folder and so on. Move the automatic mbox-file naming into the export function and only use it if the user-supplied path is an existing folder. Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz> Acked-by: Robin Jarry <robin@jarry.cc>
* dirlist: apply unread style on top of recent styleKeenan Gugeler2023-08-251-4/+4
| | | | | | | | | In the documentation, we specify that the `dirlist_recent` style applies on top of the `dirlist_unread` style, but the switch statement we had only applied one of the two. Signed-off-by: Keenan Gugeler <me@kgugeler.ca> Acked-by: Robin Jarry <robin@jarry.cc>
* review: don't replace space escapesKeenan Gugeler2023-08-251-1/+0
| | | | | | | | | | Currently we replace `<space>` in the output column in the review pane. This causes the default actions `:attach<space>` and `:detach<space>` to not be correctly named, and causes a mismatch between `binds.conf` and the displayed bindings. Signed-off-by: Keenan Gugeler <me@kgugeler.ca> Acked-by: Robin Jarry <robin@jarry.cc>
* review: sort unknown review commandsKeenan Gugeler2023-08-251-0/+7
| | | | | | | | | | Currently, the unknown commands in the review window appear in an undefined order, since `go-ini` gives us a `map`. Instead, we should sort them by inputs, otherwise the ordering can get confusing between restarts of aerc. Signed-off-by: Keenan Gugeler <me@kgugeler.ca> Acked-by: Robin Jarry <robin@jarry.cc>
* config: add missing configuration file annotationKarel Balej2023-08-241-6/+9
| | | | | | | | | Describe the changes introduced by 180fffa92ec7 also directly in the example configuration file. Fixes: 180fffa92ec7 ("commands: allow reading attachments from a file") Signed-off-by: Karel Balej <balejk@matfyz.cz> Acked-by: Robin Jarry <robin@jarry.cc>
* mk: fix typosRobin Jarry2023-08-241-2/+2
| | | | | | | | Nothing serious but let's cleanup our mess. Fixes: d725defa07b5 ("mk: deprecate BSD make in favor of GNU make") Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Karel Balej <balejk@matfyz.cz>
* ci: use make -C instead of changing directoriesRobin Jarry2023-08-242-20/+9
| | | | | | | This is a matter of preference. I prefer -C over changing dirs. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Karel Balej <balejk@matfyz.cz>
* ci: run all testsRobin Jarry2023-08-241-1/+1
| | | | | | | Do not restrict to go tests only. Also run filter tests. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Karel Balej <balejk@matfyz.cz>
* commands: allow reading attachments from a fileKarel Balej2023-08-243-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | Currently, aerc reads a list of files to be attached to a message from the file-picker-cmd's standard output. However, this doesn't play nice with ranger which seems to draw itself by writing there, causing it to be invisible in the embedded terminal. In fact, instead of using a pipe, aerc redirects the output of the command to a temporary file and then reads the list of files from there. Take advantage of this approach and allow user to directly reference this temporary file in the file-picker-cmd via the %f placeholder, which gets expanded to the temporary file's location. If the %f placeholder isn't present, keep the old behaviour. So for example, now it is possible to do: file-picker-cmd=ranger --choosefiles=%f in aerc.conf. Signed-off-by: Karel Balej <balejk@matfyz.cz> Acked-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
* doc: add MessageId to aerc-templates.7Tim Culverhouse2023-08-241-0/+6
| | | | | | | | | | {{.MessageId}} is available within templates but undocumented. Previously, users could have surmised a way to get the message ID using {{.Header "message-id"}}, but since this is built into the struct already, document it for ease of use. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Moritz Poldrack <moritz@poldrack.dev>