You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to call after-save-hook in the context of the buffer visiting a given database file? Not doing so prevents git-auto-commit-mode from operating like I'd expect.
The text was updated successfully, but these errors were encountered:
No, unfortunately not. The reason is that there is no buffer visiting the database file. What Ebib does is read the contents of a .bib file and store it in a hash table. Then when you save the database, it is written to a temp buffer, the content of which is then written (using write-region) to the original file.
I don't immediately see an alternative solution... Perhaps visiting the .bib file and enabling auto-revert-mode in that buffer could work. Ebib shouldn't touch that buffer (it uses temp buffers to read and write the file, it never visits it), and auto-revert-mode should ensure that when Ebib saves the database, the buffer is reverted. I don't know if that triggers after-save-hook, but if not you could probably use after-revert-hook to call gac-after-save-func.
A little cumbersome, of course... Perhaps it makes sense to add some hooks to Ebib to make this easier.
Would it be possible to call
after-save-hook
in the context of the buffer visiting a given database file? Not doing so preventsgit-auto-commit-mode
from operating like I'd expect.The text was updated successfully, but these errors were encountered: