| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Mimic other backends that have centralized mappings. Doing so makes
adding support for the draft flag simpler in a subsequent commit.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I imagine no sane user requires aerc to correctly handle commands like
`:next-tab 1000000000`, but I tried anyway and it froze aerc while
also eating up many GBs of system memory. This behavior is not ideal,
so I improved it.
This commit adds functions for selecting a tab at an offset from the
currently-selected tab and changes the next-tab, prev-tab, and
change-tab commands to use these functions instead of looping.
Signed-off-by: delitako <delitako@delitako.xyz>
Tested-by: Thomas Böhler <witcher@wiredspace.de>
Reviewed-by: Thomas Böhler <witcher@wiredspace.de>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If pgp-attach-key is set in accounts.conf, the key is detached with
:detach and the signature removed with :sign, the key will be attached
again. When :sign is called again two keys will be attached instead of
one.
Fix this by not attaching a key if it cannot be detached.
Fixes: 9d90b70b4edf ("compose: refactor attachment handling")
Signed-off-by: Thomas Böhler <witcher@wiredspace.de>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
This latest version includes a bug-fix for incorrect path discovery for
some messages.
Signed-off-by: Michal Siedlaczek <michal@siedlaczek.me>
Reviewed-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new -a flag to :mv. When specified, an account name is required
before the folder name. If the destination folder doesn't exist,
it will be created whether or not the -p flag is specified.
Changelog-added: Move messages across accounts with `:mv -a <account>
<folder>`.
Signed-off-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new -a flag to :cp. When specified, an account name is required
before the folder name. If the destination folder doesn't exist,
it will be created whether or not the -p flag is specified.
Changelog-added: Copy messages across accounts with `:cp -a <account>
<folder>`.
Signed-off-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
When appending a message to a folder, always create the destination
folder if it doesn't exist.
Signed-off-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
In case of a config parsing error, print the file path of the file in
which the error occurred.
Fixes: https://todo.sr.ht/~rjarry/aerc/218
Signed-off-by: Michal Siedlaczek <michal@siedlaczek.me>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
An empty line is desirable before the signature but shouldn't be added
if there isn't actually a signature.
Fixes: b76bf1b ("templates: move signature from compose to templates")
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Add a hook to trigger when a message is sent.
References: https://todo.sr.ht/~rjarry/aerc/136
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Rewrite the imap idler to make it more fault tolerant and prevent hangs
(and possibly short writes).
Fixes: https://todo.sr.ht/~rjarry/aerc/208
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
The usage of '+' to match 'one or more occurrences' of a regex is only
POSIX compliant when used in an Extended Regular Expression (ERE).
Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html
Signed-off-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
| |
Add Thomas' real name.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new pgp-attach-key boolean setting in accounts.conf. When set to
true, enabling message signing (either automatically via pgp-auto-sign
or manually with :sign) will imply attaching the (public) key that will
be used to sign the message before sending.
The automatically attached key can be unattached like any other
attachment with :detach.
Implements: https://todo.sr.ht/~rjarry/aerc/207
Changelog-added: Automatically attach signing key with `pgp-attach-key`
in `accounts.conf`.
Requested-by: Drew Devault <sir@cmpwn.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Thomas Böhler <witcher@wiredspace.de>
Reviewed-by: Thomas Böhler <witcher@wiredspace.de>
|
|
|
|
|
|
|
|
| |
Select the correct body part for signed messages when forwarding.
Fixes: https://todo.sr.ht/~rjarry/aerc/214
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Select the correct body part for signed messages when quote-replying.
Simplify logic in the reply command for the part selection.
Fixes: https://todo.sr.ht/~rjarry/aerc/214
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add --aerc-conf, --binds-conf and --accounts-conf CLI flags, which
respectively override the default aerc.conf, binds.conf and
accounts.conf configuration files. If the specified files do not exist
or cannot be read, exit with an error.
Implements: https://todo.sr.ht/~rjarry/aerc/209
Changelog-added: CLI flags to override paths to config files.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new :menu command that can be used to spawn a shell command in an
interactive dialog and execute aerc commands for each of the lines
printed on its standard output like xargs(1) would do in a shell.
The shell command can be configured in aerc.conf under
[general].default-menu-cmd and overridden via the :menu -c <cmd> option.
There are two flags to provide input text to the shell command which can
be useful in combination with other aerc commands:
-a: All account names, one per line:
'<account>' LF
-d: All current account directory names, one per line:
'<directory>' LF
-ad: All directories of all accounts, one per line:
'<account>' '<directory>' LF
Here are some examples:
:menu -adc fzf :cf -a
:menu -c 'fzf --multi' :attach
:menu -dc 'fzf --multi' :cp
And also for key bindings:
<C-p> = :menu -adc fzf :cf -a<Enter>
Changelog-added: New `:menu` command to invoke other aerc commands
based on a shell command output.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Register all commands with the same function and store them in the same
map.
Use bit flags to determine in which contexts each command should be
available.
Remove duplicate commands now that the same command can be exposed in
multiple contexts.
Refactor API to allow executing commands from other commands without
import cycles.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
|
|
|
|
|
|
|
|
|
| |
Use the message from the current tab to populate the :envelope window.
Fixes: https://todo.sr.ht/~rjarry/aerc/213
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For some reason, a JMAP server may send message details with empty
blobId values. This is invalid but it should not cause a crash.
Error: runtime error: slice bounds out of range [-2:]
goroutine 16 [running]:
git.sr.ht/~rjarry/aerc/worker/jmap/cache.(*JMAPCache).blobPath()
git.sr.ht/~rjarry/aerc/worker/jmap/cache/blob.go:43 +0x95
git.sr.ht/~rjarry/aerc/worker/jmap/cache.(*JMAPCache).GetBlob()
git.sr.ht/~rjarry/aerc/worker/jmap/cache/blob.go:11 +0x18
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).handleFetchMessageBodyPart()
git.sr.ht/~rjarry/aerc/worker/jmap/fetch.go:116 +0x26f
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).handleMessage()
git.sr.ht/~rjarry/aerc/worker/jmap/worker.go:142 +0x25f
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).Run()
git.sr.ht/~rjarry/aerc/worker/jmap/worker.go:177 +0x105
git.sr.ht/~rjarry/aerc/app.NewAccountView.func3()
git.sr.ht/~rjarry/aerc/app/account.go:105 +0x57
created by git.sr.ht/~rjarry/aerc/app.NewAccountView in goroutine 1
git.sr.ht/~rjarry/aerc/app/account.go:98 +0x468
Ignore a blobId when it is an empty string.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tristan Partin <tristan@partin.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure that the encrypted and/or signed messages contain a correct
MIME-Version header field at the top level of the message in compliance
with RFC2045 Section 4.
Link: https://datatracker.ietf.org/doc/html/rfc2045#section-4
Link: https://lists.sr.ht/~rjarry/aerc-discuss/%3C1704071512-sup-2798%40honeycomb%3E
Reported-by: Dan Callaghan <djc@djc.id.au>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some clients are sending a text/plain part that contains nothing but the
text/html part. This is rather suboptimal when replying. To be able to
filter these, it is important to be able to detect things like
<!doctype html>.
Add basic string operations to the template functions.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Tested-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
The dates associated with tags and HEAD was always the previous tag. Fix
the indexing for date parsing.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the new Changelog-*: trailers it's important that trailers are not
misspelled accidentally and to cut down on trailer clutter. Add an
explicit list of accepted trailers with their preferred ordering and
some explanation where warranted to CONTRIBUTING. Enforce the list in
CI.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Check if the Changelog-*: trailers have proper English sentences
starting with a capital letter and ending in a period. Update
CONTRIBUTING with an explicit mention of this.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
The contributing guidelines ask for a use of a short prefix in the
commit title. Delegate nitpicking about the existence of the prefix to
the CI.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Reduce code duplication.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Modify the message date parser tests so they accept all the possible
parsing results, depending on the user's locale settings.
Fixes: 49a8cf10935f ("rfc822: improve dates parsing")
Reported-by: Jason Cox <me@jasoncarloscox.com>
Signed-off-by: Vitaly Ovchinnikov <v@ovch.ru>
Tested-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Notmuch query directories aren't backed by a filesystem directory, so
deleting them doesn't actually delete any messages. Allow removing such
directories even when they aren't empty to avoid the need to use the
somewhat scary -f flag.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Use the currently selected message part (if any) as the original message
for quote-reply and forward. Honor viewer::alternatives if no message
part was selected.
Signed-off-by: Sebastien Binet <s@sbinet.org>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
GetFolders returns the current account email folders, not filesystem
folders. Use CompleteDirs instead.
Fixes: abe228b14d97 ("commands: use completion from go-opt")
Fixes: https://todo.sr.ht/~rjarry/aerc/205
Reported-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Having both a string argument with a default value and an optional list
of strings breaks completion with go-opt.
Replace with a single argument and update all code accordingly.
Fixes: abe228b14d97 ("commands: use completion from go-opt")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Folders that contain spaces are surrounded by quotes. They can never end
with '/'. Hence they are never returned in the completion results.
Update CompletePath with an additional onlyDirs argument to take care of
this before quotes are inserted.
Fixes: abe228b14d97 ("commands: use completion from go-opt")
Fixes: https://todo.sr.ht/~rjarry/aerc/204
Reported-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function is overly complex, has code duplication and is not
preserving user input (converting all paths to absolute paths).
Simplify it and avoid converting relative paths to absolute ones.
Add unit tests to ensure it works as expected.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
| |
Add a script that deals with the proper formatting and ordering of git
trailers. Install it as commit-msg git hook so that everyone can benefit
from it.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
| |
Several settings have been deprecated a few versions ago and announced
their removal in 0.17.
Remove these deprecated sections and their uses.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, when composing a new message, everything is read from the
template files, except the signature, which is added directly in the
compose code. Add a new template variable {{.Signature}}, by moving the
logic of reading signature from command or file from compose to
templates. Update the various default template files to preserve the
original placement of signatures. Users using the default templates
should not notice the change. Users with custom compose templates will
need to update their templates with {{.Signature}}.
Changelog-changed: Signature placement is now controlled via the
`{{.Signature}}` template variable and not hardcoded.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Treat folded threads as one entity and apply any operation on its hidden
children as well.
Fixes: https://todo.sr.ht/~rjarry/aerc/206
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider a thread with a root message and three child messages, each of
which has a single child message, like so:
root
child 1
grandchild 1a
child 2
grandchild 2a
child 3
grandchild 3a
With the previous implementation, if child 2 (or child 3) is not shown
by the current query, then grandchild 2a (or grandchild 3a) will not be
shown either. Ensure that this bug does not occur; that is, ensure that
children of non-queried non-first-child messages are shown in threads.
A more complex implementation is possible that maintains only a single
loop over the messages, but thinking about it made my head hurt. Use a
second (at times redundant) loop instead for simplicity's sake.
Changelog-fixed: Don't lose child messages of non-queried parents in
notmuch threads
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Some OSes (e.g., Arch Linux) ship GNU Make but only provide the `make`
executable.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
this fixes a bug that prevented reading maildirs with paths containing
`:` characters, among other changes
changelog here: https://github.com/emersion/go-maildir/releases
Signed-off-by: George Honeywood <aerc@george.honeywood.org.uk>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
The alpine runner does not natively contain curl.
Add it to the list of required packages.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
There's no colorized filter.
Fixes: c56e938f9c82 ("doc: proofreading")
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
| |
For some reason there was none. Be consistent with wrap.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the maildir and notmuch backends, add the full path of the message
as Filename to templates. In case of a notmuch message having multiple
files associated with it, it returns a random path. Also add Filenames
to templates, which is a list of all associated message paths. This is
relevant for the notmuch backend, where a single messages is shown, if
there are multiple copies of it.
Changelog-added: Add filepath to messages in templates as .Filename(s)
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Make commands abbreviations work again by fixing the mistake introduced
in one of the recent commits.
Fixes: 07c1cefcf62d ("patch: create sub-command structure")
Signed-off-by: Vitaly Ovchinnikov <v@ovch.ru>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our way of building trees seems absurd: generate a list of prefixes,
reverse it, and trim the first element.
Change it so the string is built back to front and define the arrows
beforehand so they are easier to configure.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently if there are mails aerc can not properly handle, listing the
mailbox is aborted. This is especially bothersome if the message one is
looking for would be parseable without issue.
Show an error if parsing of a message fails, but handle all other
messages as normal. This leads to those messages showing up as still
loading.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Provide better parsing of email dates with timezone names, but without
numeric offsets. Add unit tests to check the new behaviour.
Signed-off-by: Vitaly Ovchinnikov <v@ovch.ru>
Acked-by: Robin Jarry <robin@jarry.cc>
|