| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When selecting a message part that has no filter configured, aerc uses
very high CPU.
This is due to a recursive UI invalidation. PartViewer.Draw() calls
newNoFilterConfigured which calls ui.Grid.AddChild which in turn calls
ui.Invalidate() which causes the whole UI to be redrawn.
Call newNoFilterConfigured only once when creating a new part viewer
(only when there is no filter command).
Reported-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Willow Barraco <contact@willowbarraco.fr>
|
|
|
|
|
|
|
| |
It should be a top level item.
Fixes: f10b184eb346 ("hooks: add aerc-startup hook")
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
These are from my own config. They may be helpful to others.
Remove "q" to quit from the message list without confirmation. Add
<ctrl-c> and <ctrl-q> to quit from any context.
Suggested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default `:open` leaves its temporary files in the temp directory. The
patch adds an option `-d` that defers the deletion of the temporary file
when the opener is started.
This works well with "sync" openers that don't exit until the user is
done with the preview, but may not work with "async" openers that pass
the file to their parent process and exit. That's why the automatic
deletion needs to be intentionally enabled by using the option.
Suggested-by: Robin Jarry <robin@jarry.cc>
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
| |
This just looked weird.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
/usr/libexec was not listed in the default search $PATH. Add it to match
the man page.
Fixes: 04303172d4f9 ("filters: install them in $PREFIX/libexec/aerc/filters")
Signed-off-by: Sebastian LaVine <mail@smlavine.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a small script to install a sourcehut webhook that triggers on
patchset reception.
Add a limnoria (supybot fork) plugin to receive the webhook requests and
send IRC NOTICE messages on the proper channels.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the behavior of `names`, `firstnames` and `initials` functions in
templates so they better process names formatted like this:
"Last Name, First Name"
Basically, if the name contains one (and only one) comma, its parts are
flipped so the first name always goes first.
This helps to do "Hello Name" in templates regardless of the name format
in email address. Also if the template uses a full name it will make it
"Hello FirstName LastName" instead of "Hello LastName, FirstName".
Add tests to cover more complex names in the future.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
:search is mentioned in the help of :filter of aerc(1), but is not
"documented" which might be confusing for new users. Add a shallow entry
that points to aerc-search(1).
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
| |
Remember selected folder and message when reconnecting. This is mostly
useful for the imap backend when logouts or reconnects happen a lot.
Fixes: https://todo.sr.ht/~rjarry/aerc/159
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
| |
Reuse the same logic than colorize.c to allow parsing markdown links.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only call UidSort with some sort criteria. If we call it without,
some imap severs report it as an error.
For example, Fastmail imap with the sort config in aerc.conf commented
out reports: "[Fastmail] unexpected error: Missing Sort criteria" and
cannot display the messages.
Fixes: https://lists.sr.ht/~rjarry/aerc-devel/%3C5955665f-4d1a-4295-86bd-d1a5eabd0d6d%40milic.suse.cz%3E
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When opening an attachment with :open command we make a temporary file
and open it then. The file is named randomly, but the extension is
derived from the attachment parameters.
This patch checks if the attachment has a file name assigned and takes
the extension from there. Otherwise it rolls back to the original
mime-based extension generation.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
When archiving a message, the counts of archive folder are changed.
When use-labels=true, the archive folder is hidden and should remain so.
Do not send updates to the UI.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
Document folder-map option in aerc-accounts.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the folder-map functionality to the maildir backend. If the
folder-map config option is specified, the folder-map worker middleware
is used.
Unroll the worker.PostMessageInfoError function for a streamlined
WorkerInteractor interface.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Add the folder-map functionality to the imap backend. If the folder-map
config option is specified, the folder-map worker middleware is used.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Combine the query-map and folder-map parsing functionality. Add tests.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Implement a folder-map middleware that will translate the folder names
between the ui and the backend according to a provided key-value map.
Fixes: https://todo.sr.ht/~rjarry/aerc/175
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a WorkerInteractor interface. Avoid exposing any public fields in
the types.Worker.
This will set the stage to implement a middleware pattern for the
workers, i.e. to map folder names between the ui and the backend.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Fix a panic in the textinput when using multi-byte chars in the
completions.
Fixes: https://todo.sr.ht/~rjarry/aerc/180
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for JMAP backends. This is on par with IMAP features with
some additions specific to JMAP:
* tagging
* sending emails
This makes use of git.sr.ht/~rockorager/go-jmap for the low level
interaction with the JMAP server. The transport is JSON over HTTPS.
For now, only oauthbearer with token is supported. If this proves
useful, we may need to file for an official three-legged oauth support
at JMAP providers.
I have tested most features and this seems to be reliable. There are
some quirks with the use-labels option. Especially when moving and
deleting messages from the "All mail" virtual folder (see aerc-jmap(5)).
Overall, the user experience is nice and there are a lot less background
updates issues than with IMAP (damn IDLE mode hanging after restoring
from sleep).
I know that not everyone has access to a JMAP provider. For those
interested, there are at least these two commercial offerings:
https://www.fastmail.com/
https://www.topicbox.com/
And, if you host your own mail, you can use a JMAP capable server:
https://stalw.art/jmap/
https://www.cyrusimap.org/imap/download/installation/http/jmap.html
Link: https://www.rfc-editor.org/rfc/rfc8620.html
Link: https://www.rfc-editor.org/rfc/rfc8621.html
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
| |
Check for cancelled contexts before and after performing headers or flag
fetches and any directory searching.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Check for a cancelled context when opening a directory, and before+after
fetching directory contents/threads. Clean up the nesting of
fetchDirectoryContents by using what we already know about server
capabilities and using a switch statement.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Implement cancellation of cancellable requests. These include listing of
directory contents, searching, and sorting.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Implement cancellation of cancellable requests. These include listing of
directory contents, searching, and sorting.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The msgstore keeps a map of UIDs it has requested headers for. The map
is only cleared of pending headers when either an error or a valid
header is received. This can lead to pending headers not being removed
from the list (and therefore never re-requested) if a user has navigated
away from the directory before the response is received.
Delete the pending headers list if the request is finished or cancelled.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a Context field to requests which we may want to cancel when
changing directories.
Add a Cancelled meta-message to inform the UI that a request was
cancelled (as opposed to Done or Error). Delete callbacks when a request
is Cancelled.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most, if not all, requests to the worker that may need cancellation are
sent by the msgstore. These requests are typically only relevant when
the msgstore is the selected one. Pass a context from the dirlister to
the msgstore when it is selected. This context will be passed in future
commits to worker requests. The context is cancelled when a new
directory is selected.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Allocate properly sized maps when receiving a DirectoryContents or
DirectoryThreaded message
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a panic in the template execution when the template evalutes to nil.
Check for length of returned arguments after the template code is
expanded.
To reproduce, run :{{exec "cat > /dev/null" .MessageId}}
Fixes: 42cd4157 ("commands: execute commands with templates")
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
This folder is not used anymore and remains empty. Some distros complain
about empty folders.
Add note about why we need to create these folders.
Link: https://ss64.com/osx/install.html
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
| |
Reported by lintian.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
| |
When an email has multiple attachments with the same name, aerc
currently only saves one of them. This patch adds a counter to them. the
file has an extension, the counter is added before the extension.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Koni Marti <koni.marti@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a correct message store entry to the DirStore for newly created
directories. This is currently not done, so the directory name does
either not show up in the directory list or contains a nil message
store. Either way, such a directory cannot be used in the current
session and aerc needs to be restarted/reconnected. This affects the
:mkdir and :archive commands (archive when a new directory is created).
To reproduce on imap: create a new directory (:mkdir testdir), try to
move a message into it (:move testdir). It will not show up because
there is not message store.
Fixes: 8ced001d ("listDirectories: refactor listdirectories handling")
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
This is a command for the viewer not the composer.
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Translate the regular filter and search options to a notmuch query to
achieve a basic equivalence across backends for these commands.
The following examples have the same filtering effect:
:filter -uf koni
:filter -u from:koni
:filter tag:unread from:koni
And ':filter -x Flagged' would translate to ':filter tag:flagged'.
Fixes: https://todo.sr.ht/~rjarry/aerc/177
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every message exchanged between the UI and the worker(s) is logged at
least twice with some obscure IDs and struct pointer names.
When enabling trace logging, this floods the files for very little or no
benefit and makes the meaningful logging message hard to catch.
Also, other messages tend to flood the output for no specific reason.
These are most of the time leftovers from the development process and
are not useful for tracking potential issues.
Remove these.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Use the worker's logging functions to have all mbox related messages
prefixed by the account name.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Use the worker's logging functions to have all notmuch related messages
prefixed by the account name.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Use the worker's logging functions to have all maildir related messages
prefixed by the account name.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Use the worker's logging functions to have all imap related messages
prefixed by the account name.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
| |
Add a named logger for each worker based on the account name.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Allow creating loggers with name prefixes. This will be used in next
commits to have per worker/account loggers.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
| |
Similar to switch and .StyleSwitch, add map and .StyleMap to work on
lists. An extra "exclude" item is available to filter elements out of
the list.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Add `<backspace>` option to bindings, so it can be used to leave the
message view similar to some file managers.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running :help keys displays the current active key bindings in a dialog.
When the dialog appears, a terminal tab also briefly appears and
disappears immediately since aerc-keys is not an actual man page.
Do not run any command when running :help keys.
Fixes: 5c8a749cfa97 ("binds: display active keybinds in a dialog box")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
| |
base64 terminates the lines with CRLF and we're currently stripping
only line feeds. The shell then does word-splitting on the carriage
return apparently and it breaks the build. Spotted on OpenBSD.
Signed-off-by: Omar Polo <op@omarpolo.com>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
| |
Add reference to the openSUSE package.
Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new `-A` option to `:save` that works in the same manner as `-a`,
but saves all the named parts of an email, not just attachments.
The reason is that I have an email with this structure:
multipart/related
multipart/alternative
text/plain
text/html
image/png (image001.png)
image/png (image002.png)
image/png (image003.png)
text/plain (env.txt)
Where the `env.txt` is a "real" attachment, while the images are just a
part of the HTML version of the email. However, in this particular email
it was important to see them which can't be done with text UI and
opening the HTML part with the browser also didn't work. Saving them to
a temorary folder did the job and this can be useful in other scenarios.
So before the patch we could do `:save -ap /some/path` and get just the
`env.txt` saved there.
After the patch we could also do `:save -Ap /some/path` and get all the
images and the text file saved into the folder.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
|