summaryrefslogtreecommitdiff
path: root/lisp/org/org-bibtex.el
diff options
context:
space:
mode:
authorRasmus <rasmus@gmx.us>2017-09-18 12:01:12 +0200
committerRasmus <rasmus@gmx.us>2017-09-18 12:01:12 +0200
commitab351d442d7bb4d17cbb43638aaed1775d8c0344 (patch)
tree19da4c93526d3de543efe21a53ab2d098fb9f50b /lisp/org/org-bibtex.el
parent5490ccc5ebf39759dfd084bbd31f464701a3e775 (diff)
downloademacs-ab351d442d7bb4d17cbb43638aaed1775d8c0344.tar.gz
Update Org to v9.1.1
Please see etc/ORG-NEWS for major changes.
Diffstat (limited to 'lisp/org/org-bibtex.el')
-rw-r--r--lisp/org/org-bibtex.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el
index 9c10393c001..8876085fd77 100644
--- a/lisp/org/org-bibtex.el
+++ b/lisp/org/org-bibtex.el
@@ -237,6 +237,17 @@ a missing title field."
:version "24.1"
:type 'boolean)
+(defcustom org-bibtex-headline-format-function
+ (lambda (entry) (cdr (assq :title entry)))
+ "Function returning the headline text for `org-bibtex-write'.
+It should take a single argument, the bibtex entry (an alist as
+returned by `org-bibtex-read'). The default value simply returns
+the entry title."
+ :group 'org-bibtex
+ :version "26.1"
+ :package-version '(Org . "9.1")
+ :type 'function)
+
(defcustom org-bibtex-export-arbitrary-fields nil
"When converting to bibtex allow fields not defined in `org-bibtex-fields'.
This only has effect if `org-bibtex-prefix' is defined, so as to
@@ -678,7 +689,7 @@ Return the number of saved entries."
(val (lambda (field) (cdr (assoc field entry))))
(togtag (lambda (tag) (org-toggle-tag tag 'on))))
(org-insert-heading)
- (insert (funcall val :title))
+ (insert (funcall org-bibtex-headline-format-function entry))
(org-bibtex-put "TITLE" (funcall val :title))
(org-bibtex-put org-bibtex-type-property-name
(downcase (funcall val :type)))