-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add global-real-auto-save-mode #55
base: master
Are you sure you want to change the base?
Conversation
Any suggestions? @conao3 |
I think this is a good idea, but |
Thanks for the feedback! I got the inspiration for In Magit's I think we can live without these functions, but I also think they are useful API. Users can then declare (add-hook 'message-mode-hook #'turn-off-real-auto-save) ... and don't need to create lambdas or whatever. Please note I'm not sure if this is still considered weird. I just picked this up during the past weeks and liked the convention. |
OK, thanks. I'm not professional too, but I follow package-lint suggestion.
So, I suggest to use (defun real-auto-save-initialize ()
(when buffer-file-name (real-auto-save-mode)) |
I usually use |
Whoa that year went by fast. I addressed some of your comments @conao3 but didn't recall if you want the Grepping through the emacs lisp sources, I only found a handful of uses of the TL;DR: the '-initialize` suffix sounds like it'd be misleading. I'm not a fan of the |
I'm not an experiences Emacs package developer, so a review and feedback would be much appreciated!
With the global mode enabled, one can disable
real-auto-save-mode
on a per-buffer or per-major-mode basis. I found this easier for my setup than enabling auto saving for every conceivable mode.I tested it this way:
Auto-saving in .txt files works, auto-saving in message drafts is disabled. Manually disabling this in a buffer via
M-: (real-auto-save-mode -1)
works, too, and doesn't affect the next file you visit (i.e. auto-saving is still enabled by default).