path: root/contrib/lisp/org-bibtex-extras.el
diff options
authorS├ębastien Delafond <>2016-11-07 10:41:54 +0100
committerS├ębastien Delafond <>2016-11-07 10:41:54 +0100
commitec84430cf4e09ba25ec675debdf802bc28111e06 (patch)
tree9c64bc8a0cd5e8cac82aa5fdf369d40529f140f8 /contrib/lisp/org-bibtex-extras.el
parent84539dca3aa301ecfe48858eceef1ced0505388b (diff)
Imported Upstream version 9.0
Diffstat (limited to 'contrib/lisp/org-bibtex-extras.el')
1 files changed, 7 insertions, 5 deletions
diff --git a/contrib/lisp/org-bibtex-extras.el b/contrib/lisp/org-bibtex-extras.el
index 7b0a89d..587aa67 100644
--- a/contrib/lisp/org-bibtex-extras.el
+++ b/contrib/lisp/org-bibtex-extras.el
@@ -61,6 +61,8 @@
;;; Code:
(require 'org-bibtex)
+(declare-function org-trim "org" (s &optional keep-lead))
(defcustom obe-bibtex-file nil "File holding bibtex entries.")
(defcustom obe-html-link-base nil
@@ -91,7 +93,7 @@ For example, to point to your `obe-bibtex-file' use the following.
(mapconcat (lambda (c) (format "[[%s#%s][%s]]" obe-html-link-base c c))
- (mapcar #'org-babel-trim
+ (mapcar #'org-trim
(split-string (match-string 1) ",")) ", "))))))
(defun obe-meta-to-json (meta &optional fields)
@@ -111,12 +113,12 @@ For example, to point to your `obe-bibtex-file' use the following.
(add (remove-duplicates (col field) :test #'string=)))
;; build the links in the graph
(dolist (citation meta)
- (let ((dest (id (cdr (assoc :title citation)))))
- (dolist (author (mapcar #'id (cdr (assoc :authors citation))))
+ (let ((dest (id (cdr (assq :title citation)))))
+ (dolist (author (mapcar #'id (cdr (assq :authors citation))))
(when author (push (cons author dest) links)))
- (let ((jid (id (cdr (assoc :journal citation)))))
+ (let ((jid (id (cdr (assq :journal citation)))))
(when jid (push (cons jid dest) links)))
- (let ((cid (id (cdr (assoc :category citation)))))
+ (let ((cid (id (cdr (assq :category citation)))))
(when cid (push (cons cid dest) links)))))
;; build the json string
(format "{\"nodes\":[%s],\"links\":[%s]}"