| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
When appending a message to a folder, always create the destination
folder if it doesn't exist.
Signed-off-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Add a hook to trigger when a message is sent.
References: https://todo.sr.ht/~rjarry/aerc/136
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new :menu command that can be used to spawn a shell command in an
interactive dialog and execute aerc commands for each of the lines
printed on its standard output like xargs(1) would do in a shell.
The shell command can be configured in aerc.conf under
[general].default-menu-cmd and overridden via the :menu -c <cmd> option.
There are two flags to provide input text to the shell command which can
be useful in combination with other aerc commands:
-a: All account names, one per line:
'<account>' LF
-d: All current account directory names, one per line:
'<directory>' LF
-ad: All directories of all accounts, one per line:
'<account>' '<directory>' LF
Here are some examples:
:menu -adc fzf :cf -a
:menu -c 'fzf --multi' :attach
:menu -dc 'fzf --multi' :cp
And also for key bindings:
<C-p> = :menu -adc fzf :cf -a<Enter>
Changelog-added: New `:menu` command to invoke other aerc commands
based on a shell command output.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some clients are sending a text/plain part that contains nothing but the
text/html part. This is rather suboptimal when replying. To be able to
filter these, it is important to be able to detect things like
<!doctype html>.
Add basic string operations to the template functions.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Tested-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Modify the message date parser tests so they accept all the possible
parsing results, depending on the user's locale settings.
Fixes: 49a8cf10935f ("rfc822: improve dates parsing")
Reported-by: Jason Cox <me@jasoncarloscox.com>
Signed-off-by: Vitaly Ovchinnikov <v@ovch.ru>
Tested-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, when composing a new message, everything is read from the
template files, except the signature, which is added directly in the
compose code. Add a new template variable {{.Signature}}, by moving the
logic of reading signature from command or file from compose to
templates. Update the various default template files to preserve the
original placement of signatures. Users using the default templates
should not notice the change. Users with custom compose templates will
need to update their templates with {{.Signature}}.
Changelog-changed: Signature placement is now controlled via the
`{{.Signature}}` template variable and not hardcoded.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the maildir and notmuch backends, add the full path of the message
as Filename to templates. In case of a notmuch message having multiple
files associated with it, it returns a random path. Also add Filenames
to templates, which is a list of all associated message paths. This is
relevant for the notmuch backend, where a single messages is shown, if
there are multiple copies of it.
Changelog-added: Add filepath to messages in templates as .Filename(s)
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Provide better parsing of email dates with timezone names, but without
numeric offsets. Add unit tests to check the new behaviour.
Signed-off-by: Vitaly Ovchinnikov <v@ovch.ru>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
introduce a general FindMIMEPart function to find a message part with
the given MIME type.
reimplement FindPlaintext and FindCalendartext in terms of this new
FindMIMEPart function.
Signed-off-by: Sebastien Binet <s@sbinet.org>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Implement the :patch find command. Search and filter for a given commit
by subject line in the current accout and current folder.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement worktree support for the patch management.
Use ":patch apply -w <commit-ish> <tag>" to create a new worktree and
apply the selected messages to it. The worktree is linked to repo in the
current project.
Internally, the worktree is stored as a new project. When this project
is deleted with ":patch delete", the underlying linked worktree is
removed as well.
":patch list" shows when a project is a worktree and to what project it
is linked to.
Worktrees enable the users to create a new copy of the repo at a given
commit and apply patches without interrupting the current work in the
base repo.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Implement the :project switch command. Switch between different
projects.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Implement the :patch delete command. Remove the project data from the
permanent store. If no argument is provided, the current project will be
deleted.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the :patch rebase command. Rebase the internal patch data in
case the repository was rebased too. The :patch rebase command accepts a
optional argument which is used as the reference commit from which the
rebasing will occur.
Open an editor with the commits that are found on top of the rebase
reference. Any untracked commit will have the tag 'untracked'. If a line
is removed or the 'untracked' tag remains, it will be dropped from the
internal data.
To group commits into a patch set, assign the same tag names.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the :patch remove command. Remove a patch set from the
respository and from the internal storage. Note that in git, this will
change all commit hashes that appear after the removed one since the
commit hash depends on its parents. Adjust the code to handle such cases
and add tests for this.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Implement the :patch list command. List the the current project and add
a flag to list all saved projects. Use the pager to display the data and
extract the pager commands and move them into the config package.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Add the :patch apply command to apply a patch set and create a
corresponding tag. The tag command argument can be completed based on
the subject lines of the selected messages. Add a test for the
completion proposal.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Implement the :patch init command to initialize a new project.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Implement the persistent store for models.Project structs.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Implement the RevisionController interface to interact with a
respository control system. Add the implementation for git. Other
revision systems such as mercurial, pijul or fossil can be extended.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Define the entity models for the patch management. Add a Project and
Commit struct and implement the Stringer interface for both.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An empty subject, especially in a thread makes it for a slightly jarring
layout. Add a new option empty-subject option to UI with "(no subject")
as the default value. If the subject is empty and the current message is
not the same subject as it's parent in a thread make {{.Subject}}
evaluate to this option's value.
Changelog-added: The `{{.Subject}}` template is evaluated to the new
option `[ui].empty-subject` if the subject is empty.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
When there is only one completion choice available, accept the
completion immediately upon a <Tab> key press. This is consistent with
how most completion engines work (bash, vim, etc.).
Reported-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When completion choices are surrounded by quotes to make sure that they
will be interpreted as a single argument, hide them before presenting
the choices to the user. It makes the UI cluttered and harder to read.
The completion values remain identical, the quotes will be inserted when
the user accepts one choice.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a thread is folded, it can be useful to know how many unseen
messages lie below the root. For example, one might want to show that
count in the message list:
column-folded = {{if .ThreadFolded \
}}{{if ne .ThreadUnread 0 \
}}{{.ThreadUnread | printf "%s/"}}{{ \
end}}{{ .ThreadCount | printf "%s"}}{{end}}
Add `.ThreadUnread` to the template functions.
Changelog-added: `.ThreadUnread` is now available in templates.
Signed-off-by: inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Allow setting complete-min-chars = manual to disable automatic
completion.
Changelog-added: Setting `complete-min-chars=manual` in `aerc.conf` now
disables automatic completion, leaving only manually triggered
completion.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, if less than complete-min-chars were entered or if
completion-delay had not expired yet, the only way to force trigger
completion was to press <tab>.
In some cases, <tab> is already bound to another action (for example
:next-field in the compose::editor context). This makes forcing the
completion impossible.
Allow defining a key to trigger manual completion via the new $complete
special entry in binds.conf.
Leave the default binding to <tab>. Set it to <C-o> in the
[compose::editor] to avoid conflicting with the existing <tab> binding.
Changelog-added: Customize key to trigger completion with `$complete` in
`binds.conf`.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mail-added hook runs whenever a message is added to a folder.
Note that the hook does not run when a new message is received (the
mail-received hook already covers that) but instead runs whenever aerc
itself adds a message to a folder, e.g. when moving or copying a
message.
Changelog-added: `mail-added` hook that triggers when a message is added
to a folder.
References: https://todo.sr.ht/~rjarry/aerc/136
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mail-deleted hook runs whenever a message is deleted from a folder.
Note that this means moving a message from one folder to another
triggers the mail-deleted hook.
Changelog-added: `mail-deleted` hook that triggers when a message is
removed/moved from a folder.
References: https://todo.sr.ht/~rjarry/aerc/136
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Add a toggle option (-t) to :fold/:unfold commands to allow for
switching the folding status of a thread.
Changelog-Added: Toggle folding with `:fold -t`.
Signed-Off-By: inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Jason Cox <me@jasoncarloscox.com>
|
|
|
|
|
|
|
| |
Extend the :fold/:unfold behaviour to allow for multiple folding levels.
Signed-Off-By: inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Allow running shell commands in openers.
Changelog-changed: `:open` commands are now executed with `sh -c`.
Requested-by: Vitaly Ovchinnikov <v@postbox.nz>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define a SearchCriteria structure. Update the FetchDirectoryContents,
FetchDirectoryThreaded and SearchDirectory worker messages to include
this SearchCriteria structure instead of a []string slice.
Parse the search arguments in a single place into a SearchCriteria
structure and use it to search/filter via the message store.
Update all workers to use that new API. Clarify the man page indicating
that notmuch supports searching with aerc's syntax and also with notmuch
specific syntax.
getopt is no longer needed, remove it from go.mod.
NB: to support more complex search filters in JMAP, we need to use an
email.Filter interface. Since GOB does not support encoding/decoding
interfaces, store the raw SearchCriteria and []SortCriterion values in
the cached FolderContents. Translate them to JMAP API objects when
sending an email.Query request to the server.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid importing code from worker/lib into lib. It should only be the
other way around. Move the message parsing code used by maildir,
notmuch, mbox and the eml viewer into a lib/rfc822 package.
Adapt imports accordingly.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some commands need to invoke others and/or run shell commands. For this,
we need the raw command line as entered by the user. Pass it down the
call chain just before it is split to invoke the command Execute method.
Remove unit tests for the template expand() test which does have any
added value now that it is performed on a single string without any
quote juggling.
Update all code to handle a single string instead of a list of
arguments.
Introduce a new dependency on git.sr.ht/~rjarry/go-opt to deal with
shell splitting. This is in preparation for using opt.ArgsToStruct to
parse arguments for all aerc commands.
There should be no functional change after this patch.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
| |
This function is not used anywhere. Remove it.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
| |
Add :suspend to suspend the aerc process, returning to shell. Include
documentation and default Ctrl-z keybinding for it.
Changelog-added: New `:suspend` command bound to `<C-z>` by default.
Signed-off-by: Nojus Gudinavičius <nojus.gudinavicius@gmail.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Wildcard aliases make it possible to always reply from the same address
to which a message was addressed, which is useful for catch-all email
domains. Support fnmatch-style wildcards in only the address portion of
an alias.
When replying to a message that matches a wildcard alias, substitute the
matching email address for the wildcard address, but keep the name
specified with the wildcard address. For example, when the alias
"Someone Awesome" <*@someone.com> is present, the reply to an email
addressed to "Someone" <hi@someone.com> would be from
"Someone Awesome" <hi@someone.com>.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Add new `flagged` criteria to `:sort` command (and apparently to the
`sort` config option). Good for moving important stuff up.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the -r option to :attach so that the attachments can be piped in
from a command. Example:
:attach -r image.jpg read-jpeg-from-clipboard.sh
It takes two parameters: the attachment name (to be used in the email
and to get the MIME type from) and the command to execute and read the
output.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
|