Subject: Re: bug#65380: [PATCH] Add command to copy contents in a diff-mode buffer

From: Eli Zaretskii <[email-masked]>
Date: Thu, 22 Aug 2024 06:25:55 +0300

> From: Philip Kaludercic <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 21 Aug 2024 19:40:01 +0000
> 
> Ugh, I forgot to amend by last patch, this is the current version:
> 
>   This command copies to the 'kill-ring' a region of text modified
>   according to diffs in the current buffer, but without applying the
>   diffs to the original text.  If the selected range extends a hunk, the
>   commands attempts to look up and copy the text in-between the
>   hunks.
> 
> I am thinking about splitting the first sentence up into
> 
>   This command copies text out of a diff to the 'kill-ring'.  By default
>   it will use the text the diff would modify, without having to apply a
>   hunk.  If the selected range extends a hunk, the commands attempts to
>   look up and copy the text in-between the hunks.
> 
> WDYT?

Two comments:

 . "copies text out of a diff" is hard to understand.  My
   understanding is that it takes the original text, modifies it using
   the diff hunks in the region, and copies the result to kill-ring.
   That's what I tried to describe in the first sentence that you now
   want to split.  If that interpretation is correct, then "copies
   text out of a diff" makes it much less clear.
 . The split version says "by default", but doesn't clearly say what
   will happen "not by default".  If the next sentence is that
   "non-default" case, then it is better to join these two sentences:
   "By default, ..., but if the selected text extends a hunk, ...".
   And in that latter case, I'm not sure I understand the significance
   of "by default", to tell the truth.

Or maybe I simply misunderstand what the patch does, as I'm not an
expert on diff-mode and don't know well enough what the various
functions you call do.  But then neither will the prospective reader
of this NEWS entry.

Thanks.