Skip to content
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

"dotspacemacs-auto-save-file-location" not triggering "after-save-hook"? #16432

Closed
vicmortelmans opened this issue Jun 3, 2024 · 2 comments
Closed
Assignees

Comments

@vicmortelmans
Copy link

Description :octocat:

I want to sync the files in my project on github using auto-save and git-auto-commit-mode.

My dotspacemacs has:

dotspacemacs-auto-save-file-location 'original

and:

dotspacemacs-additional-packages '(git-auto-commit-mode)

and in user-config:

  (setq-default gac-ask-for-summary-p nil)
  (setq-default gac-automatically-push-p t)
  (setq-default gac-silent-message-p t)

The files I want to sync are in a git repo and contain in the header:

;; -*- eval: (git-auto-commit-mode 1) -*-

When I manually save, it works, but when an open file is auto-saved, no commit is happening.

git-auto-commit-mode relies on the after-save-hook. Can it be that auto-save isn't triggering this hook?

Reproduction guide 🪲

  • Start Emacs
    1. open file
    2. edit
    3. wait for auto-save

Observed behaviour: 👀 💔
File is saved, but not committed.

Expected behaviour: ❤️ 😄
File is saved and committed.

System Info 💻

  • OS: gnu/linux
  • Emacs: 29.3
  • Spacemacs: 0.999.0
  • Spacemacs branch: develop (rev. 9cddd15)
  • Graphic display: t
  • Running in daemon: nil
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(emacs-lisp git helm multiple-cursors org
            (shell :variables shell-default-height 30 shell-default-position 'bottom)
            version-control treemacs tabs)
  • System configuration features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Backtrace 🐾

@fnussbaum
Copy link
Contributor

fnussbaum commented Jun 5, 2024

Thanks for reporting. This seems to be the same issue as ryuslash/git-auto-commit-mode#32, so you could probably solve it in your configuration by using auto-save-visited-mode instead of the dotspacemacs-auto-save-file-location 'original option.

Of course this should also (or rather instead) be addressed in Spacemacs, we should not use the deprecated option auto-save-visited-file-name anymore.

@smile13241324
Copy link
Collaborator

smile13241324 commented Jun 12, 2024

I think the root cause is that spacemacs is using an outdated mode for auto saving, lets change this on the Spacemacs level.

@smile13241324 smile13241324 self-assigned this Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants