~rjarry/aerc-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

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

Details
Message ID
<20241110130906.137736-1-markus@unkel.io>
DKIM signature
pass
Download raw message
Patch: +13 -1
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] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<D5IIVSDX1AJV.2CCK6494CAFO2@fra01>
In-Reply-To
<20241110130906.137736-1-markus@unkel.io> (view parent)
DKIM signature
missing
Download raw message
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]: 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

Applied: [PATCH aerc v4] composer: add focus-body option

Details
Message ID
<173125819944.648178.15697949488644414502@ringo>
In-Reply-To
<20241110130906.137736-1-markus@unkel.io> (view parent)
DKIM signature
pass
Download raw message
Markus Unkel <markus@unkel.io> wrote:
> 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.

Acked-by: Robin Jarry <robin@jarry.cc>

Applied. Thanks for your patience, Markus!

To git@git.sr.ht:~rjarry/aerc
   7f28ba10d5e9..1a3b2b24eb51  master -> master
Reply to thread Export thread (mbox)