Skip to content

Commit

Permalink
Modify select-key embark bit
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarcus committed Sep 12, 2021
1 parent 88f79f1 commit 97396b4
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions bibtex-actions.el
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ It returns an alist of key-entry, where the entry is a field-value alist."
(lambda (choice)
;; Collect citation keys of selected candidate(s).
(or (cdr (assoc choice candidates))
;; Key is literal coming from embark, just pass it on
choice))
;; REVIEW for embark at-point; how to explain?
(cdr (seq-find (lambda (cand) (equal choice (cadr cand))) candidates))))
chosen)))

(defun bibtex-actions-select-file (files)
Expand Down Expand Up @@ -367,10 +367,10 @@ key associated with each one."
(maphash
(lambda (citekey entry)
(let* ((files
(when (or (bibtex-actions-get-value
bibtex-actions-file-variable entry)
(bibtex-actions-file--files-for-key
entry bibtex-actions-library-paths bibtex-actions-file-extensions))
(when (bibtex-actions-file--files-for-key
entry
bibtex-actions-library-paths
bibtex-actions-file-extensions)
" has:files"))
(notes
(when (bibtex-actions-file--files-for-key
Expand Down Expand Up @@ -624,7 +624,8 @@ With prefix, rebuild the cache before offering candidates."
(let ((files
(bibtex-actions-file--files-for-multiple-keys
keys-entries
bibtex-actions-library-paths bibtex-actions-file-extensions)))
bibtex-actions-library-paths
bibtex-actions-file-extensions)))
(if files
(dolist (file files)
(if bibtex-actions-open-library-file-external
Expand Down

0 comments on commit 97396b4

Please sign in to comment.