TransWikia.com

Spacemacs kept repositioning the cursor when there's unmatched parenthesis

Emacs Asked by Searene on September 2, 2021

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.

One Answer

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.

Answered by Searene on September 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP