~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
10 5

[PATCH aerc] pager: show basic stats by default

Details
Message ID
<20220616220943.63280-1-mail@jaskaran.org>
DKIM signature
missing
Download raw message
Patch: +1 -1
From: Jaskaran Veer Singh <mail@jaskaran.org>

In pager, show current displayed line numbers, and the length of message
(in percentage) currently visible to the user. Should help in reading
long messages.

Signed-off-by: Jaskaran Veer Singh <mail@jaskaran.org>
---
 config/aerc.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/aerc.conf b/config/aerc.conf
index 8043412..920fcb4 100644
--- a/config/aerc.conf
+++ b/config/aerc.conf
@@ -179,7 +179,7 @@ render-format=[%a] %S %>%T
# pager which supports ANSI codes.
#
# Default: less -R
pager=less -R
pager=less -R -M +Gg

#
# If an email offers several versions (multipart), you can configure which
--
2.30.1 (Apple Git-130)
Details
Message ID
<CKRWKXVSH3XY.1F6S1UBI4BPOI@arch>
In-Reply-To
<20220616220943.63280-1-mail@jaskaran.org> (view parent)
DKIM signature
missing
Download raw message
> In pager, show current displayed line numbers, and the length of message
> (in percentage) currently visible to the user. Should help in reading
> long messages.

Sounds like a great idea. Applying this to my local config.

Ivan

[aerc/patches] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CKRWMMDRHRXN.3TXG60QJGQSZL@cirno>
In-Reply-To
<20220616220943.63280-1-mail@jaskaran.org> (view parent)
DKIM signature
missing
Download raw message
aerc/patches: SUCCESS in 6m28s

[pager: show basic stats by default][0] from [][1]

[0]: https://lists.sr.ht/~rjarry/aerc-devel/patches/33063
[1]: mail@jaskaran.org

✓ #782015 SUCCESS aerc/patches/debian-stable.yml https://builds.sr.ht/~rjarry/job/782015
✓ #782017 SUCCESS aerc/patches/openbsd.yml       https://builds.sr.ht/~rjarry/job/782017
✓ #782014 SUCCESS aerc/patches/alpine-edge.yml   https://builds.sr.ht/~rjarry/job/782014
✓ #782016 SUCCESS aerc/patches/fedora-latest.yml https://builds.sr.ht/~rjarry/job/782016
Details
Message ID
<CKV8965D8N2H.2UZP4O4NSJLMT@marty>
In-Reply-To
<20220616220943.63280-1-mail@jaskaran.org> (view parent)
DKIM signature
missing
Download raw message
Hi there,

, Jun 17, 2022 at 00:09:
> From: Jaskaran Veer Singh <mail@jaskaran.org>
>
> In pager, show current displayed line numbers, and the length of message
> (in percentage) currently visible to the user. Should help in reading
> long messages.
>
> Signed-off-by: Jaskaran Veer Singh <mail@jaskaran.org>
> ---
>  config/aerc.conf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/config/aerc.conf b/config/aerc.conf
> index 8043412..920fcb4 100644
> --- a/config/aerc.conf
> +++ b/config/aerc.conf
> @@ -179,7 +179,7 @@ render-format=[%a] %S %>%T
>  # pager which supports ANSI codes.
>  #
>  # Default: less -R
> -pager=less -R
> +pager=less -R -M +Gg

I feel like +Gg is not related to the topic of the patch. Was that
intended?
Jaskaran Veer Singh <mail@jaskaran.org>
Details
Message ID
<CKW60IIB1ES0.WLYX6PZ0GN1L@eniac.local>
In-Reply-To
<CKV8965D8N2H.2UZP4O4NSJLMT@marty> (view parent)
DKIM signature
missing
Download raw message
On Mon Jun 20, 2022 at 4:01 PM EDT, Robin Jarry wrote:
> Hi there,
>
> , Jun 17, 2022 at 00:09:
> > From: Jaskaran Veer Singh <mail@jaskaran.org>
> >
> > In pager, show current displayed line numbers, and the length of message
> > (in percentage) currently visible to the user. Should help in reading
> > long messages.
> >
> > Signed-off-by: Jaskaran Veer Singh <mail@jaskaran.org>
> > ---
> >  config/aerc.conf | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/config/aerc.conf b/config/aerc.conf
> > index 8043412..920fcb4 100644
> > --- a/config/aerc.conf
> > +++ b/config/aerc.conf
> > @@ -179,7 +179,7 @@ render-format=[%a] %S %>%T
> >  # pager which supports ANSI codes.
> >  #
> >  # Default: less -R
> > -pager=less -R
> > +pager=less -R -M +Gg
>
> I feel like +Gg is not related to the topic of the patch. Was that
> intended?

