[PATCH 1 of 3 STABLE V2] pager: rename 'pager.enable' to 'ui.pager'

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue May 2 12:20:07 EDT 2017



On 05/02/2017 06:00 PM, Kevin Bullock wrote:
>> On May 2, 2017, at 09:02, Augie Fackler <raf at durin42.com> wrote:
>>
>>> On May 2, 2017, at 09:57, Yuya Nishihara <yuya at tcha.org> wrote:
>>>
>>> On Tue, 2 May 2017 13:03:46 +0200, Pierre-Yves David wrote:
>>>> On 05/02/2017 04:34 AM, Yuya Nishihara wrote:
>>>>> On Mon, 1 May 2017 21:22:02 -0400, Augie Fackler wrote:
>>>>>> Mentioned this on the other thread, but in brief here so it doesn't
>>>>>> get overlooked: I think ui.pager is confusing as a boolean when
>>>>>> ui.editor already exists and is a program to invoke. They sound
>>>>>> related to me.
>>>>>
>>>>> Agreed. pager.enable is a bit unfortunate, but 'ui.pager = <bool>' is more
>>>>> confusing.
>>>>
>>>> Given that gathering main interface knob in `[ui]`, maybe we can find
>>>> something else that fit both constraint (in [ui]; not confusing with
>>>> ui.editor).
>>>>
>>>> I can think about `ui.use-pager` and `ui.paginate`.
>>>>
>>>> What do you think ?
>>>
>>> +0. I'm not so enthusiastic about moving things into the [ui] section.
>>
>> I don't feel terribly strongly either way on moving things to [ui] - I see both sides of the argument. I think paginate is better than use-pager.
>>
>> [...]
>> Kevin, what do you think? I'd like to get this sorted today so we can release today.
>
> I'm inclined to leave the boolean option named pager.enable in light of
> all the other options. It's not ideal, but I think it strikes the best
> balance of consistency w/other options and discoverability, given that
> we've already rolled an RC with it.
>
> I'll outline various options to clarify them (to myself!):
>
> 0) pager.pager = <command>  # current situation
>    pager.enable = <bool>
>
> 1) ui.pager = <bool>        # consistent with ui.color
>    pager.pager = <command>
>
>    This is what's proposed in this series. As mentioned above I don't
>    think this is a great balance of consistency with all the other knobs
>    we've discussed.
>
> 2) ui.pager = <command>     # consistent with ui.editor
>    pager.enable = <bool>
>
>    If we have a ui.pager setting, it ought to match ui.editor more
>    closely than ui.color.  But this option splits pager config across
>    multiple sections with no apparent purpose.
>
> 3) ui.pager = <command>
>    ui.paginate = <bool>
>
>    This is a bit better, but still leaves the rest of the pager.*
>    options in a different section. ui.color is already in that
>    situation, though, so this is might be an interesting
>    alternative. This is (modulo 'use-') Pierre-Yves' most recent
>    proposal.

My last proposal is actually a bit different:

4) ui.paginate = <bool>
    pager.pager = <command>

My rational here is that `ui.paginate` is the option most user are 
likely to care about (given we have a good default pager), so we put is 
in '[ui]'. The rest of the option affecting the pager behavior stay in a 
dedicated config '[pager]' as they are likely to be touched by more 
advance user only.

This is similar to what we do for color.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list