0

I'm new to Emacs, and there's one thing I don't understand. Suppose there's a file called test.el, which have the following contents:

(setq

Yes, the parenthesis is not closed, because I haven't finished this file. But when I positioned my cursor just after setq and typed a SPC to continue to write the code, the cursor moved back to the beginning of the line. Why? How can I prevent it from repositioning the cursor, it's annoying.

This problem only occurs with Spacemacs and lisp code, I didn't found the problem with the vanilla Emacs.

0

After lots of checking and searching, I find the following auto save command to be the culprit.

(run-with-timer 3 3 (lambda () (save-some-buffers t)))

It saves the current buffer every 3 seconds, and it seems that Emacs repositions the current elisp file after saving. Removing this line works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.