* [PATCH] pager: default to LESS=FRX not LESS=FRSX
@ 2007-03-26 7:35 Eygene Ryabinkin
2007-03-26 8:28 ` Junio C Hamano
0 siblings, 1 reply; 11+ messages in thread
From: Eygene Ryabinkin @ 2007-03-26 7:35 UTC (permalink / raw)
To: git
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>
---
| 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
2007-03-26 7:35 [PATCH] pager: default to LESS=FRX not LESS=FRSX Eygene Ryabinkin
@ 2007-03-26 8:28 ` Junio C Hamano
2007-03-26 8:36 ` Shawn O. Pearce
0 siblings, 1 reply; 11+ messages in thread
From: Junio C Hamano @ 2007-03-26 8:28 UTC (permalink / raw)
To: Eygene Ryabinkin; +Cc: git
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
2007-03-26 8:28 ` Junio C Hamano
@ 2007-03-26 8:36 ` Shawn O. Pearce
2007-03-26 8:44 ` Junio C Hamano
0 siblings, 1 reply; 11+ messages in thread
From: Shawn O. Pearce @ 2007-03-26 8:36 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Eygene Ryabinkin, git
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
2007-03-26 8:36 ` Shawn O. Pearce
@ 2007-03-26 8:44 ` Junio C Hamano
2007-03-26 10:08 ` Eygene Ryabinkin
2007-03-26 19:14 ` Bill Lear
0 siblings, 2 replies; 11+ messages in thread
From: Junio C Hamano @ 2007-03-26 8:44 UTC (permalink / raw)
To: Eygene Ryabinkin; +Cc: Shawn O. Pearce, git
"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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
2007-03-26 8:44 ` Junio C Hamano
@ 2007-03-26 10:08 ` Eygene Ryabinkin
2007-03-26 18:45 ` Junio C Hamano
2007-03-26 19:03 ` Jeff King
2007-03-26 19:14 ` Bill Lear
1 sibling, 2 replies; 11+ messages in thread
From: Eygene Ryabinkin @ 2007-03-26 10:08 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Shawn O. Pearce, git
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
2007-03-26 10:08 ` Eygene Ryabinkin
@ 2007-03-26 18:45 ` Junio C Hamano
2007-03-26 19:03 ` Jeff King
1 sibling, 0 replies; 11+ messages in thread
From: Junio C Hamano @ 2007-03-26 18:45 UTC (permalink / raw)
To: Eygene Ryabinkin; +Cc: Shawn O. Pearce, git
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
2007-03-26 10:08 ` Eygene Ryabinkin
2007-03-26 18:45 ` Junio C Hamano
@ 2007-03-26 19:03 ` Jeff King
2007-03-27 6:47 ` Eygene Ryabinkin
1 sibling, 1 reply; 11+ messages in thread
From: Jeff King @ 2007-03-26 19:03 UTC (permalink / raw)
To: Eygene Ryabinkin; +Cc: git
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
2007-03-26 8:44 ` Junio C Hamano
2007-03-26 10:08 ` Eygene Ryabinkin
@ 2007-03-26 19:14 ` Bill Lear
2007-03-26 20:27 ` Junio C Hamano
2007-03-27 6:54 ` Eygene Ryabinkin
1 sibling, 2 replies; 11+ messages in thread
From: Bill Lear @ 2007-03-26 19:14 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Eygene Ryabinkin, Shawn O. Pearce, git
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
2007-03-26 19:14 ` Bill Lear
@ 2007-03-26 20:27 ` Junio C Hamano
2007-03-27 6:54 ` Eygene Ryabinkin
1 sibling, 0 replies; 11+ messages in thread
From: Junio C Hamano @ 2007-03-26 20:27 UTC (permalink / raw)
To: Bill Lear; +Cc: Eygene Ryabinkin, Shawn O. Pearce, git
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 ;-).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
2007-03-26 19:03 ` Jeff King
@ 2007-03-27 6:47 ` Eygene Ryabinkin
0 siblings, 0 replies; 11+ messages in thread
From: Eygene Ryabinkin @ 2007-03-27 6:47 UTC (permalink / raw)
To: Jeff King; +Cc: git
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] pager: default to LESS=FRX not LESS=FRSX
2007-03-26 19:14 ` Bill Lear
2007-03-26 20:27 ` Junio C Hamano
@ 2007-03-27 6:54 ` Eygene Ryabinkin
1 sibling, 0 replies; 11+ messages in thread
From: Eygene Ryabinkin @ 2007-03-27 6:54 UTC (permalink / raw)
To: Bill Lear; +Cc: Junio C Hamano, Shawn O. Pearce, git
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
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-03-27 6:54 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-26 7:35 [PATCH] pager: default to LESS=FRX not LESS=FRSX Eygene Ryabinkin
2007-03-26 8:28 ` Junio C Hamano
2007-03-26 8:36 ` Shawn O. Pearce
2007-03-26 8:44 ` Junio C Hamano
2007-03-26 10:08 ` Eygene Ryabinkin
2007-03-26 18:45 ` Junio C Hamano
2007-03-26 19:03 ` Jeff King
2007-03-27 6:47 ` Eygene Ryabinkin
2007-03-26 19:14 ` Bill Lear
2007-03-26 20:27 ` Junio C Hamano
2007-03-27 6:54 ` Eygene Ryabinkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).