[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50067: Context menus
From: |
Juri Linkov |
Subject: |
bug#50067: Context menus |
Date: |
Tue, 31 Aug 2021 20:37:54 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>>>> On paste when there is a region and delete-selection-mode is t, the
>>>> region should be replaced by the text.
>>>
>>> Please explain how the region should be replaced by the text,
>>> when mouse-yank-at-click or mouse-yank-primary is used
>>> to paste where the mouse is clicked. Should it delete the region
>>> and paste where mouse is clicked on another part of the buffer?
>>> What if the mouse is clicked in another window?
>>
>> When there is a region and yank text by `C-y’, the text would
>> be replaced.
>>
>> I think when there is a region and point in on region, region
>> should be replaced by text. No?
>
> mouse-yank-at-click is intended to paste where you click.
> So when there is a region, and you click mouse-3 at some other position
> where you want to paste, and select "Paste" from the context-menu,
> it's unclear what to do with the region. It makes no sense
> to delete the region, when you paste at the clicked position
> outside of the region, but not on the region.
>
> Please see more in mouse-yank-at-click and mouse-yank-primary
> that contain such comment about the need to deactivate the region:
>
> ;; Without this, confusing things happen upon e.g. inserting into
> ;; the middle of an active region.
> (when select-active-regions
> (let (select-active-regions)
> (deactivate-mark)))
But maybe still it should delete the region before yanking?
I suggest to try these settings:
(put 'mouse-yank-primary 'delete-selection 'yank)
(put 'mouse-yank-at-click 'delete-selection 'yank)
(put 'menu-bar-select-yank 'delete-selection 'yank)
Then maybe they should be added to delsel.el.
- bug#50067: Context menus, (continued)
- bug#50067: Context menus, Juri Linkov, 2021/08/22
- bug#50067: Context menus, Tak Kunihiro, 2021/08/22
- bug#50067: Context menus, Juri Linkov, 2021/08/23
- bug#50067: Context menus, Tak Kunihiro, 2021/08/24
- bug#50067: Context menus, Juri Linkov, 2021/08/24
- bug#50067: Context menus, Tak Kunihiro, 2021/08/24
- bug#50067: Context menus, Juri Linkov, 2021/08/25
- bug#50067: Context menus, Juri Linkov, 2021/08/26
- bug#50067: Context menus, Juri Linkov, 2021/08/27
- bug#50067: Context menus, Tak Kunihiro, 2021/08/28
- bug#50067: Context menus,
Juri Linkov <=
- bug#50067: Context menus, Juri Linkov, 2021/08/31
- bug#50067: Context menus, Eli Zaretskii, 2021/08/31
bug#50067: Context menus, Eli Zaretskii, 2021/08/18
bug#50067: Context menus, Juri Linkov, 2021/08/18
bug#50067: Context menus, Eli Zaretskii, 2021/08/18
bug#50067: Context menus, Eli Zaretskii, 2021/08/18
bug#50067: Context menus, Stefan Monnier, 2021/08/18
bug#50067: Context menus, Eli Zaretskii, 2021/08/19