Comments (3)
That'd be trivial to add. We can just add something similar to the auto-save for a single file as shown here https://github.com/bbatsov/super-save/blob/master/super-save.el#L103
That being said I don't quite get the need for such a command - if you're already super-saving everything why would need a command that periodically saves all buffers? Usually the only buffer that can potentially be unsaved is the current one.
from super-save.
Sorry, I thought mouse-leave-buffer-hook
only works when actually using the mouse, so I removed it from the super-save-hook-triggers
. Adding it back makes "the only buffer potentially unsaved is the current one" true.
However I also found some problem with mouse-leave-buffer-hook
: switch-to-buffer
and other-window
do trigger it, but neither winum-select-window-1
nor spacemacs/alternate-window
triggers it, which I use more often when switching windows. Their definitions are as follows:
(defun spacemacs/alternate-window ()
"Switch back and forth between current and last window in the
current frame."
(interactive)
(let (;; switch to first window previously shown in this frame
(prev-window (get-mru-window nil t t)))
;; Check window was not found successfully
(unless prev-window (user-error "Last window not found."))
(select-window prev-window)))
(defun winum--switch-to-window (window)
"Switch to the window WINDOW and switch input focus if on a different frame."
(let ((frame (window-frame window)))
(when (and (frame-live-p frame)
(not (eq frame (selected-frame))))
(select-frame-set-input-focus frame))
(if (window-live-p window)
(select-window window)
(error "Got a dead window %S" window))))
As of the save-all-buffers feature, it makes file watchers trigger less constantly, reducing cpu/power use. Also I sometimes look at the file-saved indicator in mode-line to see "haved I undo-ed to last save?", so I want the saving happen when I switch to the browser, "I'm certain about the last few edits now, save them and see how the web page looks now". But sure, these aren't common needs and sound a bit paranoid. I'll think again and implement it myself or just ditch the idea.
from super-save.
@JJPandari @bbatsov I've implemented this feature, it will be optional and closed by default, see #20
from super-save.
Related Issues (20)
- Empty .gz files sometimes
- Can super-save save silently? HOT 3
- mouse-leave-buffer-hook not working when clicking on a GUI application
- Possible to set this to `do-auto-save` of the current file instead of `save-buffer`
- [Feature Request] add super-save-exclude
- Can I have different values for "super-save-idle-duration" according to mode?
- Would it be possible to completely disable all modification notices? HOT 2
- How to exclude files from peep-dired ?
- Conflict with blacken mode HOT 2
- Evaluating "super-save-exclude" doesn't seem to work
- Impossible to disable `super-save-mode` HOT 2
- Changing "super-save-idle-duration" has no effect unless I reboot HOT 1
- How to stop saving on mouse left click HOT 2
- org-mode capture prevents saving when emacs looses focus HOT 1
- Any workarounds for using super-save along with lv-message? HOT 4
- Disabling super-save-max-buffer-size (confusing new behavior) HOT 5
- ow mode
- bypass save hooks HOT 1
- not working in org-mode (doom-emacs) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from super-save.