Commit Graph

80 Commits

Author SHA1 Message Date
Koni Marti 903d436ab8 mailto: add account query parameter
Specify an account parameter in the mailto argument. If not specified,
the selected account is used as default.

Example:

$ aerc 'mailto:user@host?account=Fastmail'

Suggested-by: staceee
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-08-01 12:26:29 +02:00
Tim Culverhouse db195bebf0 commands: add check-mail command
Add :check-mail command for ad-hoc checking of mail. Reset timer for
automatic checking if it is enabled.

Suggested-by: staceee
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-08-01 10:37:28 +02:00
Koni Marti e200cd56bf commands: implement a no-quit mode
Add a mode that prevents aerc from quitting normally when an important
task is performed, i.e. when sending a message. The no-quit mode will be
ignored when quit is used with the -f option to force an exit.

Suggested-by: ph14nix[m]
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-07-14 23:15:02 +02:00
Koni Marti e572087e58 account: import mbox file to a folder
Append all messages from an mbox file to the selected folder with the
import-mbox command.

User confirmation is required when the folder already contains messages.

A failed append will be retried a few times. If a backend timeout
occurs, the entire import is stopped to prevent a hang.

Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-07-14 23:14:56 +02:00
Koni Marti 845763cb1f account: export folder to mbox file
Export all message in the current folder to an mbox file. If an error
occurs during the export, aerc retries a few times before giving up to
prevent a hang.

Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-07-14 23:14:54 +02:00
Koni Marti 0e6b9dab0c doc: describe parameters for mailto option
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
2022-07-10 20:34:47 +02:00
Koni Marti 60052c6070 forward: provide option to append all attachments
Append all non-multipart attachments with the -A flag. Rename the flag
for forwarding a full message as an RFC2822 attachments to -F.

Suggested-by: psykose
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
2022-07-02 17:53:06 +02:00
Tim Culverhouse 4753cfd3e3 visual-mode: deselect messages after performing command
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>
2022-06-14 22:12:42 +02:00
Koni Marti 62982a9a67 invites: reply with accept, accept-tentative or decline
Reply to iCalendar invitations with three commands: :accept,
:accept-tentative or :decline. Parse a text/calendar request, create a
reply and append it to the composer.

Suggested-by: Ondřej Synáček <ondrej@synacek.org>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-05-31 14:32:24 +02:00
Tim Culverhouse b57fceaad4 pgp: add attach key command
Add compose command ("attach-key") to attach the public key associated
with the sending account. Public key is attached in ascii armor format,
with the mimetype set according to RFC 3156 ("application/pgp-keys").

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Koni Marti <koni.marti@gmail.com>
2022-05-06 11:02:55 +02:00
Koni Marti cb887a2d9d store: keep current message selected
Keep current message selected when clearing or changing filters and when
toggling threads.

Add -s flag to the clear command to also clear the selected message and
set cursor to the top of the message list.

Implements: https://todo.sr.ht/~rjarry/aerc/36
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-04-17 12:18:33 +02:00
Robin Jarry d64ceba2cc save: add -a option to save all attachments
Allow saving all message parts that have the content disposition
"attachment" header to a folder.

Suggested-by: Ondřej Synáček <ondrej@synacek.org>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
2022-03-24 15:30:10 +01:00
Robin Jarry 115dabb634 pipe: allow piping multiple marked messages
When messages are marked, pipe their contents into the specified
command. The messages are ordered according to their respective
Message-Id headers. This allows applying complete patch series with
a single command.

When piping more than one message, make sure to write them in the mbox
format as git am expects them to be.

Link: https://en.wikipedia.org/wiki/Mbox
Link: https://github.com/git/git/blob/v2.35.1/builtin/mailsplit.c#L15-L44
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Tested-by: akspecs <akspecs@gmail.com>
2022-02-25 13:56:53 +01:00
Koni Marti 7811620eb8 threading: implement on-the-fly message threading
implement message threading on the message store level using the
jwz algorithm. Build threads on-the-fly when new message headers arrive.

Use the references header to create the threads and the in-reply-to
header as a fall-back option in case no references header is present.

Does not run when the worker provides its own threading (e.g. imap
server threads).

Include only those message headers that have been fetched and are
stored in the message store.

References: https://www.jwz.org/doc/threading.html
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Inwit <inwit@sindominio.net>
Tested-by: akspecs <akspecs@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-02-24 13:00:12 +01:00
Koni Marti 8f9a633523 commands: add expand-folder and collapse-folder
add the expand-folder and collapse-folder commands to navigate the
directory tree view. Provide keybinds for a vi-like folder navigation
experience.

Signed-off-by: Koni Marti <koni.marti@gmail.com>
2022-02-23 21:09:01 +01:00
Ariel Costas 7c945149a6 doc: correct typo in man-pages
Fix a typo in the man page where it reads "maintained by by Robin"
instead of "maintained by Robin"

Signed-off-by: Ariel Costas <ariel@costas.dev>
2022-01-26 19:23:29 +01:00
Robin Jarry 92bf89c338 docs: mention missing -T options for compose and forward
A template file may be specified for compose and forward as well.

Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-19 21:29:16 +01:00
inwit bc593ac7cd recall: allow recalling messages from any folder
Recall fails when called outside of the "postpone" folder (usually
"Drafts"). This makes sense for postponed messages. However, sometimes
the user would like to re-edit and re-send an old, possibly sent,
message, which would serve as a basis for the new one.

This patch allows recall to work outside the postpone folder, thus
allowing for re-edition of any message.

In the original recall function, if the recalled message is found in the
"postpone" folder, once the message has been recalled, re-edited and
sent, the original draft is deleted. With this patch, when the message
is not in the "postpone" folder, the original message is not deleted.

Signed-off-by: inwit <inwit@sindominio.net>
2021-12-13 14:56:39 +01:00
Robin Jarry 44ad5f9a25 doc: update authors
Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-11-09 20:11:42 +01:00
Robin Jarry 0d645bcebd go.mod: change base git url
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>
2021-11-05 10:21:45 +01:00
Reto Brunner 949781fa0a Refactor lib/open to accept user provided arguments
* Get rid of open_darwin
	It just lead to code duplication for a simple one string change.
	Instead we query it during initialization
* Accept user provided arguments
	"open" on MacOS accepts things like -A to use a specific application
	Pass trough arguments the user provided in order to facilitate this
* Refactor the function to a struct
	This makes it more convenient for the caller and avoids signatures like
	lib.OpenFile(nil, u.String(), nil) which are fairly unreadable
2021-01-30 14:04:23 +01:00
Bor Grošelj Simić 91f29206a3 s/RFC 8022/RFC 2822/ 2020-12-26 13:10:53 +01:00
Daniel Sockwell a1467af03d Document pin-tab and unpin-tab commands
The `pin-tab` and `unpin-tab` global commands were added in 3156d48
but were not previously documented.  This documents them in aerc.1.
I added them with the other tab commands, which appeared to be grouped
as a logical unit.
2020-11-08 16:24:07 +01:00
Josh Holland 4f40eecef8 doc: fix typo in aerc man page 2020-09-17 22:11:29 +02:00
ARaspiK fe1cabb077 Add support for :rmdir
The `:rmdir` command removes the current directory (`-f` is required if
the directory is not empty).

This is not supported on the notmuch backend.

An issue with the maildir backend is that some sync programs (e.g.
offlineimap) may recover the directory after it is deleted.  They need
to specifically be configured to accept deletions, or special commands
need to be executed (e.g. `offlineimap --delete-folder`) to properly
delete folders.

A danger of using this on the IMAP backend is that it is possible for a
new message to be added to the directory and for aerc to not show it
immediately (due to a slow connection) - using `:rmdir` at this moment
(with `-f` if the directory already contains messages) would delete the
directory and the new message that just arrived (and all other
contents).  This is documented in aerc(1) so that users are aware of
possible risks.
2020-08-19 11:38:57 +02:00
Nicolai Dagestad 548a5fff68 Set environment variables for the exec command 2020-08-03 06:30:28 +02:00
Tobias Wölfel 825996572f Document mailto argument usage 2020-07-19 11:15:56 +02:00
ARaspiK 0535f6333f Add additional flagging functionality
More mail flags can now be set, unset, and toggled, not just the
read/seen flag.

This functionality is implemented with a new `:flag` and `:unflag`
command, which are extensions to the matching `:read` and `:unread`
commands, adding support for different flags.  In fact, the
`read`/`unread` commands are now recognized aliases to `flag`/`unflag`.
The new commands are also well documented in aerc(1).

The change mostly extends the previous read/unread setting functionality
by adding a selection for the flag to change.
2020-07-08 09:13:03 +02:00
Martin Michlmayr a7986f5706 Fix typos 2020-05-21 18:11:47 +02:00
Ray Ganardi b650bb30a2 Implement :header command
Usage: *header* [-f] <field> [value]
	Add a new email header. If the header already exists, -f must be
	specified to replace the given value.
2020-05-01 11:01:28 -04:00
Jeffas 3102ac3680 Add recall command
This command allows recalling the selected postponed email to edit in
the composer. The command only allows recalling from the postpone
directory.
2020-04-24 12:59:21 -04:00
Jeffas 7f033278eb Add postpone command
This command uses the Postpone folder from the account config to save
messages to. Messages are saved as though they were sent so have a valid
'to' recipient address and should be able to be read back in for later
editing.
2020-04-24 12:59:21 -04:00
Ray Ganardi 447e662057 Add :choose command
Usage:
	*choose* -o <key> <text> <command> [-o <key> <text> <command>]...

Prompts the user to choose from various options.
2020-04-24 12:59:21 -04:00
Jeffas 68f179021d Add move-tab command 2020-03-03 20:08:29 +01:00
Reto Brunner 5b3acb8034 msgview/save: Adapt to already decoded reader
The functionality was broken since the decoding changes.
This commit also simplifies the code (in my view) to make the application logic
easier to follow.
The docs are updated accordingly (the feature was poorly documented).

As far as I am aware there should be no breaking changes (and is certainly
still in the spec of the prior documentation)
2020-01-20 09:21:28 -05:00
Ben Burwell 240f57848f Add docs for reply -T 2020-01-11 09:45:21 -05:00
Reto Brunner ce42429cbf read: adapt to ProvidesMessages 2019-12-22 16:21:38 -05:00
Reto Brunner 709d4e1e59 docs: mark command 2019-12-21 09:27:54 -05:00
Jeffas 36af93b8f4 Add documentation for sort
This adds documentation for the config option and the command.
2019-09-20 14:56:02 -04:00
Reto Brunner a93b4de6f3 Add modify-labels command
This adds the event type as well as the command implementation, but no backend
supports it yet.
2019-09-12 16:17:24 -04:00
Reto Brunner 94b9d557de extract search criteria parsing into the backends 2019-08-29 08:44:10 +09:00
Christopher Vittal ecd803aae4 Add :prompt command
Usage:
    :prompt <prompt> <command...>

Displays the prompt on the status bar, waits for user input, then
appends that input as the last argument to the command and executes it.
The input is passed as one argument to the command, unless it is empty,
in which case no extra argument is added.
2019-08-26 09:48:39 +09:00
Jelle Besseling 1f5293931a Add forwarding as attachment feature
This allows a single message to be forward as attachment with the
:forward -a command
2019-08-20 10:05:51 +09:00
Jelle Besseling 36c6030e81 Add addresses argument to forward command 2019-08-20 10:04:29 +09:00
Drew DeVault 4fc6fee734 Revert "add close command at global level"
This reverts commit f0a0c5aa73.
2019-08-13 10:55:50 +09:00
Aditya Srivastava f0a0c5aa73 add close command at global level 2019-08-13 10:49:34 +09:00
Daniel Bridges 72204d1f24 Add optional body argument to compose command 2019-08-13 10:49:34 +09:00
Daniel Bridges 5b523880b4 Let user edit arbitrary headers in composer 2019-08-12 08:57:04 +09:00
Daniel Bridges 0a52124102 Allow cc/bcc command to receive no arguments 2019-08-07 14:07:48 +09:00
Daniel Bridges f4b7741463 Add cc and bcc commands 2019-08-03 10:43:55 -04:00