| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
This fixes a bug when thisDayTimeFmt was returned for both
this day and this week.
Fixes: d758441fe0c4 ("templates: add more fields and functions")
Signed-off-by: Nojus Gudinavičius <nojus.gudinavicius@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
| |
The default 200ms between each spinner frame can be unsuitable for
spinners with many frames, so this adds a spinner-interval config option
with type `time.Duration` to specify the interval between frames. The
default is still the usual 200ms.
Signed-off-by: Dean <gao.dean@hotmail.com>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
| |
This field must be converted from a string value to an integer manually.
The conversion cannot be automated via go ini reflection mechanism.
Fixes: 2af81a743048 ("pgp: add configurable error level for opportunistic encryption")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Jose Lombera <jose@lombera.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit c56027b2e69e ("config: cleanup accounts.conf section
parsing"), no backend-specific settings are parsed and stored into
account.Params.
The logic is completely broken. Any key is specific unless one field of
the AccountConfig struct has a matching ini:"key" tag. The fields that
are tagged ini:"-" are already handled in the parent switch block.
Reported-by: Jose Lombera <jose@lombera.dev>
Reported-by: Ben Cohen <ben@bencohen.net>
Fixes: c56027b2e69e ("config: cleanup accounts.conf section parsing")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Jose Lombera <jose@lombera.dev>
|
|
|
|
|
|
|
|
|
|
| |
The template exec errors can be rather verbose and may be truncated when
the table is rendered.
Log them as errors so that they can be inspected by users.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The filesystem hierarchy standard describes /usr/share as
"Architecture-independent data". This folder is not intended for
executable scripts and especially not for arch specific binary files
(such as the wrap filter).
Lintian reports an error with aerc 0.14.0:
arch-dependent-file-in-usr-share [usr/share/aerc/filters/wrap]
Which I had to fix by moving the filter into /usr/libexec.
Install all filters into $PREFIX/libexec/aerc/filters and update the
default SearchDirs to look them up in here as well.
Link: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html
Link: https://salsa.debian.org/go-team/packages/aerc/-/commit/a0ca00260ffd
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
| |
When aerc fails to load a styleset it reports being unable to load the
default styleset. Change error message to print the name of the styleset
instead of default.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Add a style for messages that have been marked as answered, and a
"msglist_answered" config option for it.
Signed-off-by: Martin Lucina <martin@lucina.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
This was applied after 0.14.0 was released. I forgot to update my patch
before pushing it...
Fixes: 535300cfdbfc ("config: add columns based index format")
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a user-configurable error level for when opportunistic encryption is
enabled but the message cannot be encrypted. Set the default level to
this as "warn". This config option *only* applies when opportunistic
encryption is enabled. If a user tries to manually encrypt a message,
an error will still be shown.
Don't show encryption status until at least one recipient is added.
Fixes: https://todo.sr.ht/~rjarry/aerc/95
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
These issues were all reported by the new custom analyzer introduced in
previous commit.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If log.PanicHandler() is not installed in a goroutine and a panic
occurs, the terminal state is not restored. This causes the panic trace
to be unreadable since the terminal is broken.
Add a custom analyzer that parses our code and ensures that:
defer log.PanicHandler()
is the first statement of all functions that are executed in goroutines.
Include that linter in golangci config.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
| |
Reported by Lintian (Debian).
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The index-format option comes from mutt and is neither user friendly,
nor intuitive. Introduce a new way of configuring the message list
contents. Replace index-format with multiple settings to make everything
more intuitive. Reuse the table widget added in the previous commit.
index-columns
Comma-separated list of column names followed by optional
alignment and width specifiers.
column-separator
String separator between columns.
column-$name
One setting for every name defined in index-columns. This
supports golang text/template syntax and allows access to the
same message information than before and much more.
When index-format is still defined in aerc.conf (which will most likely
happen when users will update after this patch), convert it to the new
index-columns + column-$name and column-separator system and a warning
is displayed on startup so that users are aware that they need to update
their config.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will be used by the message list index and by the status line.
A table is constructed from rows/width dimensions, a list of column
definitions and a column separator.
Provide functions to parse column definitions from ini config files.
This will be used in the next commit.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
Depending on the number of lines in the prompt text, allow the selector
dialog to grow in height.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
| |
The runewidth module only allows truncating at the end of strings. Add
a function to truncate at the beginning. It will be used for the table
widget in the next commit.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add functions and fields in preparation for more than only message
templates. The idea is to reuse the same symbols for the message list
format and other parts of the UI.
Update the man page accordingly.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
| |
No need to pre-render fields that are not necessarily accessed in
templates. Change fields to functions that are evaluated only when
required.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
| |
This makes room in preparation for more code in here.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
| |
Instead of accepting any garbage for these configuration fields, parse
them when parsing accounts.conf and store mail.Address objects. Reuse
these objects everywhere.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
| |
Use go ini reflection capabilities where possible. Mark fields that can
be trivially parsed and those who need manual parsing. Restrict
backend-specific parameters to ini keys that are not listed as ini
struct field tags.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
| |
Using a list of integers is not optimal. Use a bit mask instead.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
| |
Add `:send -a flat|month|year` to send, which archives the message being
replied to. Extract most of archive logic into a separate function to
make sure it behaves as manual archiving.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
| |
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Seen with git 2.34:
error: unknown option `empty=drop'
Check the patch file manually instead and abort early.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When scrolling while the thread builder is running, aerc freezes. This
issue can be easily reproduced by keeping the down arrow pressed while
a folder is loading with local threading enabled.
This is caused by the threadCallback function calling store.Select which
acquires threadsMutex. However, threadCallback is already called with
threadsMutex acquired, causing a deadlock.
Fix the issue by adding a new selectPriv function that does not acquire
the lock and call this one in threadCallback *and* store.Select. Do not
reset threadCallback to nil as it was before.
Fixes: 6b8e0b19d35a ("split: refactor to prevent stuck splits")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Thomas Vigouroux <me@vigoux.giize.com>
|
|
|
|
|
|
|
|
| |
Obviously, this is not exhaustive. But these should be most user visible
changes.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pressing up while in command mode, calls TextInput.Set() with the
previous command in the history. If the command exceeds the current
terminal width, there is a scroll mechanism that puts the cursor at the
end of the text (see ensureScroll()). However, the offset used to
perform the draw is not the current scroll value but the "previous" one.
When the one before last command required a longer scroll offset than
the current command length, this causes a crash:
Error: runtime error: slice bounds out of range [348:5]
git.sr.ht/~rjarry/aerc/lib/ui.(*TextInput).Draw(0xc0017ce000, 0xc005460570)
git.sr.ht/~rjarry/aerc/lib/ui/textinput.go:111 +0x525
git.sr.ht/~rjarry/aerc/widgets.(*ExLine).Draw(0x30?, 0xc01de13b08?)
git.sr.ht/~rjarry/aerc/widgets/exline.go:76 +0x1d
git.sr.ht/~rjarry/aerc/lib/ui.(*Stack).Draw(0xc0003f0ff0?, 0x0?)
git.sr.ht/~rjarry/aerc/lib/ui/stack.go:30 +0x49
git.sr.ht/~rjarry/aerc/lib/ui.(*Grid).Draw(0xc00038c240, 0xc0003f0ff0)
git.sr.ht/~rjarry/aerc/lib/ui/grid.go:126 +0x225
git.sr.ht/~rjarry/aerc/widgets.(*Aerc).Draw(0xc0003f4000, 0xc0003f0ff0)
git.sr.ht/~rjarry/aerc/widgets/aerc.go:176 +0x1d2
git.sr.ht/~rjarry/aerc/lib/ui.(*UI).Render(0xc0003a0000)
git.sr.ht/~rjarry/aerc/lib/ui/ui.go:110 +0x63
main.main()
git.sr.ht/~rjarry/aerc/aerc.go:255 +0x9c5
There are actually two distinct issues here:
1) The scroll offset used for drawing must be the current one, not the
one from the previous ensureScoll() call.
2) The scroll offset must be reset when changing the text with
TextInput.Set(). Other methods that change the text actually call
ensureScroll but they make incremental changes to the text, since Set
completely overwrites everything, it makes more sense to set the
scroll offset to 0.
Reported-by: Adam Cooper <adam@theadamcooper.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
| |
According to scdoc(5), numbered lists start with a period.
Fixes: af63bd0188d1 ("doc: homogenize scdoc markup")
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 6b8e0b19d35a ("split: refactor to prevent stuck splits")
introduced a regression where a split message viewer is not closed when
a new message is selected, leading to every split view staying open in
the background.
Fixes: 6b8e0b19d35a ("split: refactor to prevent stuck splits")
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Upgrade tcell-term to latest tag. Has only a few fixes:
- Always set TERM=xterm-256color for better compatibility
- Fix some RGB parsing sequences
- Fix splitting of UTF8 bytes causing render issues
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Fix typos in aerc-config man page.
Signed-off-by: Folker Schwesinger <dev@folker-schwesinger.de>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Refactor split logic (again...) to prevent stuck splits. Use callback
from msgstore.Select to tell the split which message to display. This
keeps the account from having to track displayed messages, which
prevents race conditions in certain situations.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a "terminal" theme to colorize script. The "terminal" theme respects
the users' configured terminal color scheme. Also links are blue
underlined.
Usage:
colorize -v theme=terminal
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SMTP configuration is slightly different between oauthbearer and
xoauth2. The oauthbearer requires a token-endpoint, while xoauth2 does
not. The IMAP version of oauthbearer also does not require a
token-endpoint. If one is specified, the token is treated as a refresh
token.
Modify the SMTP usage to work the same way: a token is an access token
unless a token-endpoint is specified
Reported-by: Cameron Samak <csamak@apache.org>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
| |
Avoid errors by checking cover letters as regular patches.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the time it is not wanted to attach hidden files, but by default
globbing does include hidden files.
Add a small check that removes hidden files from the results if they are
not explicitly globbed for or inside a hidden directory.
Implements: https://todo.sr.ht/~rjarry/aerc/83
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
| |
This is less important than reporting actual coding errors.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
| |
We don't care that they are known in .mailmap as long as both match.
Reported-by: Moritz Poldrack <moritz@poldrack.dev>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When entering passwords from a password-manager the wizard shows it's
warning right after the first character has been pasted and the rest of
the password is lost.
Debounce the displaying of the "stored in plaintext"-warning to only
show after the password has been entered.
Reported-by: qbit (@qbit:tapenet.org)
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using :new-account, aerc crashes when entering a letter with the
following trace:
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x66930e]
goroutine 1 [running]:
git.sr.ht/~rjarry/aerc/log.PanicHandler()
git.sr.ht/~rjarry/aerc/log/panic-logger.go:51 +0x73e
panic({0xa2b200, 0x10204e0})
runtime/panic.go:890 +0x262
git.sr.ht/~rjarry/aerc/config.(*KeyBindings).GetBinding(0xc000370000?, {0xc000634c48?, 0xc000118900?, 0x5843da?})
git.sr.ht/~rjarry/aerc/config/binds.go:331 +0x2e
git.sr.ht/~rjarry/aerc/widgets.(*Aerc).Event(0xc000370000, {0xbd1e60?, 0xc00112e000?})
git.sr.ht/~rjarry/aerc/widgets/aerc.go:309 +0x196
git.sr.ht/~rjarry/aerc/lib/ui.(*UI).HandleEvent(0xc00031e840, {0xbd1e60?, 0xc00112e000})
git.sr.ht/~rjarry/aerc/lib/ui/ui.go:141 +0x162
main.main()
git.sr.ht/~rjarry/aerc/aerc.go:246 +0xa89
The issue is that the keyNames map is empty when defaultBindsConfig() is
called and ParseBinding("<C-q>", ":quit<Enter>") returns an error:
Unknown key 'C-q' which is (unfortunately) ignored and nil is inserted
in the wizard bindings.
Fix that by initializing keyNames at the module level and remove init().
Fixes: c05c2ffe0424 ("config: make various sections accessible via global vars")
Reported-by: Moritz Poldrack <moritz@poldrack.dev>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Guessing a width/height with v?split is rather bothersome, using a
sensible value based on the user's terminal would be preferable. This
also prevents confusion when running :v?split without a number seemingly
does not open a split.
Initialize width as half the width of the message list and height as an
eight of the message list.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
This will be reused in next commit.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
| |
This is useless and annoying.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the patch fails to apply, users may get an obscure error from git:
error: sha1 information is lacking or useless (commands/msg/reply.go).
error: could not build fake ancestor
Add explicit error messages indicating what happened and what should be
done.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Previously close-on-reply was implemented as a setting, making it
unflexible. Refactor so it is a flag to reply `:reply -c`.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
In addition of digits, handle lower case letters as list items:
a) foo
b) baz
c) bar
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a gitconfig target in the Makefile to configure a new clone with
sane defaults:
- set subject prefix
- set correct mailing list address
- enable sendemail.validate
- install sendemail-validate hook
The sendemail-validate hook will make a shallow clone of the current
upstream repo, apply every patch on it and run some checks (a stripped
down version of what is run by the upstream CI).
Add a new check-patches script that verifies that the commit message
actually contains something and that the Signed-off-by trailer from the
patch author is present.
Call check-patches in both the CI and the sendemail-validate hook.
Update CONTRIBUTING.md accordingly.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
Set a default flag character for icon-attachment to match the man page.
Fixes: adf74be4b5c5 ("msglist: add attachment indicator")
Signed-off-by: Ben Cohen <ben@bencohen.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|