forked from mirrors/org-mode
oc-basic: Fix `org-cite-basic-goto'
* lisp/oc-basic.el (org-cite-basic-goto): Set BibTeX dialect before calling `bibtex-search-entry'.
This commit is contained in:
parent
c839849aba
commit
c0dde2c800
|
@ -654,12 +654,15 @@ present in the citation."
|
||||||
(`(,f . ,_) f)
|
(`(,f . ,_) f)
|
||||||
(_ (user-error "Cannot find citation key: %S" key)))))
|
(_ (user-error "Cannot find citation key: %S" key)))))
|
||||||
(org-open-file file '(4))
|
(org-open-file file '(4))
|
||||||
(if (not (equal "json" (file-name-extension file)))
|
(pcase (file-name-extension file)
|
||||||
(bibtex-search-entry key)
|
("json"
|
||||||
(let ((regexp (rx "\"id\":" (0+ (any "[ \t]")) "\"" (literal key) "\"")))
|
(let ((regexp (rx "\"id\":" (0+ (any "[ \t]")) "\"" (literal key) "\"")))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(re-search-forward regexp)
|
(re-search-forward regexp)
|
||||||
(search-backward "{")))))
|
(search-backward "{")))
|
||||||
|
(_
|
||||||
|
(bibtex-set-dialect)
|
||||||
|
(bibtex-search-entry key)))))
|
||||||
|
|
||||||
|
|
||||||
;;; "Insert" capability
|
;;; "Insert" capability
|
||||||
|
|
Loading…
Reference in a new issue