| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
When inspecting core dumps, it is usually advantageous to get the
context of the code. If -trimpath is passed, delve can not find the
file associated with a certain PC, and only prints:
Command failed: open git.sr.ht/~rjarry/aerc/app/aerc.go: no such file or directory
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no need for an UI object. The Aerc.ui field is unused. And
there is a single instance of it anyway.
Move the object's public fields as global variables and change methods
to public functions.
This makes the code cleaner and removes boilerplate.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the following crash on startup:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0x9e2314]
goroutine 1 [running]:
git.sr.ht/~rjarry/aerc/log.PanicHandler()
git.sr.ht/~rjarry/aerc/log/panic-logger.go:51 +0x70f
panic({0xae95a0, 0x119f9b0})
runtime/panic.go:890 +0x263
git.sr.ht/~rjarry/aerc/app.(*Aerc).SelectedAccount(0x8503cdd28?)
git.sr.ht/~rjarry/aerc/app/aerc.go:384 +0x14
git.sr.ht/~rjarry/aerc/app.SelectedAccount(...)
git.sr.ht/~rjarry/aerc/app/app.go:44
git.sr.ht/~rjarry/aerc/app.(*AccountView).isSelected(...)
git.sr.ht/~rjarry/aerc/app/account.go:225
git.sr.ht/~rjarry/aerc/app.(*AccountView).UpdateStatus(0x850364380)
git.sr.ht/~rjarry/aerc/app/account.go:127 +0x28
git.sr.ht/~rjarry/aerc/app.(*AccountView).SetStatus(0x850364380, {0x850243a50, 0x1,
0x0?})
git.sr.ht/~rjarry/aerc/app/account.go:123 +0x94
git.sr.ht/~rjarry/aerc/app.NewAccountView(0x8503d38c0, 0x85041bf80)
git.sr.ht/~rjarry/aerc/app/account.go:111 +0x573
git.sr.ht/~rjarry/aerc/app.NewAerc({0xcab0c0?, 0x11fa3c8}, 0x850433860, 0xbf3040, {0xca75e8?, 0x11ca800}, 0x0?)
git.sr.ht/~rjarry/aerc/app/aerc.go:91 +0x6ce
git.sr.ht/~rjarry/aerc/app.Init(...)
git.sr.ht/~rjarry/aerc/app/app.go:24
main.main()
git.sr.ht/~rjarry/aerc/main.go:242 +0x52e
There was two things very wrong:
- Access of the global aerc pointer before it was initialized.
- The host field of AccountView was left there and still accessed but
never initialized.
Replace the global aerc pointer with a real struct value. Update code
accordingly.
Remove the AccountView.host field which is now useless.
Reported-by: Jens Grassel <jens@wegtam.com>
Reported-by: Matěj Cepl <mcepl@cepl.eu>
Fixes: bc176bd61ba7 ("app: export global functions")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The single Aerc object is passed around in almost all command functions.
This hinders readability.
Store the single Aerc instance as a global variable. Export public
functions from the app package to access methods of that object. Remove
all explicit references to *app.Aerc and replace them with calls to
these functions. For references to private/unexported fields and
functions from within the app package, directly access the global aerc
object.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
| |
This is the central point of all aerc. Having it named widgets is
confusing. Rename it to app. It will make a cleaner transition when
making the app.Aerc object available globally in the next commit.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
| |
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
When no filter is configured for a part, use the correct account
contextual ui config.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
| |
Add a command to toggle the display of an thread-context. Update
CHANGELOG.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a UI config value to enable showing of "thread-context", similar
to `notmuch show --entire-thread=true`. Add an associated style called
"msglist_thread_context" which can be used to style such messages.
Currently this feature is only supported by notmuch. It would be
possible for maildir to implement as well, IMAP with gmail custom
extensions, and JMAP. This patch merely implements the notmuch version
and puts the groundwork in for handling these sorts of displays.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although git commit titles can be a lot longer that 72 characters it is
sensible to limit it somewhere. Many people recommend a maximum of 50
characters, other places allow for slightly longer, github for examples
truncates titles at 72, our benevolent maintainer tries to aim for 60.
Considering the above 72 seems like a comfortable hard limit.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the command running in the terminal has exited, the tcell-term
buffer still contains the last status of its virtual tty. If a virtual
terminal is visible, draw it even after its command has exited. Calling
tcellterm.VT.Draw() does not interact with the underlying process at
all, it only accesses the screen buffer.
This should fix incomplete drawing of message parts when using a pager
that exits after printing contents (e.g. `less -F`). Also, it should fix
redrawing of such message part contents after switching tabs back and
forth.
Reported-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Julio B <julio.bacel@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When any XDG_*_HOME or XDG_RUNTIME_DIR variables are set, this causes
test failures.
FAIL: TestConfigPath//home/user/Library/Preferences/aerc/accounts.conf (0.00s)
xdg_test.go:86: got "/Users/vitaly/.config/aerc/accounts.conf"
expected "/home/user/Library/Preferences/aerc/accounts.conf"
Avoid leaking the local user's environment in the unit tests. Always
override the XDG_* variables.
Fixes: fff16640ad7c ("xdg: add functions to deal with user home paths")
Reported-by: Vitaly Ovchinnikov <v@postbox.nz>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Vitaly Ovchinnikov <v@postbox.nz>
|
|
|
|
|
|
|
| |
Use similar writing mood than other versions.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
| |
Avoid multiple variants of :attach to be rendered on the same line.
Fixes: af63bd0188d1 ("doc: homogenize scdoc markup")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
| |
The backslashes must be escaped, otherwise they are not rendered by
scdoc.
Fixes: 2f46f64b0b0b ("styleset: allow dynamic msglist styling")
Reported-by: Vitaly Ovchinnikov <v@postbox.nz>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
| |
This style object was not documented. Make it so.
Fixes: 995dfc15a806 ("styles: add style for folded threads")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
| |
These commands were not documented. Make them so.
Fixes: 94b1c778dbe6 ("commands: add :fold and :unfold for thread folding")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
| |
These commands were not documented. Make them so.
Fixes: e41ed82cf3db ("imap: add manual {dis,}connect support")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
| |
These commands were not documented. Make them so.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
| |
This command was not documented. Make it so.
Fixes: 74366d895d5c ("viewer: add key passthrough mode")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
| |
This command was not documented. Make it so.
Fixes: cdec23323c64 ("recover: recover emails from tempdir after a crash")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
| |
This setting was not documented. Make it so.
Fixes: 54a0a377e030 ("threads: debounce client-side thread building")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new shell script to check that all commands are documented in man
pages and that the man pages do not contain non-existent commands. Also
check that all explicitly parsed options with ini reflection are
documented as well. It is not possible to check if the man pages do
reference non-existent options since some of the options are parsed
lazily in workers and some of them are also declared with placeholders
(e.g. *column-<name>*).
Run the script in the lint target.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
| |
Allow styling the part selector mime type and (if any) attachment
filename. Remove custom alignment code since now both can be
differentiated easily with colors and/or attributes.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Strip trailing comments after attribute values in stylesets. Update the
test styleset to check it works.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|