From 1be13d57dc8357576a8285c6dadc03db9e3ed7b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Delafond?= Date: Tue, 25 Aug 2015 12:27:35 +0200 Subject: Imported Upstream version 8.3.1 --- contrib/lisp/org-bibtex-extras.el | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'contrib/lisp/org-bibtex-extras.el') diff --git a/contrib/lisp/org-bibtex-extras.el b/contrib/lisp/org-bibtex-extras.el index d392d2d..5f05039 100644 --- a/contrib/lisp/org-bibtex-extras.el +++ b/contrib/lisp/org-bibtex-extras.el @@ -75,25 +75,14 @@ For example, to point to your `obe-bibtex-file' use the following. "Return all citations from `obe-bibtex-file'." (or obe-citations (save-window-excursion - (find-file obe-bibtex-file) + (find-file (or obe-bibtex-file + (error "`obe-bibtex-file' has not been configured"))) (goto-char (point-min)) (while (re-search-forward " :CUSTOM_ID: \\(.+\\)$" nil t) (push (org-no-properties (match-string 1)) obe-citations)) obe-citations))) -(defun obe-goto-citation (&optional citation) - "Visit a citation given its ID." - (interactive) - (let ((citation (or citation - (org-icompleting-read "Citation: " - (obe-citations))))) - (find-file obe-bibtex-file) - (goto-char (point-min)) - (when (re-search-forward (format " :CUSTOM_ID: %s" citation) nil t) - (outline-previous-visible-heading 1) - t))) - (defun obe-html-export-citations () "Convert all \\cite{...} citations in the current file into HTML links." (save-excursion @@ -105,15 +94,6 @@ For example, to point to your `obe-bibtex-file' use the following. (mapcar #'org-babel-trim (split-string (match-string 1) ",")) ", ")))))) -(defun obe-get-meta-data (citation) - "Collect meta-data for CITATION." - (save-excursion - (when (obe-goto-citation citation) - (let ((pt (point))) - `((:authors . ,(split-string (org-entry-get pt "AUTHOR") " and " t)) - (:title . ,(org-no-properties (org-get-heading 1 1))) - (:journal . ,(org-entry-get pt "JOURNAL"))))))) - (defun obe-meta-to-json (meta &optional fields) "Turn a list of META data from citations into a string of json." (let ((counter 1) nodes links) -- cgit v1.2.1