Closed heikkil closed 6 years ago
Fixed by #8.
I do not see any change in the behaviour after upgrading super-save.
How to reproduce the problem:
I've tested the latest version and it definitely works fine for me. Where did you install it from?
Melpa. Now running version 20160211.256. This is under GNU Emacs 25.1.50.1 (x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F1605)) of 2016-01-28
Hmm, I'm running the same myself. Can you run C-h f RET switch-to-buffer
and tell what advices do you see there?
:before advice: ‘super-save-command-advice’ :around advice: ‘ad-Advice-switch-to-buffer’
Also, it tells me that:
Its keys are remapped to ‘ivy-switch-buffer’.
I am using heavily abo-abo's packages that might affect things.
Not sure what his advice does, but it definitely seems super-save
's advice is properly applied for you. //cc @abo-abo
Not sure what his advice does, but it definitely seems super-save's advice is properly applied for you.
ivy-mode
ony does this, it doesn't introduce any advices:
(define-key map [remap switch-to-buffer] 'ivy-switch-buffer)
Perhaps super-save
should un-alias to the command that switch-to-buffer
binding is remapped to.
The :around
advice comes from git-gutter-fringe. I disabled it, rebooted. No change.
I also disables ivy-mode. No change there either.
Maybe the super-save package is corrupted or something? Remove it and install it again.
The package has been updated a few times while I've been aware of the problem. Tried anyway to remove-reinstall, but no luck.
If it is just me, the problem is not that serious. I'll keep trying different options. Saving when buffer loses focus and on idle work reliably.
I'm so so sorry - I didn't read carefully the ticket description. You're right - those commands don't trigger super-save for some reason. I'll look into this.
In magit-display-buffer, it calls select-window internally. So just adding a advice to select-window should do work. Testing.
Yes that works for Magit. i will make a pull request some time later if you don't have time.
Quickrun uses save-selected-window which internally uses set-frame-selected-window and select-window.
There is no network or quickrun in my laptop. On my way home now. Sorry for the delay to test quickrun.
other-window switch-to-buffer and windmove series all uses select-window internally. select-window is defined in c and does the actual work.
Update: it does not look like PR was submitted to either of the github repositories.
Meanwhile quickrun has been updated to work on the buffer content and does not need saving of the buffer to work as expected.
Situation with magit remains as it is: magit-status does not trigger super-save.
Have the same issue today. It was confusing. I don't have any clue about the root of problem. Cause I don't change anything regarding supre-save configuration.
Come to this repo. Fortunately my problem correlate directly to this lastest commit :)
The problem is because I added this line for ace-window configuration
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
Using this additional config. Solve the problem :)
(add-to-list 'super-save-triggers 'ace-window)
Yeah, now it's simple to just add whatever commands (or hooks) you want to list of triggers. I think we can mark this one as fixed.
I actually have the exact same problem in 2020, super save doesn't recognize the 'magit-status' trigger in my Doom Emacs installation, all other commands work except for 'magit-status' while triggering it with the keystrokes SPC g g.
Super-save-triggers contains these commands.
Value
(evil-window-next magit-status switch-to-buffer other-window windmove-up windmove-down windmove-left windmove-right next-buffer previous-buffer evil-window-previous)
I've installed super-save using the default package manager in Doom Emacs (straight.el) in my packages.el file like so (package! super-save)
, I'm guessing I use the latest version? Don't know how to verify atm.
Also, wouldn't know how to debug this behaviour. Any help would be appreciated.
I don't know how but saving with 'magit-status' started working after I included a few new triggers to the list.
Value
(evil-window-next magit-status switch-to-buffer other-window windmove-up windmove-down windmove-left windmove-right next-buffer previous-buffer evil-window-prev +workspace/switch-left +workspace/switch-right)
@hyperfocus1337 I'm having the same problem with evil doom, did you find a fix?
Unfortunately I don't, the same issue started cropping up again, I'm in the same boat.
This is my configuration, for what it's worth.
(use-package! super-save
:ensure t
:config
(super-save-mode +1))
(add-to-list 'super-save-triggers 'evil-window-next)
(add-to-list 'super-save-triggers 'evil-window-prev)
(add-to-list 'super-save-triggers 'next-buffer)
(add-to-list 'super-save-triggers 'previous-buffer)
(add-to-list 'super-save-triggers 'switch-to-buffer)
(add-to-list 'super-save-triggers 'other-window)
(add-to-list 'super-save-triggers 'windmove-up)
(add-to-list 'super-save-triggers 'windmove-down)
(add-to-list 'super-save-triggers 'windmove-left)
(add-to-list 'super-save-triggers 'windmove-right)
(add-to-list 'super-save-triggers '+workspace/switch-left)
(add-to-list 'super-save-triggers '+workspace/switch-right)
(add-to-list 'super-save-triggers '+workspace/switch-to-final)
(add-to-list 'super-save-triggers '+workspace/switch-to)
(add-to-list 'super-save-triggers '+ivy/projectile-find-file)
(add-to-list 'super-save-triggers 'magit-status)
@dlip
Awesome, I found a solution. It's described here.
Use this code:
(setq magit-save-repository-buffers 'dontask)
I have commands from two packages that I use regularly that do not trigger super-save. Typically my current buffer is unsaved:
Could you please either advise how to add code to include them or add fixes to the distribution code.