What does “break undo” mean? Do you mean that if you type “x” and then you type “y” and then you use undo, the first undo should remove only the “y” and the second would remove the “x”?
What does “break undo” mean? Do you mean that if you type “x” and then you type “y” and then you use undo, the first undo should remove only the “y” and the second would remove the “x”?
C-h i g (elisp)Window Hooks
Interesting. I’m still just guessing, but I notice that you’re using relative line numbers which means that there’s a potential difference between the amount of space needed to show the relative line number vs the absolute line number, and that might explain the shift in display. Can you reproduce this when using absolute line numbers? If not, that seems to narrow down the trigger scenario, which will be helpful information for an upstream bug report.
M-x report-emacs-bug
, especially if you can provide a reproduceable recipe from emacs -Q
My guess is that the “drag” detection is a side-effect of this:
the whole buffer shifts to the left like a single pixel
as it’s conceivable that this means the positions of the click and release are “different” even if you didn’t actually move the mouse.
So that maybe explains the end result, but not the actual trigger.
I’m just speculating though.
The question lent itself to both earnest and humorous replies, and it duly received both, so this seems very unnecessary. If you don’t think a joke is funny, down-vote it and move on.
I don’t know, but it might help to check C-h l
to see which sequence of mouse events Emacs is reporting in each case.
How much would you pay for all-the-packages?! Don’t answer yet because if you call now we’ll install even more packages. That’s right, packages which haven’t even been written yet will be installed the moment that their first alpha version is detected on the internet! And if that wasn’t enough, our first 100 callers will receive a free pair of GNU socks. Don’t miss this incredible offer.
I think you need to define your requirements in more detail. What if you call magit-status while using Magit? Does that change what the “previous window configuration” should be? (I suspect it does, in which case it’s not going to be “the previous window configuration” that you want). If I’m correct, you should clarify exactly which window configuration you want to restore, and when (in which specific circumstances) that should be captured.
I assume you’re talking about the scenario where you want to search for the contents of the kill ring (so C-s C-y
for normal bindings).
That sounds like a deficiency of cua-mode to me; I think it seems reasonable for C-v
to behave like C-y
in that situation.
You can M-x report-emacs-bug
if there isn’t an existing bug report for that.
I think /u/bravosierrasierra has your solution with
amalgamating-undo-limit
then. Except the docstring may have an off-by-one error: experimentally it seems as if you need(setq amalgamating-undo-limit 0)
rather than the indicated value of 1.