| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Document the local patch management. Adjust the help command. Add
default key binds.
Changelog-added: Patch management with `:patch`.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Remove dynamic folders in the notmuch backends with the :rmdir command.
Dynamic folders can be created by the :cf command but they cannot be
removed again unless you restart aerc or use it in combination with a
maildir-store.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Even if macos has GNU make, the gmake command is not available.
Fixes: 73bf7241e611 ("lint,validate: fix for openbsd")
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove GNU specific stuff (ln -v, mktemp --tempdir, grep --color)
- Remove GCC specific flags in sendemail-validate (-Warith-conversion)
- Add -std=c99 and -Wpedantic and fix the reported warnings.
- Explicitly call gmake everywhere.
- Run our custom analyzer standalone. Golangci lint plugins are not
supported on OpenBSD. Indirect dependency to golang.org/x/mod is
required somehow...
Reported-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new -a flag to :cf. When specified, an account name is required
before the folder name and the focus will be changed to the
corresponding account tab before changing folders.
If the target folder does not exist, an explicit error will be reported.
Changelog-added: Change to a folder of another account with
`:cf -a <account> <folder>`.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Co-authored-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
|
|
|
|
|
|
|
|
| |
Only consider the start of a signature if a line is exactly "-- " with
a trailing space character.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Be more tolerant with diffs that were produced by other version control
systems than git. OpenBSD for instance, uses CVS. Add more test cases
from the OpenBSD mailing lists.
Link: https://marc.info/?l=openbsd-ports&m=169989204001628&w=2
Link: https://marc.info/?l=openbsd-ports&m=169987607521242&w=2
Reported-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
|
|
|
|
|
|
|
|
|
| |
\n needs to be escaped in .scd files. Reword the description to make it
clear that CRLF is the standard.
Fixes: ad159d5e9bd4 ("compose: add option for LF-only editors")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
| |
Allow running :eml ~/foo/baz.eml.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prevent an unwanted folder selection in the directory tree when
archiving.
A previous fix (commit 0be135a3) introduced a regression which caused
the directory tree to select the folder for which a CreateDirectory
message returned successfully.
Since the :archive command will issue a CreateDirectory message in every
operation, the directory tree will thus erroneously select the target
archive directory.
However, the functionality to select a newly created folder by the
:mkdir command is actually correct and should be kept since this
corresponds to the regular directory list behavior.
Another quirk that is addressed is caused by the rebuilding of the
directory tree when the underyling directories change. In that case, the
ui.DirListCollapse setting would overwrite the user changes. Therefore,
only apply the ui.DirListCollapse setting at the first time of building
the directory tree.
Fixes: 0be135a38186 ("dirtree: fix jumping folders")
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix jumping folders in the directory structure.
Fixes: a35d9bab ("rmdir: ensure proper sequence of operations")
Reported-by: inwit <inwit@sindominio.net>
Reported-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Fix the -a option to correctly set or unset the answered flag.
Fixes: https://todo.sr.ht/~rjarry/aerc/199
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 running a terminal in a dialog that is closed before the terminal
has had a chance of being redrawn, the cursor may be left visible.
Make sure to hide the cursor in the close routine.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Tested-by: Jason Cox <me@jasoncarloscox.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had account and composer tab title configuration fields already, but
not for viewer. Add tab-title-viewer configuration, which defaults to
Subject if it is not empty and to "(no subject)" when it is empty.
Changelog-added: New `[ui].tab-title-viewer` setting to configure the
message viewer tab title.
Changelog-changed: Message viewer tab titles will now show `(no subject)`
if there is no subject in the viewed email.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Jump back to the current folder consistently when encountering an error.
This has only been partly implemented. For example, when you try to
remove a notmuch folder, the remove operation will fail because it is
unsupported. However, you would end up in a different directory because
a directoy change is done before trying to remove the current folder. If
this happens make sure you end up in the current directory again.
Fixes: a35d9bab4664 ("rmdir: ensure proper sequence of operations")
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Add a new directory role to indicate virtual nodes in the directory
tree. This allows to style the virtual nodes differently and apply
different behaviors in some commands (i.e. rmdir).
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a NewContext() function that extracts and handles the canceling and
re-creation of a new context for the directory list. This enables a
better control of the context cancellation especially for a directory
tree when a virtual node is selected. Before, the previous folder would
have been opened if a virtual node was selected.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The composing account may be different than the currently selected
account if the user has moved between different tabs since beginning the
message.
Fixes: faa879f9a84d ("hooks: add mail-added hook")
Reported-by: Vitaly Ovchinnikov <v@ovch.ru>
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Vitaly Ovchinnikov <v@ovch.ru>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using edit-headers=true using :switch-account alone is not enough
to properly switch account since you have to change the From header
manually. Add the -A [account] option to reply in order to switch the
account before opening the composer, to remove this friction when we
already know we want to reply with a different account.
Changelog-added: Reply with a different account than the current one
with `:reply -A <account>`.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
There's no need to specify aliases if an option applies to all the
aliases of a command. Remove aliases for :fold's toggle option.
Signed-Off-By: inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Commands :fold/:unfold act upon a single thread. Add an option to both
commands allowing the user to fold/unfold all displayed threads.
Signed-Off-By: inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Koni Marti <koni.marti@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add AERC_ACCOUNT and AERC_ADDRESS_BOOK_CMD to the editor's environment
when composing a message. These variables allow for per-account
configuration of the editor and facilitate address completion when
edit-headers = true.
Changelog-added: `AERC_ACCOUNT` and `AERC_ADDRESS_BOOK_CMD` are now
defined in the editor's environment when composing a message.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Pull in changes allowing us to specify the environment of the start
command for a term. This will allow defining environment variables for
the editor in the next commit.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
These folks have been active for quite a while with bug triaging and
code review. I have given them moderator access on the mailing lists and
on the bug tracker.
Thanks guys!
Cc: Bence Ferdinandy <bence@ferdinandy.com>
Cc: Inwit <inwit@sindominio.net>
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Remove systematic sorting of all completion choices. The choices
ordering as reported by callbacks are now preserved. The flags
themselves are always at the end in the order in which they are declared
in the option struct.
Reported-by: Skejg <grolleman@zoho.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Remove the dedicated background color for unread selected
e-mails because it's too close to the foreground color.
Signed-off-by: Max Schillinger <max@mxsr.de>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, :cf thread:\{id:{{.MessageId}}\} is broken because it is
quoted before being interpreted by notmuch. The dynamic folder is
created with this "query" (including the quotes):
'thread:{id:23627381....}'
Notmuch queries use the xapian syntax and do not follow basic shell
quotes interpretation.
Change :cf only argument to preserve the command line as entered by the
user without any interpretation. When the backend is notmuch, forward
that as the dynamic folder name.
For other backends, interpret shell quoting on the user entry and fail
if it produces more than one argument.
Link: https://xapian.org/docs/queryparser.html
Fixes: 6613d9b555be ("cf: fix unexpected argument on notmuch")
Reported-by: Inwit <inwit@sindominio.net>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Add support for Alt+<number> keys. Update documentation for it.
Changelog-added: Allow binding commands to `Alt+<number>` keys.
Signed-off-by: Erik Terpstra <erik@nixhub.nl>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure the proper sequence of opening and removing a directory. Fix a
potential race between the OpenDirectory (issued by dirlist.Select())
and the RemoveDirectory messages when removing a directory.
Due to the delay in the current dirlist.Select() function, the
RemoveDirectory message can arrive at the backend before the directory
was changed to a different one. This can cause an error on some imap
servers and problems with the watcher on the maildir backends.
Introduce dirlist.Open() that accepts a callback function so that the
operations can be performed in proper sequence. Dirlist.Select() is now
a wrapper call to dirlist.Open().
Reported-by: inwit <inwit@sindominio.net>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Add ~ support to :export-mbox and :import-box the same way as it is done
in :save.
Signed-off-by: Vitaly Ovchinnikov <v@ovch.ru>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Upon success, commands :delete, :copy, :archive and :move show "Messages
deleted/copied/archived/moved" in the status bar, which is obviously
wrong if they are acting upon only one message. Make the success
notification for those commands explicitly agree with the actual number
of messages.
Signed-Off-By: inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|