reddit / emacs

Saving causing my mac to pinwheel?

[deleted] · 2022-03-24 17:34
[deleted]
redblobgames · 2022-03-24 18:20
The pinwheeling is really quite annoying. The problem is figuring out what the cause is. It's worse if it only happens occasionally. It took a while for me, but I was able to find my issue using the painful but effective "bisect .emacs" approach. Start commenting out large parts of your .emacs. If it doesn't pinwheel anymore, the most recent section you blocked out probably contains the problem, so uncomment smaller parts of that until you find the specific cause. If it does pinwheel, the part you commented out probably isn't the cause, so put that back and comment out another large section. In my case it was the modeline, some hooks I had written, and some bad interaction between my custom code and auto-revert. For saving specifically, look at after-save-hook and before-save-hook to see what they are running during saving. Those two might give you some ideas of what to comment out first.
crawsphi · 2022-03-24 18:22
It will require more information to be able to help much. Fortunately it should be relatively easy for you to gather information with the Emacs profiler. Here is an excellent introduction to using it for a similar problem to yours: https://www.murilopereira.com/how-to-open-a-file-in-emacs
zixx999 · 2022-03-25 03:00
'emacs -q' on command line runs emacs without your config file