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.
emacs -Q
, which starts emacs without loading any configuration. If the problem persists, then it's a problem with emacs itself, otherwise it's something that is introduced by your configuration. This sounds like something that could happen if you have flymake or flycheck turned on, for example.write-region
. I think most of the commands for saving files end up calling it one way or another; it's the one that actually puts bytes into a file.flymake
andflycheck
enabled. However, disabling the flycheck and flymake modes seems to have no effect.write-region
has no effect on whatever is saving the haskell files. It seems to now only be triggered by unrelated modes. The messages buffer still indicates the file being written over and over again.