I am a recent and happy user of BibTeX mode (bibtex.el
), but there is one thing I can't get to work as I wish. When I create a template, I can enforce insertion of timestamp and owner with:
(defun current-date ()
(format-time-string "%Y.%m.%d"))
(setq
bibtex-user-optional-fields '(
("timestamp" "Time the entry was created" current-date)
("owner" "Owner of the entry" user-login-name)
)
Is this possible to have the same behavior with bibtex-clean-entry
(C-c C-c
), which would automatically add the timestamp and the owner if they are not already set?
The rationale behind that is that I'm using biblio.el
for automatic download of references (e.g. via DOI), and I set it to run bibtex-clean-entry
right away with:
(setq biblio-cleanup-bibtex-function #'bibtex-clean-entry)
Being able to have the behavior described above for this function would actually save me a lot of time… and make sure I don't forget to add both fields.