Modify database save routine to save while in a file-visiting buffer#307
Modify database save routine to save while in a file-visiting buffer#307swflint wants to merge 4 commits intojoostkremers:masterfrom
Conversation
|
Well, this is a tough one... I use temp buffers to read and write a One idea I had, thinking about this, was to visit the Visiting the file could be done when Ebib opens it. That would have the small disadvantage that the data lives is memory twice: once in a hash table and once in a buffer. But given that The advantage would be that everything a user expects Emacs to do when saving a file (checking mod time, creating backups) is handled automatically. Though I can't foresee if the user experience will be smooth in every situation, so I'd have to check that first. I'd also have to check what happens when the user reloads a database from its file.
Yes, it should also work for |
The reasoning for not keeping the buffer around makes sense. However, I think the solution of opening it as read-only would be a decent solution.
I think that would be the way to go. I don't think having a bib file open would be all that likely to be an issue. It could also be an option,
I figured as much. That said, I may close this to try and improve the logic. |
|
I've finally gotten |
And unset/set read-only status for buffers containing the bibtex database.
|
I believe that this should be ready, and it seems to be working for me. |
This should work for #306, hopefully without causing too many issues.
Let me know if I should also hack it to work for
ebib-write-database.