Skip to content

Commit

Permalink
Add bibtex-completion-open-any
Browse files Browse the repository at this point in the history
Make bibtex-completion-open-any interactive, add it to the keymap.
  • Loading branch information
bdarcus committed Feb 28, 2021
1 parent bcf1123 commit 3dbbd8d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bibtex-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3dbbd8d

Please sign in to comment.