0

I want to create a org-babel-post-tangle-hook that does a git stage buffer-file-name. There is a boring technical issue I have, which is that I don't know how to call magit-stage-file from elisp so that it doesn't prompt me to save. There's some way to wrap my call to magit-stage-file to accomplish this that I haven't figured out yet. Then there's the second issue of getting this to work across different settings. For example, I would like to be able to have this work even in the case that buffer-file-name is in a different git repo than the one I'm currently working out of. The buffer-file-name might even be on a different machine (over TRAMP)Could projectile be of use here?

3
  • Thanks for the edit @Drew. The sub-question about calling interactive functions non-interactively is (strictly) an elisp question though, isn't it? – nwknoblauch Jan 27 at 20:02
  • No, it's not a candidate for tag elisp; it's not about the design of the language itself. It's a question about how to do something using Elisp. And BTW, the particular question of how to call a command non-interactively has already been posed, including recently. – Drew Jan 27 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.