~rjarry/aerc-devel

aerc: composer: add focus-body option v4 APPLIED

Markus Unkel: 1
 composer: add focus-body option

 4 files changed, 13 insertions(+), 1 deletions(-)
#1366308 alpine-edge.yml success
#1366309 openbsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~rjarry/aerc-devel/patches/55895/mbox | git am -3
Learn more about email & git

[PATCH aerc v4] composer: add focus-body option Export this patch

When the composer window opens, an user might want to start writing
the email body before adding a subject and recipients. Setting the
focus-body option to true achieves that by setting the focus to the
editor.

Signed-off-by: Markus Unkel <markus@unkel.io>
---
This simplifies v3 by removing the focusBody field from composer.
 app/compose.go        | 2 +-
 config/aerc.conf      | 6 ++++++
 config/compose.go     | 1 +
 doc/aerc-config.5.scd | 5 +++++
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/app/compose.go b/app/compose.go
index 7a581505..2cd7fd61 100644
--- a/app/compose.go
+++ b/app/compose.go
@@ -1276,7 +1276,7 @@ func (c *Composer) showTerminal() error {
	c.focusable = append(c.focusable, c.editor)
	c.review = nil
	c.updateGrid()
	if c.editHeaders {
	if c.editHeaders || config.Compose.FocusBody {
		c.focusTerminalPriv()
	}
	return nil
diff --git a/config/aerc.conf b/config/aerc.conf
index 4a83625a..9070bcf3 100644
--- a/config/aerc.conf
+++ b/config/aerc.conf
@@ -654,6 +654,12 @@
# Default: false
#edit-headers=false

#
# Sets focus to the email body when the composer window opens.
#
# Default: false
#focus-body=false

#
# Specifies the command to be used to tab-complete email addresses. Any
# occurrence of "%s" in the address-book-cmd will be replaced with what the
diff --git a/config/compose.go b/config/compose.go
index d6f25d31..db963f56 100644
--- a/config/compose.go
+++ b/config/compose.go
@@ -17,6 +17,7 @@ type ComposeConfig struct {
	FilePickerCmd       string         `ini:"file-picker-cmd"`
	FormatFlowed        bool           `ini:"format-flowed"`
	EditHeaders         bool           `ini:"edit-headers"`
	FocusBody           bool           `ini:"focus-body"`
	LFEditor            bool           `ini:"lf-editor"`
}

diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd
index 80922fa1..56c4e209 100644
--- a/doc/aerc-config.5.scd
+++ b/doc/aerc-config.5.scd
@@ -883,6 +883,11 @@ These options are configured in the *[compose]* section of _aerc.conf_.

	Default: _false_

*focus-body* = _true_|_false_
	Sets focus to the email body when the composer window opens.

	Default: _false_

*address-book-cmd* = _<command>_
	Specifies the command to be used to tab-complete email addresses. Any
	occurrence of _%s_ in the *address-book-cmd* will be replaced with anything
-- 
2.47.0
aerc/patches: SUCCESS in 2m6s

[composer: add focus-body option][0] v4 from [Markus Unkel][1]

[0]: https://lists.sr.ht/~rjarry/aerc-devel/patches/55895
[1]: mailto:markus@unkel.io

✓ #1366308 SUCCESS aerc/patches/alpine-edge.yml https://builds.sr.ht/~rjarry/job/1366308
✓ #1366309 SUCCESS aerc/patches/openbsd.yml     https://builds.sr.ht/~rjarry/job/1366309
Markus Unkel <markus@unkel.io> wrote: