[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57147: bug#57148: 27.2; Problem with kill-new
From: |
Ihor Radchenko |
Subject: |
bug#57147: bug#57148: 27.2; Problem with kill-new |
Date: |
Sat, 13 Aug 2022 20:20:48 +0800 |
Po Lu <luangruo@yahoo.com> writes:
>> Expected: "Constant string" is inserted
>> Observed: Selected region is inserted.
>
> This is intended behavior. Deactivating the mark will always assert
> ownership over the primary selection with the contents of the region.
>
> See the doc string of `deactivate-mark' for more details.
Can this behaviour be disabled then? It is clearly not the user intention
here when the user calls a function that is supposed to push some
filtered text to `kill-ring' right before deactivating the region.
I am thinking about workaround like
;; Prevent Emacs from adding full selected text to `kill-ring'
;; when `select-enable-primary' is non-nil.
(setq-local filter-buffer-substring-function
`(lambda (&rest _)
(setq-local filter-buffer-substring-function
',filter-buffer-substring-function)
nil))
which seems to work, but looks like a hack.
--
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92
- bug#57148: 27.2; Problem with kill-new, Alain . Cochard, 2022/08/11
- bug#57147: 27.2; Problem with kill-new, Ihor Radchenko, 2022/08/11
- bug#57148: 27.2; Problem with kill-new, Lars Ingebrigtsen, 2022/08/12
- bug#57147: bug#57148: 27.2; Problem with kill-new, Po Lu, 2022/08/12
- bug#57147: bug#57148: 27.2; Problem with kill-new, Alain . Cochard, 2022/08/12
- bug#57147: bug#57148: 27.2; Problem with kill-new, Eli Zaretskii, 2022/08/13
- bug#57147: bug#57148: 27.2; Problem with kill-new, Ihor Radchenko, 2022/08/13
- bug#57147: bug#57148: 27.2; Problem with kill-new, Po Lu, 2022/08/13
- bug#57148: bug#57147: bug#57148: 27.2; Problem with kill-new, Ihor Radchenko, 2022/08/13
- bug#57147: bug#57148: 27.2; Problem with kill-new, Po Lu, 2022/08/13
- bug#57147: bug#57148: 27.2; Problem with kill-new,
Ihor Radchenko <=
- bug#57148: bug#57147: bug#57148: 27.2; Problem with kill-new, Po Lu, 2022/08/13
- bug#57147: bug#57148: 27.2; Problem with kill-new, Lars Ingebrigtsen, 2022/08/13
- bug#57148: bug#57147: bug#57148: 27.2; Problem with kill-new, Po Lu, 2022/08/13
- bug#57147: bug#57148: 27.2; Problem with kill-new, Ihor Radchenko, 2022/08/13
- bug#57148: bug#57147: bug#57148: 27.2; Problem with kill-new, Po Lu, 2022/08/13