Closed russell closed 3 years ago
Thanks @russell !
What do you think of just binding to nil
all the variables those kill-{whole-}line
read/modify ? instead of reimplementing those kill functions.
(let (kill-ring buffer-undo-list last-command this-command deactivate-mark
kill-ring-yank-pointer interprogram-cut-function save-interprogram-paste-before-kill)
(kill-whole-line))
Your proposed solution works, but it feels like a weird solution still, I mean your talking about using an interactive function to perform background modification of text in a hidden buffer.
I don't like that idea for a few of reasons,
kill-ring
, all the rubbish we are deleting from the buffer, only to cause it to be garbage collected moments later, so it's also more in-efficientI see that tests are currently disabled in CI, but either way, they are there for when you get around to enabling them :)
Thank you @russell, I will enable tests in ci
While trying to copy a symbol from a buffer text was inconveniently pre-pended and in some cases appended depending on if the lsp-ui doc cleanup happens before or after killing interactively in my buffer.
Some examples of entries from the
kill-ring
variablee.g. Me trying to copy some text
e.g. an example of a weird entry found in my kill ring, there are many more like this, some a just huge strings of empty lines.
This is happening because the interactive kill-* commands all put data onto the kill ring. If the previous command was
kill-region
, then the next kill command will append to the previous kill ring entry.