From fc3221e64708417111ea1349701b41f707390ecd Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Thu, 28 Jan 2021 20:46:56 -0500 Subject: Add bindings for set-checked-date --- .emacs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.emacs b/.emacs index b6064ad..24a7fcd 100644 --- a/.emacs +++ b/.emacs @@ -601,7 +601,9 @@ If not, issue a warning." (use-package org-ref-core :ensure org-ref :after helm-bibtex - :bind (("C-c C-c" . org-ref-clean-bibtex-entry)) + :bind (:map bibtex-mode-map + ("C-c C-c" . org-ref-clean-bibtex-entry) + ("C-c d" . my/set-checked-date)) :config (defun org-ref-rak-title-case-english () "Call org-ref-title-case only if the language field is set @@ -611,6 +613,12 @@ If not, issue a warning." (let ((langfield (bibtex-autokey-get-field "language"))) (if (= (length langfield) 0) (org-ref-title-case)))) + (defun my/set-checked-date () + "Set the _checked field of a bibtex entry to the current date." + (interactive) + (save-excursion + (bibtex-beginning-of-entry) + (bibtex-set-field "_checked" (format-time-string "%Y-%m-%d")))) ;; taken from org-ref-bibtex.el and extended (setq org-ref-nonascii-latex-replacements (append '(("fi" . "fi") -- cgit v1.2.3