# [PATCH] pager: default to LESS=FRX not LESS=FRSX

11 messages from 2007-03-26 to 2007-03-27. Participants: Eygene Ryabinkin, Junio C Hamano, Shawn O. Pearce, Jeff King, Bill Lear.
Thread: https://gitlist.dev/t/7402

## Eygene Ryabinkin, 2007-03-26 07:35

Subject: [PATCH] pager: default to LESS=FRX not LESS=FRSX
Message-ID: <20070326073502.GD44578@codelabs.ru>
URL: https://gitlist.dev/e/20070326073502.GD44578%40codelabs.ru

```
Remove unnecessary '-S' option that enabled less to chop long lines.
It used to provide some confusion at least for the 'git diff':
"Where are my long lines? Are they missed from the patch?".

Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
---
 pager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pager.c b/pager.c
index 5f280ab..2dca00e 100644
--- a/pager.c
+++ b/pager.c
@@ -62,7 +62,7 @@ void setup_pager(void)
 	close(fd[0]);
 	close(fd[1]);
 
-	setenv("LESS", "FRSX", 0);
+	setenv("LESS", "FRX", 0);
 	run_pager(pager);
 	die("unable to execute pager '%s'", pager);
 	exit(255);
-- 
1.5.0.3-dirty

```

## Junio C Hamano, 2007-03-26 08:28

Subject: Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
Message-ID: <7vwt14xvaw.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vwt14xvaw.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20070326073502.GD44578@codelabs.ru>

```
Eygene Ryabinkin <rea-git@codelabs.ru> writes:

> Remove unnecessary '-S' option that enabled less to chop long lines.
> It used to provide some confusion at least for the 'git diff':
> "Where are my long lines? Are they missed from the patch?".

It is not "unnecessary", but only "what _you_ are not used to".
As this breaks expectentions of people already familiar with
what git does by default, I cannot take this patch.

```

## Shawn O. Pearce, 2007-03-26 08:36

Subject: Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
Message-ID: <20070326083617.GG13247@spearce.org>
URL: https://gitlist.dev/e/20070326083617.GG13247%40spearce.org
In-Reply-To: <7vwt14xvaw.fsf@assigned-by-dhcp.cox.net>

```
Junio C Hamano <junkio@cox.net> wrote:
> Eygene Ryabinkin <rea-git@codelabs.ru> writes:
> 
> > Remove unnecessary '-S' option that enabled less to chop long lines.
> > It used to provide some confusion at least for the 'git diff':
> > "Where are my long lines? Are they missed from the patch?".
> 
> It is not "unnecessary", but only "what _you_ are not used to".
> As this breaks expectentions of people already familiar with
> what git does by default, I cannot take this patch.

Hear hear.  I completely agree with Junio.  I (and a number of
other users that I work with) expect this behevaior by default.

-- 
Shawn.

```

## Junio C Hamano, 2007-03-26 08:44

Subject: Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
Message-ID: <7v8xdkxukt.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v8xdkxukt.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20070326083617.GG13247@spearce.org>

```
"Shawn O. Pearce" <spearce@spearce.org> writes:

> Junio C Hamano <junkio@cox.net> wrote:
>> Eygene Ryabinkin <rea-git@codelabs.ru> writes:
>> 
>> > Remove unnecessary '-S' option that enabled less to chop long lines.
>> > It used to provide some confusion at least for the 'git diff':
>> > "Where are my long lines? Are they missed from the patch?".
>> 
>> It is not "unnecessary", but only "what _you_ are not used to".
>> As this breaks expectentions of people already familiar with
>> what git does by default, I cannot take this patch.
>
> Hear hear.  I completely agree with Junio.  I (and a number of
> other users that I work with) expect this behevaior by default.

Two tips.

 (1) Learn to use left/right arrow keys under "less -S" if you
     have occasional lines that are too long.

 (2) Do not have too many too long lines to begin with.  If you
     cannot comfortably read your code with "less -S", your
     nesting is too deep to be understood with or without line
     folding.

```

## Eygene Ryabinkin, 2007-03-26 10:08

Subject: Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
Message-ID: <20070326100857.GW14837@codelabs.ru>
URL: https://gitlist.dev/e/20070326100857.GW14837%40codelabs.ru
In-Reply-To: <7v8xdkxukt.fsf@assigned-by-dhcp.cox.net>

```
Junio,

Mon, Mar 26, 2007 at 01:44:34AM -0700, Junio C Hamano wrote:
> > Junio C Hamano <junkio@cox.net> wrote:
> >> Eygene Ryabinkin <rea-git@codelabs.ru> writes:
> >> 
> >> > Remove unnecessary '-S' option that enabled less to chop long lines.
> >> > It used to provide some confusion at least for the 'git diff':
> >> > "Where are my long lines? Are they missed from the patch?".
> >> 
> >> It is not "unnecessary", but only "what _you_ are not used to".
> >> As this breaks expectentions of people already familiar with
> >> what git does by default, I cannot take this patch.

OK, no problem.

> > Hear hear.  I completely agree with Junio.  I (and a number of
> > other users that I work with) expect this behevaior by default.
> 
> Two tips.
> 
>  (1) Learn to use left/right arrow keys under "less -S" if you
>      have occasional lines that are too long.

I do not like the left/right keys: it is wery hard to get the
right typing speed if we're using the arrow keys. But it is just
my habit since I learned to 10 fingers typing.

>  (2) Do not have too many too long lines to begin with.  If you
>      cannot comfortably read your code with "less -S", your
>      nesting is too deep to be understood with or without line
>      folding.

Yes, yes, "if you need more than 4 levels of identation then your
code is probably in a bad shape". I know it. But the problem was that
I noticed this behaviour when I was patching the Git sources and there
were some removed lines that were long enough not to fit to the screen
with the addition of the '- ' diff tags.
-- 
Eygene

```

## Junio C Hamano, 2007-03-26 18:45

Subject: Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
Message-ID: <7vlkhjx2rd.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vlkhjx2rd.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20070326100857.GW14837@codelabs.ru>

```
Eygene Ryabinkin <rea-git@codelabs.ru> writes:

>> Two tips.
>> 
>>  (1) Learn to use left/right arrow keys under "less -S" if you
>>      have occasional lines that are too long.
>
> I do not like the left/right keys: it is wery hard to get the
> right typing speed ...

Heh, who types 120-word a minute while perusing the source with
"less"?

I do not like to move my hand from the home position on the
keyboard either, so I never touch arrow keys while I am typing
to produce, but I never thought of bothering to reconfigure less
keybindings for the reason you stated, as I do not have infinite
amount of time.

```

## Jeff King, 2007-03-26 19:03

Subject: Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
Message-ID: <20070326190304.GB31844@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20070326190304.GB31844%40coredump.intra.peff.net
In-Reply-To: <20070326100857.GW14837@codelabs.ru>

```
On Mon, Mar 26, 2007 at 02:08:57PM +0400, Eygene Ryabinkin wrote:

> I do not like the left/right keys: it is wery hard to get the
> right typing speed if we're using the arrow keys. But it is just
> my habit since I learned to 10 fingers typing.

You might try:

cat >>$HOME/.lesskey <<'EOF'
h left-scroll
l right-scroll
EOF
lesskey

-Peff

```

## Bill Lear, 2007-03-26 19:14

Subject: Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
Message-ID: <17928.7076.871485.136142@lisa.zopyra.com>
URL: https://gitlist.dev/e/17928.7076.871485.136142%40lisa.zopyra.com
In-Reply-To: <7v8xdkxukt.fsf@assigned-by-dhcp.cox.net>

```
On Monday, March 26, 2007 at 01:44:34 (-0700) Junio C Hamano writes:
>"Shawn O. Pearce" <spearce@spearce.org> writes:
>
>> Junio C Hamano <junkio@cox.net> wrote:
>>> Eygene Ryabinkin <rea-git@codelabs.ru> writes:
>>> 
>>> > Remove unnecessary '-S' option that enabled less to chop long lines.
>>> > It used to provide some confusion at least for the 'git diff':
>>> > "Where are my long lines? Are they missed from the patch?".
>>> 
>>> It is not "unnecessary", but only "what _you_ are not used to".
>>> As this breaks expectentions of people already familiar with
>>> what git does by default, I cannot take this patch.
>>
>> Hear hear.  I completely agree with Junio.  I (and a number of
>> other users that I work with) expect this behevaior by default.
>
>Two tips.
>
> (1) Learn to use left/right arrow keys under "less -S" if you
>     have occasional lines that are too long.

Hmm, looking at the code: why, if the environment variable LESS is
already set, should this all be worth talking about?  Shouldn't the
user be able to set LESS to whatever they want, once, and be done with
it?  The current setenv() call to set up the pager does this, correct?


Bill

```

