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

From: Jim Porter <[email-masked]>
Date: Sun, 20 Aug 2023 17:34:43 -0700

On 8/20/2023 4:39 PM, Gregory Heytings wrote:
>> I would do something else: a command to move the killed rectangle to 
>> the kill-ring.  And perhaps a command to do the opposite: transform 
>> the last item of the kill-ring into a killed rectangle.
>>
> 
> And here are the two commands I had in mind:
[snip]> WDYT?

Hm, it could work. I'm not sure we *need* to be able to go from the kill 
ring to 'killed-rectangle', but if people are happy with the 
implementation, I don't see a problem.

I wonder how this would interact with 'rectangle-mark-mode' though. That 
puts the killed rectangle on the "regular" kill ring, but applies a 
'yank-handler' text property to the killed rect. 'rectangle-mark-mode' 
might need its own implementation for this. (Either not setting 
'yank-handler' when killing or having a way of ignoring the 
'yank-handler' when yanking?)

(I also wonder if it would make sense for the "normal" rect commands 
like "C-x r k" / 'kill-rectangle' to integrate with the kill ring like 
'rectangle-mark-mode', but that's another can of worms...)