| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Register all commands with the same function and store them in the same
map.
Use bit flags to determine in which contexts each command should be
available.
Remove duplicate commands now that the same command can be exposed in
multiple contexts.
Refactor API to allow executing commands from other commands without
import cycles.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
|
|
|
|
|
|
|
|
|
| |
Use the message from the current tab to populate the :envelope window.
Fixes: https://todo.sr.ht/~rjarry/aerc/213
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For some reason, a JMAP server may send message details with empty
blobId values. This is invalid but it should not cause a crash.
Error: runtime error: slice bounds out of range [-2:]
goroutine 16 [running]:
git.sr.ht/~rjarry/aerc/worker/jmap/cache.(*JMAPCache).blobPath()
git.sr.ht/~rjarry/aerc/worker/jmap/cache/blob.go:43 +0x95
git.sr.ht/~rjarry/aerc/worker/jmap/cache.(*JMAPCache).GetBlob()
git.sr.ht/~rjarry/aerc/worker/jmap/cache/blob.go:11 +0x18
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).handleFetchMessageBodyPart()
git.sr.ht/~rjarry/aerc/worker/jmap/fetch.go:116 +0x26f
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).handleMessage()
git.sr.ht/~rjarry/aerc/worker/jmap/worker.go:142 +0x25f
git.sr.ht/~rjarry/aerc/worker/jmap.(*JMAPWorker).Run()
git.sr.ht/~rjarry/aerc/worker/jmap/worker.go:177 +0x105
git.sr.ht/~rjarry/aerc/app.NewAccountView.func3()
git.sr.ht/~rjarry/aerc/app/account.go:105 +0x57
created by git.sr.ht/~rjarry/aerc/app.NewAccountView in goroutine 1
git.sr.ht/~rjarry/aerc/app/account.go:98 +0x468
Ignore a blobId when it is an empty string.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tristan Partin <tristan@partin.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure that the encrypted and/or signed messages contain a correct
MIME-Version header field at the top level of the message in compliance
with RFC2045 Section 4.
Link: https://datatracker.ietf.org/doc/html/rfc2045#section-4
Link: https://lists.sr.ht/~rjarry/aerc-discuss/%3C1704071512-sup-2798%40honeycomb%3E
Reported-by: Dan Callaghan <djc@djc.id.au>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
The dates associated with tags and HEAD was always the previous tag. Fix
the indexing for date parsing.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the new Changelog-*: trailers it's important that trailers are not
misspelled accidentally and to cut down on trailer clutter. Add an
explicit list of accepted trailers with their preferred ordering and
some explanation where warranted to CONTRIBUTING. Enforce the list in
CI.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Check if the Changelog-*: trailers have proper English sentences
starting with a capital letter and ending in a period. Update
CONTRIBUTING with an explicit mention of this.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
The contributing guidelines ask for a use of a short prefix in the
commit title. Delegate nitpicking about the existence of the prefix to
the CI.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Reduce code duplication.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Notmuch query directories aren't backed by a filesystem directory, so
deleting them doesn't actually delete any messages. Allow removing such
directories even when they aren't empty to avoid the need to use the
somewhat scary -f flag.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Use the currently selected message part (if any) as the original message
for quote-reply and forward. Honor viewer::alternatives if no message
part was selected.
Signed-off-by: Sebastien Binet <s@sbinet.org>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
GetFolders returns the current account email folders, not filesystem
folders. Use CompleteDirs instead.
Fixes: abe228b14d97 ("commands: use completion from go-opt")
Fixes: https://todo.sr.ht/~rjarry/aerc/205
Reported-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Having both a string argument with a default value and an optional list
of strings breaks completion with go-opt.
Replace with a single argument and update all code accordingly.
Fixes: abe228b14d97 ("commands: use completion from go-opt")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Folders that contain spaces are surrounded by quotes. They can never end
with '/'. Hence they are never returned in the completion results.
Update CompletePath with an additional onlyDirs argument to take care of
this before quotes are inserted.
Fixes: abe228b14d97 ("commands: use completion from go-opt")
Fixes: https://todo.sr.ht/~rjarry/aerc/204
Reported-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function is overly complex, has code duplication and is not
preserving user input (converting all paths to absolute paths).
Simplify it and avoid converting relative paths to absolute ones.
Add unit tests to ensure it works as expected.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
| |
Add a script that deals with the proper formatting and ordering of git
trailers. Install it as commit-msg git hook so that everyone can benefit
from it.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
| |
Several settings have been deprecated a few versions ago and announced
their removal in 0.17.
Remove these deprecated sections and their uses.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
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>
|
|
|
|
|
|
|
|
|
|
| |
Treat folded threads as one entity and apply any operation on its hidden
children as well.
Fixes: https://todo.sr.ht/~rjarry/aerc/206
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider a thread with a root message and three child messages, each of
which has a single child message, like so:
root
child 1
grandchild 1a
child 2
grandchild 2a
child 3
grandchild 3a
With the previous implementation, if child 2 (or child 3) is not shown
by the current query, then grandchild 2a (or grandchild 3a) will not be
shown either. Ensure that this bug does not occur; that is, ensure that
children of non-queried non-first-child messages are shown in threads.
A more complex implementation is possible that maintains only a single
loop over the messages, but thinking about it made my head hurt. Use a
second (at times redundant) loop instead for simplicity's sake.
Changelog-fixed: Don't lose child messages of non-queried parents in
notmuch threads
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Some OSes (e.g., Arch Linux) ship GNU Make but only provide the `make`
executable.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
this fixes a bug that prevented reading maildirs with paths containing
`:` characters, among other changes
changelog here: https://github.com/emersion/go-maildir/releases
Signed-off-by: George Honeywood <aerc@george.honeywood.org.uk>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
The alpine runner does not natively contain curl.
Add it to the list of required packages.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
There's no colorized filter.
Fixes: c56e938f9c82 ("doc: proofreading")
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
| |
For some reason there was none. Be consistent with wrap.
Signed-off-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>
|
|
|
|
|
|
|
|
|
|
| |
Make commands abbreviations work again by fixing the mistake introduced
in one of the recent commits.
Fixes: 07c1cefcf62d ("patch: create sub-command structure")
Signed-off-by: Vitaly Ovchinnikov <v@ovch.ru>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our way of building trees seems absurd: generate a list of prefixes,
reverse it, and trim the first element.
Change it so the string is built back to front and define the arrows
beforehand so they are easier to configure.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently if there are mails aerc can not properly handle, listing the
mailbox is aborted. This is especially bothersome if the message one is
looking for would be parseable without issue.
Show an error if parsing of a message fails, but handle all other
messages as normal. This leads to those messages showing up as still
loading.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
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>
|
|
|
|
|
|
|
|
| |
modify quote-reply to quote the message part corresponding to the first
MIME type matching the list in viewer::alternatives.
Signed-off-by: Sebastien Binet <s@sbinet.org>
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 term command. This will open a shell in the
project's root directory that was defined during the :project init
setup.
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 cd command. Change the directory to the project's
root directory that was determined during the :patch init setup process.
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>
|
|
|
|
|
|
|
|
| |
Create the sub-command structure for the :patch command. Make the :patch
command accessible from any context.
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>
|
|
|
|
|
|
|
|
| |
Fix check-docs linter for subcommands, i.e. where spaces are between the
root command and the subcommands such as in ":patch init".
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|