Browse Source

org-bibtex: trimming whitespace off of bibtex fields read from properties

* lisp/org-bibtex.el (org-babel-trim): Declare this function to the
  compiler.
  (org-bibtex-get): Trimming whitespace off of bibtex fields read from
  properties.
Eric Schulte 10 years ago
parent
commit
407b87e9d9
1 changed files with 4 additions and 2 deletions
  1. 4 2
      lisp/org-bibtex.el

+ 4 - 2
lisp/org-bibtex.el

@@ -121,6 +121,7 @@
 (declare-function bibtex-parse-entry "bibtex" (&optional content))
 (declare-function bibtex-url "bibtex" (&optional pos no-browse))
 (declare-function longlines-mode "longlines" (&optional arg))
+(declare-function org-babel-trim "ob" (string &optional regexp))
 
 
 ;;; Bibtex data
@@ -277,8 +278,9 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t."
 
 ;;; Utility functions
 (defun org-bibtex-get (property)
-  (or (org-entry-get (point) (upcase property))
-      (org-entry-get (point) (concat org-bibtex-prefix (upcase property)))))
+  (org-babel-trim
+   (or (org-entry-get (point) (upcase property))
+       (org-entry-get (point) (concat org-bibtex-prefix (upcase property))))))
 
 (defun org-bibtex-put (property value)
   (let ((prop (upcase (if (keywordp property)