From: Dragan Simic Date: Thu, 23 May 2024 23:43:57 GMT Subject: Re: [PATCH 5/5] add-patch: render hunks through the pager Message-ID: <3391a15907a055c281106c4995fb8272@manjaro.org> In-Reply-To: On 2024-05-24 01:28, Dragan Simic wrote: > On 2024-05-24 01:04, Junio C Hamano wrote: >> Dragan Simic writes: >> >>>> And for usability, perhaps giving a specific command would change >>>> the default program a bare 'P' invokes for the rest of the session >>>> until another specific command overrides. Another usability hack >>>> may be "[interactive] pipecommand = less -FX" configuration variable >>>> gives the initial default for each session. >>> >>> I think that would be way too complicated. >> >> It is modelled after how "less" and "vi" remembers the last pattern >> fed to their "/" command. You once give, say, "/test_" to >> find one instance of "test_", then "/" takes to the next >> instance. > > Huh, less(1) actually remembers nothing when the secure mode is > turned on. That's another thing I've collaborated with the author > of less(1), to make it possible to remember the last search term > when running less(1) in secure mode. > >> As I expect our target audiences are used to such a behaviour, I do >> not think I agree with your "way too complicated". > > Hmm. Where would that state be stored? Ah, sorry, I misread your description a bit. There's obviously no need to store any state, because this additional feature doesn't break the boundaries of a single session. However, I'd suggest that we leave this additional feature aside for now, until the upcoming pager-related changes and fixes settle down.