TransWikia.com

Emacs keeps overwriting files in Haskell mode

Emacs Asked by Ashesh on January 30, 2021

I’m using emacs:

GNU Emacs 26.3
Copyright (C) 2019 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

And I seem to be seeing a particularly strange problem: emacs, in haskell-mode keeps writing to the file repeatedly after each keystroke (also at times after a few keystrokes).
I’ve read online that some of the common tips to debug issues like these, and to identify the culprit mode, one must selectively disable modes one by one and see which one is causing this.

However, I was wondering if there was a better and less ad-hoc way for going about this: setting breakpoints.

I’ve tried to set debug points on save-buffer, write-file, and save-some-buffers, but this file-write operation doesn’t seem to hit those breakpoints.

Are there more functions in elisp that deal with writing to files? If so, which ones?
And is my technique in trying to identify the culprit sound? Or is setting breakpoints not the ideal way of going about this?

Thanks.


Edit: similar issue.

One Answer

In my case, and in case anyone else using dante stumbles on this: this seems to be a feature of Dante for typechecking to work. And this was removed in favour of using temp. files as discussed in this issue. The resolution, in my case, was to upgrade dante from 1.5 -> 1.6, which doesn't have this issue. You'd want to watch out if you are a heavy user of Indirect buffers, though.

Answered by Ashesh on January 30, 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