RipKord42 · 2022-12-07 18:39
Hi All,
I have a longstanding issue I haven't found a solution for. Any time I'm editing an org mode file my cursor will automatically "suck back" to the last text on the screen. For example, I type a sentence, finish with a period then hit space twice to start the new sentence. If I don't type something immediately (like less than a second) the cursor is pulled back to the period, removing the space(s).
Needless to say it's rather annoying behavior. It's 100% consistent and what I gave was just an example, it's happening in any scenario...using spaces or tabs, happening in lists, etc.
This is Doom Emacs and I'm running this in 28.1 on Void Linux but it was there in 27.x as well.
Let me know if there any more info I can provide and TIA for your help.
mclearc · 2022-12-07 18:43
Do you have ws-butler on or some such similar mode to delete whitespace? Go to describe-mode in some buffer where it is happening and see. If that’s not it make sure it doesn’t happen with emacs -q and then bisect your config until you figure out the cause.
LynxOfTheWastes · 2022-12-07 19:57
Maybe double space bar is bound to something. Does it happen when you just use a single space?
RipKord42 · 2022-12-07 20:20
That is it for sure, thank you! Interestingly I don't see where it is explicitly enabled. I have been unsuccessful disabling it with either:
(ws-butler-mode 0)
or
(ws-butler-mode -1)
or the global version of either.
00-11 · 2022-12-07 22:26
Yet another case of *"the butler did it"*, I guess.
mclearc · 2022-12-07 23:26
It could also be whitespace-mode. I’d check your after save hooks just to be sure. Perhaps there is a package you have loaded that is turning it on for all text modes or something.
mclearc · 2022-12-07 23:27
Well-played!
7890yuiop · 2022-12-08 00:02
n.b. To my knowledge (or at least by default) `ws-butler` only removes whitespace when you *save*, so I suspect your problem is being triggered by something else in your config *automatically saving modified buffers* when you ignore them for a second (which is very much *not* the default behaviour).
> I have been unsuccessful disabling it ...
Don't guess; grep your config for `ws-butler` and find out exactly how it's being enabled.
You should also figure out what's auto-saving your modified buffers, and decide whether that's something you actually want to be happening, because that's a very aggressive approach, and you might instead prefer to configure the behaviour of the standard autosave files that Emacs makes.
RipKord42 · 2022-12-08 02:05
You're on to it. It is saving the buffer with each change. I did grep for ws-butler and it came up empty.
Now I'm trying to find where this auto save is coming from as nothing immediately obvious.
Thank you for the help, this seems to be the key.
RipKord42 · 2022-12-08 02:27
Found it gents. It turns out deft was autosaving always and immediately and thus triggering ws-butler. And this was apparently by default since I haven't modified such setting. I was able to up the auto save time and the problem has finally vanished so my sanity doesn't have to.
Thanks to you both for chipping in and getting me there. Much appreciated
I'm still very much an Emacs noob but working on it.