Code Monkey home page Code Monkey logo

Comments (25)

bbatsov avatar bbatsov commented on June 14, 2024 1

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.

from super-save.

hyperfocus1337 avatar hyperfocus1337 commented on June 14, 2024 1

@dlip

Awesome, I found a solution. It's described here.

Use this code:

(setq magit-save-repository-buffers 'dontask)

from super-save.

bbatsov avatar bbatsov commented on June 14, 2024

Fixed by #8.

from super-save.

heikkil avatar heikkil commented on June 14, 2024

I do not see any change in the behaviour after upgrading super-save.

How to reproduce the problem:

  1. Make sure super-save mode is enabled.
  2. Open a text file that is under git in emacs.
  3. Make a small change. Do not save.
  4. Run magit-status. The text file remains unsaved.
  5. Quit the magit buffer to return to the text file. The text file remains unsaved (until idle timer triggers saving or the file is saved manually).

from super-save.

bbatsov avatar bbatsov commented on June 14, 2024

I've tested the latest version and it definitely works fine for me. Where did you install it from?

from super-save.

heikkil avatar heikkil commented on June 14, 2024

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

from super-save.

bbatsov avatar bbatsov commented on June 14, 2024

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?

from super-save.

heikkil avatar heikkil commented on June 14, 2024

: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.

from super-save.

bbatsov avatar bbatsov commented on June 14, 2024

Not sure what his advice does, but it definitely seems super-save's advice is properly applied for you. //cc @abo-abo

from super-save.

abo-abo avatar abo-abo commented on June 14, 2024

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.

from super-save.

heikkil avatar heikkil commented on June 14, 2024

The :around advice comes from git-gutter-fringe. I disabled it, rebooted. No change.

I also disables ivy-mode. No change there either.

from super-save.

bbatsov avatar bbatsov commented on June 14, 2024

Maybe the super-save package is corrupted or something? Remove it and install it again.

from super-save.

heikkil avatar heikkil commented on June 14, 2024

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.

from super-save.

bbatsov avatar bbatsov commented on June 14, 2024

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.

from super-save.

jiegec avatar jiegec commented on June 14, 2024

In magit-display-buffer, it calls select-window internally. So just adding a advice to select-window should do work. Testing.

from super-save.

jiegec avatar jiegec commented on June 14, 2024

Yes that works for Magit. i will make a pull request some time later if you don't have time.

from super-save.

jiegec avatar jiegec commented on June 14, 2024

Quickrun uses save-selected-window which internally uses set-frame-selected-window and select-window.

from super-save.

jiegec avatar jiegec commented on June 14, 2024

There is no network or quickrun in my laptop. On my way home now. Sorry for the delay to test quickrun.

from super-save.

jiegec avatar jiegec commented on June 14, 2024

other-window switch-to-buffer and windmove series all uses select-window internally. select-window is defined in c and does the actual work.

from super-save.

heikkil avatar heikkil commented on June 14, 2024

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.

from super-save.

azzamsa avatar azzamsa commented on June 14, 2024

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)

from super-save.

hyperfocus1337 avatar hyperfocus1337 commented on June 14, 2024

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.

from super-save.

hyperfocus1337 avatar hyperfocus1337 commented on June 14, 2024

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)

from super-save.

dlip avatar dlip commented on June 14, 2024

@hyperfocus1337 I'm having the same problem with evil doom, did you find a fix?

from super-save.

hyperfocus1337 avatar hyperfocus1337 commented on June 14, 2024

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)

from super-save.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.