| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Printing an ID in the OSC8 terminator can cause issues in some pagers
and/or terminals. The "spec" doesn't allow for an ID in the terminator,
but most applications and terminals will ignore it if it's there.
Prevent printing it in the first place for better compatibility.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is mostly a revert of commit ae4d742c5a90 ("templates: fix layered
fg & bg color for inline styles").
As it turns out, context colors (msglist_selected, msglist_marked,
msglist_deleted, etc.) need to have priority over inline colors.
Otherwise strange and confusing results occur.
Reported-by: Skejg <grolleman@zoho.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When a terminal widget title is updated, the screen is not redrawn. Only
the UI state is invalidated so that on the next redraw, the title will
be refreshed.
Make sure that the screen is redrawn when the title changes.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Another attempt at fixing the high CPU usage when terminal tabs are
running interactive tui applications and the message list tab is
selected.
There are cases where a terminal widget can be visible but not focused
(composer, message viewer, attachment selector, etc.). Define a new
Visible interface with a single Show() method. Call that method when
changing tabs to make sure that terminal widget content events only
trigger redraws when they are visible.
Fixes: 382aea4a9426 ("terminal: avoid high cpu usage when not focused")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Koni Marti <koni.marti@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Avoid negative offsets and limit height to the parent context height.
Fixes: https://todo.sr.ht/~rjarry/aerc/142
Reported-by: Akspecs <akspecs@gmail.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Koni Marti <koni.marti@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
As many do not know, step-by-step is actually an adjective in its own
right. Debugging is also written with three g and not with two.
Link: https://www.merriam-webster.com/thesaurus/step-by-step
Link: https://www.merriam-webster.com/thesaurus/debugging
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Focus terminal for file picker to ensure that terminal is correctly
redrawn when using it. After commit 382aea4a ("terminal: avoid high cpu
usage when not focused"), the file picker terminal in the attach command
(when called with the -m flag) would not work as expected.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Some tools expect this trailing space to be present to detect email
signatures start.
Reported-by: Jd <john1doe@ya.ru>
Fixes: https://todo.sr.ht/~rjarry/aerc/131
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Jd <john1doe@ya.ru>
|
|
|
|
|
|
|
|
|
| |
With all the new different options, the behaviour can be confusing. Add
explicit rules and examples to avoid ambiguities.
Reported-by: skejg <grolleman@zoho.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running dynamic tui applications (such as btop, htop, etc.) in the
embedded :terminal and focusing an account tab, every tui application
change triggers a full redraw of the whole window. When the message list
is focused, this leads to high cpu usage because of the computationally
intensive templates parsing and ansi sequence handling.
Only redraw when the terminal is focused. Do not use tcell Watch and
Unwatch functions since these completely disable all widget updates,
including title changes and terminal close events.
Reported-by: John Mcenroy <handplanet@outlook.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: John Mcenroy <handplanet@outlook.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The stylesets are parsed in two passes. The first pass skips the
.selected keys and updates the attributes and colors of both the objects
and selected maps. The second pass is supposed to only update the
selected map of the pointed style objects.
The boolean logic was incorrect, the .selected styles were applied on
normal objects as well which led to confusing behaviour most
specifically when using *.selected.toggle=true.
Properly parse .selected elements.
Fixes: 47675e80850d ("config: rework styleset parsing")
Reported-by: John Mcenroy <handplanet@outlook.com>
Reported-by: Kirill Chibisov <contact@kchibisov.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Kirill Chibisov <contact@kchibisov.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reuse the URL parsing algorithm from foot. Basically, it involves
recording the opening [, (, < and take into account their closing
counterparts. If a closing character is encountered with no matching
opening one, assume the URL ends. This allows handling markdown link
syntax such as:
[http://foobaz.org/xxx](http://foobaz.org/xxx)
Avoid coloring bare URL protocols such as http:// or https://
Update test vector to handle more corner cases.
Link: https://codeberg.org/dnkl/foot/src/tag/1.13.1/url-mode.c#L331-L471
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Kirill Chibisov <contact@kchibisov.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the user has several accounts with smtp-starttls=yes set, they will
be warned multiple times for each account. This is confusing and may let
the user believe that aerc is stuck because closing the dialog seems to
have no effect.
Only warn once.
Fixes: c09b17a930cc ("smtp: replace smtp-starttls with schema option")
Reported-by: Inwit <inwit@sindominio.net>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
| |
Add a hook to run when aerc shuts down. The environment is supplemented
with the duration aerc was alive for.
References: https://todo.sr.ht/~rjarry/aerc/136
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a hook to run when aerc starts up. The environment is supplemented
with aerc version and the path to its binary.
References: https://todo.sr.ht/~rjarry/aerc/136
References: https://todo.sr.ht/~rjarry/aerc/139
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deprecate triggers and replace them with hooks. Now that aerc supports
running arbitrary ex commands over IPC, it is possible to run internal
aerc commands *and* shell commands via external shell scripts. Hooks
only allow running shell commands. Hooks info is passed via environment
variables.
Implements: https://todo.sr.ht/~rjarry/aerc/136
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
| |
Rework how tabs are closed. Change the aerc.RemoveTab and
aerc.ReplaceTab functions to accept a new boolean argument. If true,
make sure to close the tab content.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
We have been wanting to remove this for a while now. The only use case
is styleset and changing the whole styleset based on an email subject
does not make much sense. The same feature can be achieve with dynamic
msglist* styles based on any email header value in the stylesets now.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for dynamic msglist*.$HEADER,$VALUE.$ATTR = $VALUE where
$VALUE can be either a fixed string or a regular expression. This is
intended as a replacement of contextual ui sections based on subject
values.
Implements: https://todo.sr.ht/~rjarry/aerc/18
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
| |
Simplify code. Prepare for dynamic styling of the message list.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
| |
Inherit from the lower layers colors unless explicitly overridden in
upper layers.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The logic was inverted. The style argument is actually the "under" layer
style. Each character in the RuneBuffer style must be applied on *top*
of it, not the other way around.
Use colors from style and override them with each character's colors if
they are set. Keep attributes handling unchanged.
Fixes: ab8f433e1739 ("templates: allow layered fg & bg color for inline styles")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When accounts.conf cannot be parsed, return an error instead of assuming
that the file is non existent and wrongfully opening the new account
wizard. Use the same ini delimiters for all configuration files.
Fixes: https://todo.sr.ht/~rjarry/aerc/151
Reported-by: Jon Fineman <jon@fineman.me>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
| |
Mark URLs with OSC 8 escape sequence to help terminal emulators with
opening multi-line URLs with the mouse and attach the hyperlink to
email addresses, so the users could open them.
Link: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
| |
Do not use int for true/false values.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some user agents deliberately generate non-standard
message identifier lists in In-Reply-To and References headers.
Instead of failing silently, aerc now falls back to a desperate parser
scavaging whatever looking like <id-left@id-right>.
As the more liberal parser being substituted with, References header
are now stored for IMAP not only when there's a parsing error.
Fixes: 31d2f5be3cec ("message-info: add explicit References field")
Signed-off-by: Nguyễn Gia Phong <mcsinyx@disroot.org>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
The "smtp-starttls" options is now ignored in favor of more detailed
schema specification, similarly to IMAP.
Fixes: https://todo.sr.ht/~rjarry/aerc/149
Signed-off-by: Marcin Serwin <marcin.serwin0@protonmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The linter goes completely crazy when notmuch is not installed and the
notmuch build tag is enabled. With an otherwise successful lint, the
following output is generated:
worker/notmuch/lib/database.go:14:10: could not import github.com/zenhack/go.notmuch (-: # github.com/zenhack/go.notmuch
../../go/pkg/mod/github.com/brunnre8/go.notmuch@v0.0.0-20201126061756-caa2daf7093c/configList.go:9:11: fatal error: notmuch.h: No such file or directory
9 | // #include <notmuch.h>
| ^~~~~~~~~~~
compilation terminated.) (typecheck)
notmuch "github.com/zenhack/go.notmuch"
^
commands/eml.go:4:2: "bytes" imported and not used (typecheck)
"bytes"
^
aerc.go:39:7: previous case (typecheck)
case *widgets.AccountView:
^
exit status 1
make: *** [Makefile:73: lint] Error 1
Only include the notmuch build tag in the lint process if it is actually
installed.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
:filter was given twice in the "MESSAGE LIST COMMANDS" section of
aerc(1), both incomplete/wrong. Merge both to reference aerc-search(1)
and say it actually *filters* the message list.
Fixes: af63bd0188d1 ("doc: homogenize scdoc markup")
References: https://todo.sr.ht/~rjarry/aerc/144
Signed-off-by: witcher <witcher@wiredspace.de>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
| |
I like it better that way. And it will not piss me off every time I need
to use auto completion.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
| |
The default value should be true as stated in the docs.
Fixes: b63c93563c62 ("config: use reflection to map ini keys to struct fields")
Reported-by: Kirill Chibisov <contact@kchibisov.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Kirill Chibisov <contact@kchibisov.com>
|
|
|
|
|
|
|
|
|
|
| |
When running :move or :archive with a message viewer opened, the viewer
is never closed properly. This leads to resources leak (pager processes
left running). Fix that.
Reported-by: Kirill Chibisov <contact@kchibisov.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Kirill Chibisov <contact@kchibisov.com>
|
|
|
|
|
|
|
| |
Allow wild cards for MIME types like in filters.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
| |
Provide a way to configure link openers. Based on the URL mime type:
x-scheme-handler/$scheme.
Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
| |
Adjust some examples with real world use cases.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the following error when running maildir on freebsd:
could not create file system watcher: Unsupported OS: freebsd
Do not register based on os type. Register based on supported API.
Rename linux -> inotify and darwin -> fsevents. Only build fsevents on
darwin, and inotify on all other platforms.
Fixes: a0935a3de0ce ("worker/lib: implement an fswatcher interface")
Reported-by: Jens Grassel <jens@wegtam.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Jens Grassel <jens@wegtam.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an account is initialized too quickly, setTitle may be called
before acct.tab is initialized, leading to a crash:
runtime error: invalid memory address or nil pointer dereference
goroutine 1 [running]:
panic({0xa49820, 0x1059510})
runtime/panic.go:890 +0x262
git.sr.ht/~rjarry/aerc/lib/ui.(*Tab).SetTitle(...)
git.sr.ht/~rjarry/aerc/lib/ui/tab.go:37
git.sr.ht/~rjarry/aerc/widgets.(*AccountView).setTitle(0xc000838000)
git.sr.ht/~rjarry/aerc/widgets/account.go:617 +0x2a0
git.sr.ht/~rjarry/aerc/widgets.(*AccountView).onMessage(0xc000838000, {0xbffc60?, 0xc0000f1080?})
git.sr.ht/~rjarry/aerc/widgets/account.go:364 +0x13e8
git.sr.ht/~rjarry/aerc/widgets.(*Aerc).HandleMessage(0xc0000f4000, {0xbffc60, 0xc0000f1080})
git.sr.ht/~rjarry/aerc/widgets/aerc.go:174 +0x5f
main.main()
git.sr.ht/~rjarry/aerc/aerc.go:252 +0x965
Avoid this.
Fixes: 6b39c0dae1e1 ("tabs: use template for account tab name")
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
No need to print errors when notmuch.h is not found. The only point of
this script to check if it is available or not.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
aerc(1) is most likely the entry point for a user who wants to read the docs.
Thus, reference all other manpages to improve accessibility.
Signed-off-by: Tom Schwindl <schwindl@posteo.de>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add .StyleSwitch that takes a string and an arbitrary number of cases
(regexp, style). Reuse some of the constructs introduced by previous
commit.
The style of the first regular expression that matches will be applied.
If the string does not match any of the expressions, it will be left
as-is.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
| |
This allows much shorter templates.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a match function that returns true if a string matches the provided
regular expression. The compiled regular expressions are cached in
a sync.Map to avoid repetitive compilations of the same expressions.
Caveat: if the user mixes the arguments order, it may cause the cache to
consume a lot of memory filled with garbage regular expression objects.
Ideally, we would need to limit the size of this cache and/or use a LRU
cache implementation. Maybe someday?
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
In preparation for .StyleMatch put the content first, followed by the
style name.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
Document .SubjectBase. Fix its value along the way. Do not reuse
d.Subject() which may be empty if d.threadSameSubject is true.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
Extract {{.ThreadPrefix}} from {{.Subject}} so that the prefix can be
styled in a different color.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When threading is enabled, some messages which have different base
subjects are hidden whereas some others which have similar subjects are
displayed:
[PATCH aerc v3 1/3] mk: remove smart rebuild when GOFLAGS have changed
├─>[PATCH aerc v3 2/3] mk: only install changed/missing files
│ └─>Re: [PATCH aerc v3 2/3] mk: only install changed/missing files
│ └─>Re: [PATCH aerc v3 2/3] mk: only install changed/missing files
├─>
└─>Re: [PATCH aerc v3 1/3] mk: remove smart rebuild when GOFLAGS have changed
This happens because we are using the "previous" message to get the
subject base instead of the current one. Compute the base subject from
the current message. Here is the result:
[PATCH aerc v3 1/3] mk: remove smart rebuild when GOFLAGS have changed
├─>[PATCH aerc v3 2/3] mk: only install changed/missing files
│ └─>
│ └─>
├─>[PATCH aerc v3 3/3] mk: speed up notmuch detection
└─>Re: [PATCH aerc v3 1/3] mk: remove smart rebuild when GOFLAGS have changed
Fixes: 535300cfdbfc ("config: add columns based index format")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using {{.Style "foo" bar}} and "foo" is not defined in the styleset
under the [user] section, there is an obscure error:
template: column-right:1:18: executing "column-right" at <.Style>:
error calling Style: runtime error: invalid memory address or nil
pointer dereference
Which is most of the time truncated and can only be read in logs.
Referencing an undefined style is not a serious problem. Return the
default tcell style in that case and avoid the error.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
If a user style has no fg and/or no bg color defined, use the color from
the underlying style.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current sendemail-validate script cannot be used for patch series.
It works on each patch independently from the others and make it
impossible to use when there are inter dependencies.
I have submitted an alternate validate script that works on whole series
which is still waiting for reviews. In the meantime, propose to use my
script which can work. To install it in your environment:
curl -Lo ~/.local/bin/git-send-email \
https://paste.sr.ht/blob/cedcf24383022949c8dc5bc1300cf5cbc879b36f
echo 'export GIT_EXEC_PATH=$PATH:$(git --exec-path)' >> ~/.profile
Link: https://lore.kernel.org/git/20230103231133.64050-1-robin@jarry.cc/
Link: https://paste.sr.ht/~rjarry/7e9a98866ba2c6f34e4169debf4f2c14b574613e
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
| |
@latest is flaky and does not resist GOPROXY hiccups.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|