Without +Gg, `less` won't show the length in percentage of document being
displayed.

--
Jaskaran
Details
Message ID
<CKW68XBAEIQJ.2WAQEEDQ8H9MT@Archetype>
In-Reply-To
<CKW60IIB1ES0.WLYX6PZ0GN1L@eniac.local> (view parent)
DKIM signature
missing
Download raw message
On Wed Jun 22, 2022 at 12:28 AM CEST, Jaskaran Veer Singh wrote:
> Without +Gg, `less` won't show the length in percentage of document being
> displayed.

Can confirm that aerc requires +Gg.
Details
Message ID
<CKW6A3E2HHAU.3OLFRLQ7THNXW@Archetype>
In-Reply-To
<20220616220943.63280-1-mail@jaskaran.org> (view parent)
DKIM signature
missing
Download raw message
On Fri Jun 17, 2022 at 12:09 AM CEST,  wrote:
> From: Jaskaran Veer Singh <mail@jaskaran.org>
>
> In pager, show current displayed line numbers, and the length of message
> (in percentage) currently visible to the user. Should help in reading
> long messages.
>
> Signed-off-by: Jaskaran Veer Singh <mail@jaskaran.org>
> ---
>  config/aerc.conf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/config/aerc.conf b/config/aerc.conf
> index 8043412..920fcb4 100644
> --- a/config/aerc.conf
> +++ b/config/aerc.conf
> @@ -179,7 +179,7 @@ render-format=[%a] %S %>%T
>  # pager which supports ANSI codes.
>  #
>  # Default: less -R

The default should be changed accordingly as well.

> -pager=less -R
> +pager=less -R -M +Gg
>
>  #
>  # If an email offers several versions (multipart), you can configure which
> --
> 2.30.1 (Apple Git-130)
Details
Message ID
<D73A3FDD-F97B-4FB6-86D9-968E406B468B@jarry.cc>
In-Reply-To
<CKW60IIB1ES0.WLYX6PZ0GN1L@eniac.local> (view parent)
DKIM signature
missing
Download raw message
On June 22, 2022 12:28:20 AM GMT+02:00, Jaskaran Veer Singh <mail@jaskaran.org> wrote:
> > >  # Default: less -R
> > > -pager=less -R
> > > +pager=less -R -M +Gg
> Without +Gg, `less` won't show the length in percentage of document being
> displayed.

Hmm, the man page says these options are related to search highlighting. With + you are disabling them but since they are already disabled by default, I don't know what this does.

By the way, I tried adding only -M and I get both line numbers and percentage displayed in the footer.

Do you have something defined in the LESS env var?
Details
Message ID
<CKWHTD738R3X.LRQ3KZHUDEAA@marty>
In-Reply-To
<D73A3FDD-F97B-4FB6-86D9-968E406B468B@jarry.cc> (view parent)
DKIM signature
missing
Download raw message
Robin Jarry, Jun 22, 2022 at 08:51:
> By the way, I tried adding only -M and I get both line numbers and
> percentage displayed in the footer.

Ok my bad, this only works when reading from a file, not from stdin.
Details
Message ID
<4e308a65-aa39-4b1e-9219-009e455261d9@poldrack.dev>
In-Reply-To
<CKWHTD738R3X.LRQ3KZHUDEAA@marty> (view parent)
DKIM signature
missing
Download raw message
> Robin Jarry, Jun 22, 2022 at 08:51:
>> By the way, I tried adding only -M and I get both line numbers and
>> percentage displayed in the footer.
>
> Ok my bad, this only works when reading from a file, not from stdin.

Told you, didn't I? ^^

-- 
Kind regards,
Mit freundlichen Grüßen,

Moritz Poldrack

https://moritz.sh
Details
Message ID
<CKWJS7S3YHMV.2KOINJXRH9OV1@marty>
In-Reply-To
<4e308a65-aa39-4b1e-9219-009e455261d9@poldrack.dev> (view parent)
DKIM signature
missing
Download raw message
Moritz Poldrack, Jun 22, 2022 at 11:12:
> > Robin Jarry, Jun 22, 2022 at 08:51:
> >> By the way, I tried adding only -M and I get both line numbers and
> >> percentage displayed in the footer.
> >
> > Ok my bad, this only works when reading from a file, not from stdin.
>
> Told you, didn't I? ^^

Right.

So I have come to the bottom of this. +Gg is not an option, it is
a command. It means, run "G" and then "g" when opening up the pager,
which basically means, "scroll all the way down" and then "all the way
up". This makes the screen blink every time an email is opened. Also, it
makes the overall experience more sluggish in my opinion.

I feel like this should not be the default. People can tune their own
configuration however they like it.
Reply to thread Export thread (mbox)