1

Because my emacs editor has become completely unreliable / unusable due to the frequent freezes - I'd like to disable this. But I can't figure out how?

The actual issue is described by myself and others here: https://github.com/syl20bnr/spacemacs/issues/9409

When I tried searching for this online:

This page offers no solution: https://www.gnu.org/software/emacs/manual/html_node/efaq/Disabling-auto_002dsave_002dmode.html

It only directs you to https://www.gnu.org/software/emacs/manual/html_node/emacs/Auto-Save.html#Auto-Save which also has no solution

4
  • 1
    Is your problem an instance of emacs.stackexchange.com/questions/12086/… ?
    – phils
    Commented Mar 1, 2020 at 23:32
  • Thank you so much @phils that has fixed the unstableness issue - and has made emacs incredibly more responsive. Commented Mar 3, 2020 at 23:52
  • You're welcome; I'm glad that did the trick.
    – phils
    Commented Mar 4, 2020 at 5:19
  • I would suggest accepting @lawlist's answer, as it does cover the original question of how to disable savehist-mode, even if you didn't end up needing to do that.
    – phils
    Commented Mar 4, 2020 at 5:20

1 Answer 1

3

To disable savehist-mode, which is a global minor-mode, one can use: (savehist-mode -1) When disabling savehist-mode, the function savehist-uninstall is called ... savehist-minibuffer-hook is removed from the minibuffer-setup-hook, and savehist-autosave is removed from the kill-emacs-hook, and the timer savehist-timer is canceled.

However, savehist-mode is not enabled in Emacs 26 by default. Therefore, the better approach would be to find out where in the user-configuration of the original poster savehist-mode is being enabled and remove that line of code or comment it out. The easiest method would be to use grep and search for the term savehist-mode.

savehist-mode has been around for ages and it is highly unlikely it is responsible for making Emacs freeze frequently. Turning it off for purposes of troubleshooting, however, may be a worthwhile endeavor.

The best approach is to try and get a backtrace when Emacs freezes. If pressing C-g does not suffice, then consider building Emacs from source and launching Emacs under gdb ... with the terminal starting directory being the src directory so that the .gdbinit gets loaded. Then, when Emacs freezes, you can force a backtrace ... which is beyond the scope of this answer.

1
  • 1
    savehist can sometimes cause problems if the user is telling it to save some really large value. The example I've seen which springs to mind is the entire kill ring with all text properties printed out in readable form. The resulting file can be enormous, but in those situations it's probably down to a small handful of variables at most. E.g. emacs.stackexchange.com/questions/12086/…
    – phils
    Commented Mar 1, 2020 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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