Closed jcs090218 closed 1 month ago
I'm facing very same issue. After taking a quick look at the source code, I found that the issue is caused by the uncleared yank-handler
text property. It seems to be easy to fix, but I wonder why `yank-handler' is needed actually.
I'll work on that anyways when I have time.
IIRC, the yank-handler
was so that the yank behaviour is overridden when whole-line-or-region-mode
is enabled to handle the following case: if you copy the final line of a file, and there's no newline after it, then when it's yanked a newline should be added. Hopefully a test should fail if you disable the yank-handler
, but a couple of tests are failing for me right now anyway. I'd appreciate a second opinion!
Same issue with
emacs -q
withGNU Emacs 29.3 (build 2, x86_64-w64-mingw32) of 2024-03-24
.I was expecting the line should be (after yanking):
And not (in the image):
Step to reproduce
emacs -q
eval
the following (in scratch buffer):M-x whole-line-or-region-local-mode
M-x whole-line-or-region-kill-region
M-x undo
10
thenM-x kill-ring-save
M-x yank