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

[Feature] Is there a way to get this firing after org-save-all-org-buffers? #24

Closed
wakatara opened this issue Feb 21, 2020 · 4 comments
Closed

Comments

@wakatara
Copy link

I looked around at a few different approaches to this that people have used, but the idea of firing the git commit and push on a specific commend (like org-save-all-buffers which I use in agenda) or after a specific time sequence was compelling.

Is there a way to build that in the code or a particular way you are using it that supports this (rather than after every file save)? Without reverting to shell scripts or the like as I notced some have done researching this.

@ryuslash
Copy link
Owner

Hmm, org-save-all-buffers doesn't call the normal save hooks? Or is it that you would prefer having one commit for multiple files?

Technically it's definitely possible to wrap around any function or command and try and commit, the only thing I'm having a little bit of trouble thinking up though is how to decide what to commit.

org-save-all-buffers can save any number of org files, but we would only care about the ones that have git-auto-commit-mode enabled. We would then have to group them into the repos they belong to and submit them together.

This should be doable, unless there's something I'm forgetting about? I'll have a look.

Unfortunately there isn't any way I can think of that could accomplish this really right now with only done configuration changes.

@wakatara
Copy link
Author

Yup... sorry, if I was not clear. Basically, I wanted on the "Save all" for a commit to be made for all files in my deft directories which had been altered. Effectively, a save all, git add . and git commit . =]

We trying to figure out if your package could manage that. I noticed a few other people have used it but put it on a timer via cron or emacs timer functions (which I did not even know about till I saw someone use them in some code.).

Effectively, I could just use a cron job to trigger a shell script (and I have everything on Dropbox anyway, so technically, it's "kinda" version controlled. =] ), but having all concerns in emacs seemed cleaner and smarter.

It's nice work though. Thanks for taking time to add it to the community. I know how time consuming these things can be from my projects.

ciao!

@ryuslash
Copy link
Owner

Hmm, I was just working on this and I just had a thought. Can't you essentially achieve this using the gac-debounce-interval variable? If you set this even to a low number it should accomplish what you need when using org-save-all-buffers. Unless I misunderstand what you mean, in which case I'll be getting back to work :)

@ryuslash
Copy link
Owner

ryuslash commented Jul 1, 2021

I will assume that this is no longer an issue as there hasn't been any further response. Please feel free to re-open this issue or create a new one if there is anything else :)

@ryuslash ryuslash closed this as completed Jul 1, 2021
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

2 participants