Most of the time, accepting an invitation does not require editing the
automatically generated email before sending it. Allow the user to
optionally skip the editor entirely and go directly to the review screen
when dealing with invitations.
Signed-off-by: inwit <inwit@sindominio.net>
References: https://todo.sr.ht/~rjarry/aerc/247#event-380840
---
v3: rebase on master.
v2: correct some typos, remove RFC.
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Applied on rockorager-next, thanks
Note: rockorager-next is a staging branch to help out Robin with applying
patches. These will be pulled into master at his availability. Also my script
for autosending this email didn't work first goaround so the formatting is a bit
different than Robin's typical responses. This will be addressed in future
applications :)
commands/msg/invite.go | 9 +++++++--doc/aerc.1.scd | 8 +++++++-
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/commands/msg/invite.go b/commands/msg/invite.go
index c62397c5..a51dce8a 100644
--- a/commands/msg/invite.go+++ b/commands/msg/invite.go
@@ -17,8 +17,9 @@ import (
)
type invite struct {
- Edit bool `opt:"-e"`- NoEdit bool `opt:"-E"`+ Edit bool `opt:"-e"`+ NoEdit bool `opt:"-E"`+ SkipEditor bool `opt:"-s"`}
func init() {
@@ -145,6 +146,10 @@ func (i invite) Execute(args []string) error {
}
})
+ if i.SkipEditor {+ composer.Terminal().Close()+ }+ return nil
}
diff --git a/doc/aerc.1.scd b/doc/aerc.1.scd
index 9d1d3302..9e1830a4 100644
--- a/doc/aerc.1.scd+++ b/doc/aerc.1.scd
@@ -314,7 +314,7 @@ message list, the message in the message viewer, etc).
The *-m* option sets the multi-file strategy. See *aerc-notmuch*(5) for more
details.
-*:accept* [*-e*|*-E*]+*:accept* [*-e*|*-E*|*-s*] Accepts an iCalendar meeting invitation. This opens a compose window
with a specially crafted attachment. Sending the email will let the
inviter know that you accepted and will likely update their calendar as
@@ -326,6 +326,8 @@ message list, the message in the message viewer, etc).
*-E*: Forces *[compose].edit-headers* = _false_ for this message only.
+ *-s*: Skips the editor and goes directly to the review screen.+*:accept-tentative* [*-e*|*-E*]
Accepts an iCalendar meeting invitation tentatively.
@@ -333,6 +335,8 @@ message list, the message in the message viewer, etc).
*-E*: Forces *[compose].edit-headers* = _false_ for this message only.
+ *-s*: Skips the editor and goes directly to the review screen.+*:copy* [*-dp*] [*-a* _<account>_] [*-m* _<strategy>_] _<folder>_++
*:cp* [*-dp*] [*-a* _<account>_] [*-m* _<strategy>_] _<folder>_
Copies the selected message(s) to _<folder>_.
@@ -353,6 +357,8 @@ message list, the message in the message viewer, etc).
*-E*: Forces *[compose].edit-headers* = _false_ for this message only.
+ *-s*: Skips the editor and goes directly to the review screen.+*:delete* [*-m* _<strategy>_]++
*:delete-message* [*-m* _<strategy>_]
Deletes the selected message.
--
2.43.0