From 3dbbd8dc4eb729514ec132cdbdbf66920fee8d11 Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Sun, 28 Feb 2021 11:57:09 -0500 Subject: [PATCH] Add bibtex-completion-open-any Make bibtex-completion-open-any interactive, add it to the keymap. --- bibtex-completion.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bibtex-completion.el b/bibtex-completion.el index 843d34f..daf3663 100644 --- a/bibtex-completion.el +++ b/bibtex-completion.el @@ -62,6 +62,7 @@ (defvar bibtex-completion-map "Keymap for bibtex-completion commands" (let ((map (make-sparse-keymap))) + (define-key map (kbd "o") '("Open PDF, URL, or DOI" . bibtex-completion-open-any)) (define-key map (kbd "p") '("Open PDF" . bibtex-completion-open-pdf)) (define-key map (kbd "u") '("Open URL or DOI" . bibtex-completion-open-url-or-doi)) (define-key map (kbd "c") '("Insert citation" . bibtex-completion-insert-citation)) @@ -992,6 +993,7 @@ called in case no PDF is found." If multiple PDFs are found for an entry, ask for the one to open using `completion-read'. If no PDF is found, try to open a URL or DOI in the browser instead." + (interactive (list (bibtex-completion--read))) (bibtex-completion-open-pdf keys 'bibtex-completion-open-url-or-doi)) (defun bibtex-completion-format-citation-default (keys)