| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When adding new style objects it is impossible to give them a default
color nor attributes without modifying each existing user styleset.
Also, if the user has an incomplete styleset, some parts of aerc will
have no style at all. These quirks are not nice from a user experience
point of view.
Before parsing the user styleset, initialize aerc style with basic
defaults. Reuse the exact same content than the actual "default"
styleset provided in /usr/share/aerc/stylesets. Comment all of the
default styleset to make it obvious that these are default values.
This has some implications:
* To reset these defaults, the user styleset must now start with these
two lines:
*.default = true
*.normal = true
If these two lines are not present, the default style will be kept and
only changed if the user styleset explicitly sets them.
* Empty stylesets no longer produce weird results.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
| |
Do not replace all spaces by <space>, it makes the bindings completely
unreadable. Only replace trailing and leading spaces with <space> since
these are the only one that actually matter. The others are implicit and
it improves the readability level by over 9000.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
When [compose].edit-headers=true, make sure to respect the order of
headers as set in the text editor.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
When removing the last header, the focusable list may be empty, and the
focused index becomes invalid. Avoid out of bounds access.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
| |
This patch removes the hard coded letters (which don't make sense in all
languages), and replaces them with configurable icons, like the existing
`icon-attachment` and other icons.
Signed-off-by: owl <owl@u8.is>
Acked-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When giving advice on commands to run the colon is often included to
signify that the snippet is needs to be run as an aerc command.
Unfortunately, copying this into the command prompt of aerc leads to an
error. Copy the behaviour of vim and strip any number of leading colons
from command names.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Check if the command entered after : is the abbreviation of an existing
command and run that instead. This is only done if there is no complete
name matching first-hand and if the abbreviation matches just one
command.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add some new tests from the emails I have and make them work by
adjusting the code that looks for hyperlinks.
The idea is to treat "inline" emails (those without mailto:) a little
bit different and stop a little earlier while looking for their ends.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The LimitHeaders function is used to optionally reduce memory usage of
aerc by only keeping certain headers in memory for the message list. The
function properly deletes header keys and values from the underlying
object, however the underlying data structure has a map and a slice -
which do not get resized after deletion: resulting in no actual memory
savings.
Create a new header and add only the headers we want to it. Return this
value and use in the MessageInfo struct.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Add Control and Alt modifiers to Delete key, so C-Delete and A-Delete
kebyoard shortcuts could be bound.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the previous split from the account grid view. When adding a new
child at an existing location, the content is appended to a slice
instead of replacing any old values. The old content must be explicitly
removed.
Reported-by: inwit <inwit@sindominio.net>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
| |
Signed-off-by: Kirill Miazine <km@krot.org>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Replace the notmuch library used with our internal bindings.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|