[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org c0dde2c 1/2: oc-basic: Fix `org-cite-basic-goto'
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org c0dde2c 1/2: oc-basic: Fix `org-cite-basic-goto' |
Date: |
Fri, 30 Jul 2021 03:57:16 -0400 (EDT) |
branch: externals/org
commit c0dde2c8003ef76f9f6589049529a84cccf4ea5c
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>
oc-basic: Fix `org-cite-basic-goto'
* lisp/oc-basic.el (org-cite-basic-goto): Set BibTeX dialect before
calling `bibtex-search-entry'.
---
lisp/oc-basic.el | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el
index 4e9d2e5..a5b5588 100644
--- a/lisp/oc-basic.el
+++ b/lisp/oc-basic.el
@@ -654,12 +654,15 @@ present in the citation."
(`(,f . ,_) f)
(_ (user-error "Cannot find citation key: %S" key)))))
(org-open-file file '(4))
- (if (not (equal "json" (file-name-extension file)))
- (bibtex-search-entry key)
- (let ((regexp (rx "\"id\":" (0+ (any "[ \t]")) "\"" (literal key) "\"")))
- (goto-char (point-min))
- (re-search-forward regexp)
- (search-backward "{")))))
+ (pcase (file-name-extension file)
+ ("json"
+ (let ((regexp (rx "\"id\":" (0+ (any "[ \t]")) "\"" (literal key)
"\"")))
+ (goto-char (point-min))
+ (re-search-forward regexp)
+ (search-backward "{")))
+ (_
+ (bibtex-set-dialect)
+ (bibtex-search-entry key)))))
;;; "Insert" capability