## Junio C Hamano, 2007-03-26 20:27

Subject: Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
Message-ID: <7vd52vwy1o.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vd52vwy1o.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <17928.7076.871485.136142@lisa.zopyra.com>

```
Bill Lear <rael@zopyra.com> writes:

> On Monday, March 26, 2007 at 01:44:34 (-0700) Junio C Hamano writes:
>>"Shawn O. Pearce" <spearce@spearce.org> writes:
>>
>>> Junio C Hamano <junkio@cox.net> wrote:
>>>> Eygene Ryabinkin <rea-git@codelabs.ru> writes:
>>>> 
>>>> > Remove unnecessary '-S' option that enabled less to chop long lines.
>>>> > It used to provide some confusion at least for the 'git diff':
>>>> > "Where are my long lines? Are they missed from the patch?".
>>>> 
>>>> It is not "unnecessary", but only "what _you_ are not used to".
>>>> As this breaks expectentions of people already familiar with
>>>> what git does by default, I cannot take this patch.
>>>
>>> Hear hear.  I completely agree with Junio.  I (and a number of
>>> other users that I work with) expect this behevaior by default.
>>
>>Two tips.
>>
>> (1) Learn to use left/right arrow keys under "less -S" if you
>>     have occasional lines that are too long.
>
> Hmm, looking at the code: why, if the environment variable LESS is
> already set, should this all be worth talking about?  Shouldn't the
> user be able to set LESS to whatever they want, once, and be done with
> it?  The current setenv() call to set up the pager does this, correct?

Yes.  That would make the third tip ;-).

```

## Eygene Ryabinkin, 2007-03-27 06:47

Subject: Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
Message-ID: <20070327064759.GA51155@codelabs.ru>
URL: https://gitlist.dev/e/20070327064759.GA51155%40codelabs.ru
In-Reply-To: <20070326190304.GB31844@coredump.intra.peff.net>

```
Jeff, good day.

Mon, Mar 26, 2007 at 03:03:04PM -0400, Jeff King wrote:
> On Mon, Mar 26, 2007 at 02:08:57PM +0400, Eygene Ryabinkin wrote:
> 
> > I do not like the left/right keys: it is wery hard to get the
> > right typing speed if we're using the arrow keys. But it is just
> > my habit since I learned to 10 fingers typing.
> 
> You might try:
> 
> cat >>$HOME/.lesskey <<'EOF'
> h left-scroll
> l right-scroll
> EOF
> lesskey

Very good, thanks!
-- 
Eygene

```

## Eygene Ryabinkin, 2007-03-27 06:54

Subject: Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
Message-ID: <20070327065419.GB51155@codelabs.ru>
URL: https://gitlist.dev/e/20070327065419.GB51155%40codelabs.ru
In-Reply-To: <17928.7076.871485.136142@lisa.zopyra.com>

```
Bill, good day.

Mon, Mar 26, 2007 at 01:14:44PM -0600, Bill Lear wrote:
> > (1) Learn to use left/right arrow keys under "less -S" if you
> >     have occasional lines that are too long.
> 
> Hmm, looking at the code: why, if the environment variable LESS is
> already set, should this all be worth talking about?  Shouldn't the
> user be able to set LESS to whatever they want, once, and be done with
> it?  The current setenv() call to set up the pager does this, correct?

If it was named GIT_LESS, then yes, I could set it to the defaults
that are sane for me with Git. But I do not like the idea of setting
-F, -R and -X for all less invocations. But OK, the 'l' and 'h'
bindings for less movements are fine with me. I do not like scrolling
very much (using 14400 modem lines sometimes, so it is a bit slow),
but if 'FRSX' are good defaults that people are used to, then I
should live with them. Or probably start the git-FRX toolchain ;))

OK, I feel that this thread is exhausted itself, so I am shutting up.
-- 
Eygene

```
