diff options
author | Ryan Kavanagh <rak@rak.ac> | 2021-12-11 14:39:49 -0500 |
---|---|---|
committer | Ryan Kavanagh <rak@rak.ac> | 2021-12-11 14:39:49 -0500 |
commit | 2052adecbcbbc62a18e9236387999be424dd8847 (patch) | |
tree | 49200f80d56daf9748862cb95cc2a8a8e585f3cf /.emacs | |
parent | Added a single-lines-only function to emacs (diff) |
Allow forcing a key with bibtex/emacs
Diffstat (limited to '.emacs')
-rw-r--r-- | .emacs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -131,6 +131,10 @@ ("C-c C-c" . org-ref-clean-bibtex-entry) ("C-c s" . bibtex-sort-buffer)) :config + (defun my/bibtex-generate-autokey (autogenerated) + (let ((key (bibtex-autokey-get-field "_key"))) + (if (string= "" key) autogenerated key))) + (advice-add 'bibtex-generate-autokey :filter-return #'my/bibtex-generate-autokey) ;; stolen from bibtex.el and modified to handle "Mac Lane" (defun my/bibtex-autokey-demangle-name (fullname) "Get the last part from a well-formed FULLNAME and perform abbreviations." |