Skip to content

Commit bb07e66

Browse files
committed
remove bibtex-actions-embark-* functions
1 parent 8bba86b commit bb07e66

File tree

1 file changed

+10
-38
lines changed

1 file changed

+10
-38
lines changed

bibtex-actions.el

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -432,10 +432,10 @@ TEMPLATE."
432432
;;; Embark
433433

434434
(defun bibtex-actions-citation-key-at-point ()
435-
"Return citation keys at point as string for `embark'."
435+
"Return citation keys at point as a list for `embark'."
436436
(when-let ((key (or (bibtex-actions-get-key-org-cite)
437437
(bibtex-completion-key-at-point))))
438-
(cons 'citation-key (if (listp key) (string-join key ";") key))))
438+
(cons 'citation-key (if (listp key) key (list key)))))
439439

440440
(with-eval-after-load 'embark
441441
(add-to-list 'embark-target-finders 'bibtex-actions-citation-key-at-point)
@@ -444,45 +444,17 @@ TEMPLATE."
444444

445445
(defvar bibtex-actions-embark-map
446446
(let ((map (make-sparse-keymap)))
447-
(define-key map (kbd "t") 'bibtex-actions-embark-add-pdf-attachment)
448-
(define-key map (kbd "a") 'bibtex-actions-embark-add-pdf-to-library)
449-
(define-key map (kbd "o") 'bibtex-actions-embark-open)
450-
(define-key map (kbd "e") 'bibtex-actions-embark-open-entry)
451-
(define-key map (kbd "l") 'bibtex-actions-embark-open-link)
452-
(define-key map (kbd "n") 'bibtex-actions-embark-open-notes)
453-
(define-key map (kbd "p") 'bibtex-actions-embark-open-pdf)
454-
(define-key map (kbd "RET") 'bibtex-actions-embark-open)
447+
(define-key map (kbd "t") 'bibtex-completion-add-PDF-attachment)
448+
(define-key map (kbd "a") 'bibtex-completion-add-pdf-to-library)
449+
(define-key map (kbd "o") 'bibtex-completion-open-any)
450+
(define-key map (kbd "e") 'bibtex-completion-show-entry)
451+
(define-key map (kbd "l") 'bibtex-completion-open-url-or-doi)
452+
(define-key map (kbd "n") 'bibtex-completion-edit-notes)
453+
(define-key map (kbd "p") 'bibtex-completion-open-pdf)
454+
(define-key map (kbd "RET") 'bibtex-completion-open-any)
455455
map)
456456
"Keymap for Embark citation-key actions.")
457457

458-
(defun bibtex-actions-embark-open (keys)
459-
"Open PDF, or URL or DOI link associated with KEYS."
460-
(bibtex-completion-open-any (split-string keys ";")))
461-
462-
(defun bibtex-actions-embark-open-pdf (keys)
463-
"Open PDF associated with the KEYS."
464-
(bibtex-completion-open-pdf (split-string keys ";")))
465-
466-
(defun bibtex-actions-embark-open-link (keys)
467-
"Open URL or DOI link associated with the KEYS in a browser."
468-
(bibtex-completion-open-url-or-doi (split-string keys ";")))
469-
470-
(defun bibtex-actions-embark-add-pdf-attachment (keys)
471-
"Attach PDF(s) associated with the KEYS to email."
472-
(bibtex-completion-add-PDF-attachment (split-string keys ";")))
473-
474-
(defun bibtex-actions-embark-open-notes (keys)
475-
"Open notes associated with the KEYS."
476-
(bibtex-completion-edit-notes (split-string keys ";")))
477-
478-
(defun bibtex-actions-embark-open-entry (keys)
479-
"Open BibTeX entry associated with the KEYS."
480-
(bibtex-completion-show-entry (split-string keys ";")))
481-
482-
(defun bibtex-actions-embark-add-pdf-to-library (keys)
483-
"Add PDF associated with the KEYS to library."
484-
(bibtex-completion-add-pdf-to-library (split-string keys ";")))
485-
486458
;;; Command wrappers for bibtex-completion functions
487459

488460
;;;###autoload

0 commit comments

Comments
 (0)