| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When opening an attachment with :open command we make a temporary file
and open it then. The file is named randomly, but the extension is
derived from the attachment parameters.
This patch checks if the attachment has a file name assigned and takes
the extension from there. Otherwise it rolls back to the original
mime-based extension generation.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for JMAP backends. This is on par with IMAP features with
some additions specific to JMAP:
* tagging
* sending emails
This makes use of git.sr.ht/~rockorager/go-jmap for the low level
interaction with the JMAP server. The transport is JSON over HTTPS.
For now, only oauthbearer with token is supported. If this proves
useful, we may need to file for an official three-legged oauth support
at JMAP providers.
I have tested most features and this seems to be reliable. There are
some quirks with the use-labels option. Especially when moving and
deleting messages from the "All mail" virtual folder (see aerc-jmap(5)).
Overall, the user experience is nice and there are a lot less background
updates issues than with IMAP (damn IDLE mode hanging after restoring
from sleep).
I know that not everyone has access to a JMAP provider. For those
interested, there are at least these two commercial offerings:
https://www.fastmail.com/
https://www.topicbox.com/
And, if you host your own mail, you can use a JMAP capable server:
https://stalw.art/jmap/
https://www.cyrusimap.org/imap/download/installation/http/jmap.html
Link: https://www.rfc-editor.org/rfc/rfc8620.html
Link: https://www.rfc-editor.org/rfc/rfc8621.html
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the completion system by implementing the OptionsProvider and
OptionComleter interfaces. The command flags that expect arguments can
be completed now: -x,-X with the available flags, -t,-f,-c with the
address book (after more then 3 characters), -d with a selected
suggestion for useful dates.
Examples:
:filter -<Tab>
lists the available option flags
:filter -t org<Tab>
fills the completion menu with address from your address-book-cmd
matching "org" (same with -f and -c)
:filter -x <Tab>
lists the available flags (same with -X)
:filter -d <Tab>
lists a few convenient date terms
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Use the updated completion and avoid removing flag when completing paths.
Fixes: https://todo.sr.ht/~rjarry/aerc/110
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Update the completion system by implementing the OptionsProvider
interface.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Execute template code before running a command.
With this, we can use templates in our keybinds like:
[messages]
E = :'{{if match (.Flags|join "") "O"}}envelope{{else}}view{{end}}'<Enter>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expand and complete template code. The exline does understand template
code and can evaluate it. With this patch, the completion systems
supports writing the templates by showing the available template data
fields and template functions. Pressing <Tab> after }} will show the
evaluated template in the completion menu. Complex template code, such
as if-else statements work as well.
Examples:
:filter -f {{<Tab>
will show the possible template data fields and functions
:filter -f {{index (.To|email) 0}}<Tab>
will show the value of the template expression in the completion list
Pressing <Tab> twice after a completed template expression will
substitute the expression with its value.
:{{if match .Folder "INBOX"}}check-mail{{else}}cf INBOX{{end}}
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve command completion by supporting option flags and option
arguments completion. Option completion is activated when the command
implements the OptionsProvider interface. Implementing the
OptionCompleter allows the completion of individual option arguments.
The completion interfaces harmonizes the completion behavior in aerc,
makes the completion code clearer and simplifies the completion
functionality.
With this patch, the Complete method on commands will only have to deal
with the actual completion, i.e. paths, folders, etc and not worry about
options. To remove all options and its mandatory arguments from args,
use commands.Operands().
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Add .Role as a template field for use in distinguishing between
mailboxes with a given IANA role, or custom role defined by aerc
("query" for notmuch queries, for example).
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry<robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the spirit of commit 535300cfdbfc ("config: add columns based index
format"), reuse the column definitions and table widget.
Add automatic translation of render-format to column definitions. Allow
empty columns to be compatible with the %m (mute) flag.
Rename the State object to AccountState to be more precise. Reuse that
object in state.TempateData to expose account state info. Move actual
status line rendering in StatusLine.Draw().
Add new template fields for status specific data:
{{.ConnectionInfo}}
Connection state.
{{.ContentInfo}}
General status information (e.g. filter, search)
{{.StatusInfo}}
Combination of {{.ConnectionInfo}} and {{.StatusInfo}}
{{.TrayInfo}}
General on/off information (e.g. passthrough, threading,
sorting)
{{.PendingKeys}}
Currently pressed key sequence that does not match any key
binding and/or is incomplete.
Display a warning on startup if render-format has been converted to
status-columns.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
These modules will not handle statusline rendering after next commit.
Move them in lib/state to make next commit easier to review.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since previous commit, all commands now support expanding text/template
markup. Reuse that for the new-email trigger command.
Update commands.ExecuteCommand to take optional *AccountConfig and
*MessageInfo arguments. If these are nil, fallback to using the
currently selected account and message (if any).
Pass the proper *AccountConfig and *MessageInfo objects when firing the
trigger command so that these are used instead of the currently selected
ones.
If new-email contains % placeholders, try to convert them to template
markup reusing the same conversion added in commit 535300cfdbfc
("config: add columns based index format"). Warn the user that they need
to update their configuration file.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
| |
Interpret go template constructs in all aerc command arguments based on
the currently selected account, folder and message (if any).
Signed-off-by: Aivars Vaivods <aivars@vaivods.lv>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
Make it easier to debug send configurations.
References: https://todo.sr.ht/~rjarry/aerc/127
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a template for compose tabs.
Other available values:
Account string
Subject string
To []*mail.Address
From []*mail.Address
Cc []*mail.Address
Bcc []*mail.Address
OriginalFrom []*mail.Address
When you use To, From, CC, BCC, or OriginalFrom the title will only be
updated when an editing field has lost focus. This is so we don't end up
calling "PrepareHeader" on every keystroke, which will likely error out
anyways since it will be an invalid header.
Subject still updates every keystroke.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expose go-smtp functionality for setting the domain name as a config
option. This allows aerc to communicate with SMTP servers with strict
antispam measures without relying on sendmail.
In theory, this should be set to a fully qualified domain name, but some
servers simply forbid the use of "localhost", so it is reasonable to let
the user set whatever value works for them.
For comparison, this is equivalent to the functionality of the "domain"
option of msmtp.
Signed-off-by: Karel D. Kopecký <kdk@freeshell.de>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
When switching accounts, headers were updated, but not the account
configurations in the composer. Switch the account config also and add
a debug log to send with the uri being used.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
A previous commit introduced a trace loglevel, but aerc doesn't make
much use of it. Logging is not very informative either. Add a log.Tracef
to every command and log the provided arguments as well.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.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>
|
|
|
|
|
|
|
| |
Reported by Lintian (Debian).
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
The introduction of the iterator means the "next" non-deleted message is
never nil, it will always be equal to the previous message (meaning
there is only one message left and it is the one we are deleting). In
this case, deliberately set next to nil so that the remove tab on delete
logic works properly.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor split update logic to more simply update the split. Through the
evolution of the split logic, additional variables were stored within
the account which allows for cleaner updating of the split.
Compare selected UID instead of pointer to message when deciding not to
update split.
Allow splits to be created and closed when no message is selected. The
split will be filled with a ui.Fill (blank). The user will only see a
border at the split location when no message is selected.
Rename clearSplit to closeSplit, as it is only used in the case when the
user doesn't want a split anymore.
Ensure that the selected UID is reset to the magic UID when there are no
messages left in the message store.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is only one instance of AercConfig which is associated to the Aerc
widget. Everywhere we need to access configuration options, we need
somehow to get a reference either to the Aerc widget or to a pointer to
the AercConfig instance. This makes the code cluttered.
Remove the AercConfig structure and every place where it is referenced.
Instead, declare global variables for every configuration section and
access them directly from the `config` module.
Since bindings and ui sections can be "contextual" (i.e. per account,
per folder or per subject), leave most local references intact.
Replacing them with config.{Ui,Binds}.For{Account,Folder,Subject} would
make this patch even more unreadable. This is something that may be
addressed in the future.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|