aboutsummaryrefslogtreecommitdiff
path: root/.emacs
diff options
context:
space:
mode:
Diffstat (limited to '.emacs')
-rw-r--r--.emacs4
1 files changed, 4 insertions, 0 deletions
diff --git a/.emacs b/.emacs
index 40ed9e7..3e0cd34 100644
--- a/.emacs
+++ b/.emacs
@@ -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."