| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a user sets multiple dynamic styles, only the first one is applied.
The parsing function is modifying the matching pattern prior to saving
it to the style. When a second occurrence of the same dynamic style is
seen, the patterns don't match because we compare against the raw user
input instead of the modified pattern value. Store the raw user input as
the pattern instead of our modified regex.
Fixes: 2f46f64b0b0b ("styleset: allow dynamic msglist styling")
Reported-by: Drew Devault <sir@cmpwn.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Drew Devault <sir@cmpwn.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
When the editor crashes, or the user forces it to exit with an error
code, it is safe to assume that they can't (if the command failed) or
don't want to (if :cq'd) continue composing a meaningful message.
Suggested-by: tristan957
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a standalone python script to allow querying contacts from a CardDAV
compatible server. The script works with python 3.6+ and has no external
dependencies.
Link: https://sabre.io/dav/building-a-carddav-client/
Link: https://www.rfc-editor.org/rfc/rfc6352
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
| |
Remove outdated information. Add wiki specific instructions.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Extraneous underscore slipped in.
Fixes: 3d99fae3d224 ("term: add config options for TERM and osc8")
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Document the possibility of using regex when defining bindings for specific
accounts or folders.
Signed-off-by: inwit <inwit@sindominio.net>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
| |
Don't set the Seen flag when an error occurs during opening the message.
Fixes: https://todo.sr.ht/~rjarry/aerc/125
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
List the folders in arrival order when dirstore.List() is called instead
of returning it in an arbitrary order.
If enable-folders-sort=false and dirlist-tree=false, the directory list
will arbitrarly reshuffle when changing directories because the
dirlist.dirs are generated from keys in a map in the dirstore.
Fixes: https://todo.sr.ht/~rjarry/aerc/178
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
This was a bad copy paste from config/ui.go.
Fixes: d2e74cdb91e1 ("statusline: add column based render format")
Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Fix path separator for the maildir++ backend. Maildir++ already
substitutes '.' for os.PathSeparator. Returning '.' will thus break the
directory tree and the other logic for this backend.
Fixes: 2040fc18 ("imap: use delimiter from server")
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are several ways the ui message channel can fill up leading to
deadlocks.
1) Invalidate() changes the value of uiState to DIRTY. The following
call sequence:
QueueRedraw()
Invalidate()
QueueRedraw()
Leads to multiple nil messages being queued in the message channel
whereas one could assume that the second QueueRedraw() would do
nothing. This is caused by the tri-state nature of uiState.
2) We use the same channel to convey state change, keyboard events and
redraw requests. Since a keyboard event almost always triggers
a redraw, we end up trying to append a redraw message in the same
goroutine that reads from the channel. This triggers a deadlock when
there are more than 50 pending messages.
Solve the issue by using multiple channels, one per type of message that
needs to be sent to the main ui thread.
Remove QueueRedraw() and merge its functionality in Invalidate(). Only
use a DIRTY/CLEAN state to determine if something needs to be queued in
the redraw channel.
Use a channel for quitting instead of an atomic. Restructure some code
functions to have a cleaner API.
Use a for loop in the main thread and select from all channels.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Maarten van Gompel <proycon@anaproy.nl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow accessing email flags via boolean properties instead of having to
rely on obscure regular expressions on (.Flags | join ""). With this
patch, it is now possible to do this:
[ui]
index-columns = star:1,name<15%,reply:1,subject,size>=,date>=
column-star = {{if .IsFlagged}}★{{end}}
column-name = {{if eq .Role "sent"}}{{.To | names | join ", "}}{{else}}{{.From | names | join ", "}}{{end}}
column-reply = {{if .IsReplied}}{{end}}
column-subject = {{.ThreadPrefix}}{{.Subject}}
column-size = {{if .HasAttachment}}📎 {{end}}{{humanReadable .Size}}
column-date = {{.DateAutoFormat .Date.Local}}
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Koni Marti <koni.marti@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the template interface consistently. Before, we have exported the
state.TemplateData struct and used it in most places instead of the
models.TemplateData interface. This lead to some inconsistencies, i.e.
Role() has been defined on the exported struct but not on the interface.
Unexport the state.TemplateData struct, add a DataSetter interface to
set the data needed for the template data and call the Data() method
which returns a models.TemplateData interface when the template data is
needed.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable partial header fetching by creating config values for headers to
specifically include, or specifically exclude. The References field will
always be fetched, regardless of the include list. Envelope data is
always fetched, but is not shown with :toggle-headers, since it isn't in
the RFC822 struct unless explicitly included in the list.
Partial headers can break the cache on changes. Update the cache tag key
to include the state of the partially-fetched headers.
Partial header fetching can have a significant performance increase for
IMAP, and for all backends a resource improvement. Some data to support
this is below. Gathered by opening aerc, selecting a mailbox with
approximately 800 messages and scrolling to the end.
Received measured with nethogs, RAM from btop
Received | RAM
-------------------------------------
All Headers | 9,656 kb | 103 MB
Minimum Headers | 896 kb | 36 MB
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
I had applied v2 instead of v4... It is time to automate these things
a bit better.
Fixes: 6e038c7fd510 ("dirtree: modify drawing of the dirtree")
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Treat the "\NonExistent" attribute similar to the "\NoSelect" one. Only
list folders without the "\NonExistent" or "\NoSelect" attribute.
According to RFC 9501, section 7.3.1, the "\NonExistent" attribute
implies "\NoSelect".
When using the LIST-STATUS extension, some servers return a
"\NonExistent" flag instead of the "\NoSelect" one. We only check for
the "\NoSelect" attribute, and hence, a "\NonExistent" folder will
appear in the directory list and raise an error when being selected.
This occurs, e.g., for gmail accounts with the "[Gmail]" folder.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Clear the message list when a virtual node is selected. Add a
VirtualNodeCallback to the Dirlist interface.
Reported-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Since aercs embedded terminal now behaves correctly, a messages contents
are at the bottom of the pager by default, this has already sparked
confusion as this is uncommon and not matching previous behaviour.
Thanks: Stacy Harper <contact@stacyharper.net>
Suggested-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
In order to combat potential issues of not knowing ones servers
delimiter when creating directories, the delimiter is automatically
appended to all suggested matches.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we now have support for using a server's custom delimiter, it's
only right to also make use of this circumstance in the :archive
command.
Use the provided delimiter to join the path elements in the :archive
command.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
To accommodate servers that use a delimiter other than "/" ("." being a
common alternative), the delimiter is fetched from the server when
connecting.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Ask user whether they want to abort before sending if the subject header
is empty and they have enabled the warn-empty-subject config option.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|