Subject: bug#6774: Cut and paste with C-w/mouse-2 not working?

From: Jan Djärv <[email-masked]>
Date: Tue, 17 Aug 2010 10:24:16 +0200

2010-08-17 09:17, Eli Zaretskii skrev:
>> Date: Tue, 17 Aug 2010 07:52:19 +0200
>> From: Jan Djärv<[email-masked]>
>> Cc: [email-masked], [email-masked], [email-masked]
>>
>> I think we should add a hook to redisplay that gets called whenever
>> selection is non-zero.  Then that hook can do the right thing.
>
> What do you mean by "selection is non-zero"?  Does it mean that region
> should be highlighted during this redisplay cycle?  Or does it mean
> something else?
 >
 > And when do you want the hook to be called? at the end of redisplay?
 > at the beginning? in the middle?

It was said that only redisplay knows if the regions is non-empty and 
hightlighted.  Called where it is appropriate, I haven't looked at it in 
detail yet.  I guess at the end.  The conditions are something like

1. The region is different from previous redisplay.
2. The region is not empty.
3. The region is hightlighted.

>
> And why a hook? do we want to do in that hook anything except set some
> selection, like PRIMARY?  If we only want to set a selection, we can
> do that directly.

Yes, but given all the variables that can influence what to do, I just thought 
it better to hand it off out of redisplay.

	Jan D.