| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A single notmuch message can represent multiple files. As a result,
file-based operations like move, copy, and delete can be ambiguous. Add
a new account config option, multi-file-strategy, to tell aerc how to
handle these ambiguous cases. Also add options to relevant commands to
set the multi-file strategy on a per-invocation basis.
If no multi-file strategy is set, refuse to take file-based actions on
multi-file messages. This default behavior is mostly the same as aerc's
previous behavior, but a bit stricter in some cases which previously
tried to be smart about multi-file operations (e.g., move and delete).
Applying multi-file strategies to cross-account copy and move operations
is not implemented. These operations will proceed as they have in the
past -- aerc will copy/move a single file. However, for cross-account
move operations, aerc will refuse to delete multiple files to prevent
data loss as not all of the files are added to the destination account.
See the changes to aerc-notmuch(5) for details on the currently
supported multi-file strategies.
Changelog-added: Tell aerc how to handle file-based operations
on multi-file notmuch messages with the account config option
`multi-file-strategy` and the `-m` flag to `:archive`, `:copy`,
`:delete`, and `:move`.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Tested-by: Maarten Aertsen <maarten@nlnetlabs.nl>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
There is an overlap between ACCOUNT and MESSAGE. Rename ACCOUNT to
MESSAGE_LIST and use MESSAGE_LIST|MESSAGE_VIEWER instead of MESSAGE.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
| |
This has nothing to do at the root of the source tree.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new -a flag to :cp. When specified, an account name is required
before the folder name. If the destination folder doesn't exist,
it will be created whether or not the -p flag is specified.
Changelog-added: Copy messages across accounts with `:cp -a <account>
<folder>`.
Signed-off-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Implement command completion with complete struct field tags from the
get-opt library introduced earlier.
Changelog-changed: Improved command completion.
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the argument parsing framework introduced earlier to unify the
parsing of (almost) all command options. Remove custom parsing code and
to avoid extraneous types, add fields with `opt` tags on command structs
that have options and arguments. Commands that take no argument do not
need anything.
Since the command objects now carry data, create a new temporary
instance of them before passing them to opt.ArgsToStruct when executing
a command.
A few of the commands use specific semantics for parsing (:choose), or
are delegating argument parsing to another function (:sort, :search,
:filter). For these commands, simply add a dummy "-" passthrough
argument. Since all commands still have the argument list (after split)
nothing needs to be changed in this area.
There should be no functional change besides the Usage strings and
reported errors which are now generated automatically.
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The single Aerc object is passed around in almost all command functions.
This hinders readability.
Store the single Aerc instance as a global variable. Export public
functions from the app package to access methods of that object. Remove
all explicit references to *app.Aerc and replace them with calls to
these functions. For references to private/unexported fields and
functions from within the app package, directly access the global aerc
object.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
| |
This is the central point of all aerc. Having it named widgets is
confusing. Rename it to app. It will make a cleaner transition when
making the app.Aerc object available globally in the next commit.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
| |
Separate the marking functions from the message store and extract the
marking behavior into its own class with tests.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply GoDoc comment policy (comments for humans should have a space
after the //; machine-readable comments shouldn't)
Use strings.ReplaceAll instead of strings.Replace when appropriate
Remove if/else chains by replacing them with switches
Use short assignment/increment notation
Replace single case switches with if statements
Combine else and if when appropriate
Signed-off-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Run `make fmt`.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to better align to vim functionality: deselect visual mode
selections after performing a command on the selection. This patch also
introduces a new command to allow for re-selecting (remarking) the
previous selection set so that commands can be chained together. The
deselection only applies to msg commands that *do not* move the message
from the store (those types of commands already deselect):
- read/unread
- flag/unflag
- modify-labels
- copy
- pipe
Previous usage to mark several messages as read and deselect all:
Vjjj:read<Enter>:unmark -a<Enter>
New usage, similar to vim:
Vjjj:read<Enter>
To chain a command together:
Vjjj:read<Enter>:remark<Enter>{next command}<Enter>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
I'm not sure what are the implications but it seems required.
Link: https://github.com/golang/go/issues/20883
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
| |
The individual callers should not be responsible for padding
|
|
|
|
| |
This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
|
|
|
|
| |
This reverts commit f06d683688e3d2139b14f67b7e349089e7200bf4.
|
|
|
|
| |
We always set 10 seconds anyhow, might as well do that without repeating ourselfs.
|
|
|
|
|
|
|
|
|
|
| |
The following functionalities are added to configure aerc ui styles.
- Read stylesets from file with very basic fnmatch wildcard matching
- Add default styleset
- Support different stylesets as part of UiConfig allowing contextual
styles.
- Move widgets/ui elements to use the stylesets.
- Add configuration manual for the styleset
|
| |
|
| |
|
|
|
|
| |
Forgot an unused import, to save you the hassle here is v2.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch ensures the following commands join their arguments with
spaces to make it easier to interact with:
- cf
- mkdir
- cd
- attach
- detach
- ct
- copy
- move
- save
|
| |
|
|
|
|
| |
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
On a slow network connection, running these commands without this guard
will cause aerc to panic.
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
|
| |
|
|
|
|
|
| |
Tab completion currently only works on commands. Contextual completion
will be added in the future.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds an archive command that moves the current message into the folder
specified in the account config entry.
Supports three layouts at this point:
- flat: puts all messages next to each other
- year: creates a folder per year
- month: same as above, plus folders per month
This also adds a "-p" argument to "cp" and "mv" that works like
"--parents" on mkdir(1). We use this to auto-create the directories
for the archive layout.
|
|
Consists of 3 functions
* Store: Access to MessageStore type
* SelectedAccount: Access to Account widget that the target widget
belongs to
* SelectedMessage: Current message (selected in msglist or the one we
are viewing)
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
|