Re: [PATCH v2 1/2] add-patch: introduce 'p' in interactive-patch
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Mar 27, 2024, 10:55 UTC
- Message-ID
- <65f41d5a-b645-4123-a214-0e785c64cdb4@gmail.com>
- In-Reply-To
- <e54ebc35-6946-4e63-a54f-fd73df0e89bc@gmail.com>
Hi Rubén
On 26/03/2024 18:40, Rubén Justo wrote:
Show 11 quoted lines
> On Tue, Mar 26, 2024 at 02:38:02PM +0000, Phillip Wood wrote: > >>> Let's introduce a new option to allow the user to explicitly request >>> the printing. >> >> I wonder if we want to hide this option unless we've skipped rendering the >> hunk in the same way that we hide other options that are not relevant to the >> hunk being displayed. > > You've got me scratching my head. Do you see any cases where we > shouldn't offer the new option?
If we've printed the hunk followed by the prompt then there is no point in offering 'p' because it does not do anything useful for the user. It is only useful offer to show the hunk again when we've printed an error message that separates the prompt from the hunk. I don't think we should make 'p' an error, but it seems like clutter to put it in the prompt when it does not offer anything useful to the user.
Show 5 quoted lines
>> I also wonder if 'r' for "re-display" would better >> convey the intent of this keybinding. > > I'm more inclined towards the 'p' because the verb is 'print'. Does > this reasoning make sense to you?
I'm not sure I follow as "re-display" or for that matter "reprint" are also verbs. The reason I suggested "re-display" is that it I think the name is a more accurate description because we're printing the same hunk again.
Show 16 quoted lines
>>
>>> diff --git a/add-patch.c b/add-patch.c
>>> index 68f525b35c..444fd75b2a 100644
>>> --- a/add-patch.c
>>> +++ b/add-patch.c
>>> @@ -1388,6 +1388,7 @@ N_("j - leave this hunk undecided, see next undecided hunk\n"
>>> "/ - search for a hunk matching the given regex\n"
>>> "s - split the current hunk into smaller hunks\n"
>>> "e - manually edit the current hunk\n"
>>> + "p - print again the current hunk\n"
>>
>> I think "print the hunk again" is clearer
>
> The word 'current' is in my proposal because IMHO it adds value making
> explicit what we're offering. Maybe "print the current hunk again"?
> What do you think?I've no objecting to "current"
Best Wishes
Phillip