Skip to content

Commit

Permalink
Attempt to fix citar--open-multi
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarcus committed Jul 9, 2022
1 parent 5db608e commit 3ecedbe
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions citar.el
Original file line number Diff line number Diff line change
Expand Up @@ -1113,13 +1113,12 @@ cross-referenced keys, if any."
"Act appropriately on SELECTION when type is `multi-category'.
For use with `embark-act-all'."
;; TODO Fix this so that `citar-open' can open non-file notes
(cond ((string-match "http" selection 0)
(browse-url selection))
((member t (mapcar (lambda (x)
(file-in-directory-p selection x))
citar-notes-paths))
(find-file selection))
(t (citar-file-open selection))))
(let ((notep (get-text-property 0 'citar--note selection)))
(if notep
(funcall (citar--get-notes-config :open) selection)
(pcase (get-text-property 0 'multi-category selection)
('file (find-file selection))
('url (browse-url selection))))))

;; TODO Rename? This also opens files in bib field, not just library files
;;;###autoload
Expand Down

0 comments on commit 3ecedbe

Please sign in to comment.