Browse Source

Do not export TYPE property as field when allowing arbitrary fields

* lisp/org-bibtex.el (org-bibtex-headline): Don't export TYPE property
  as field
Matt Lundin 10 years ago
parent
commit
c446b4dfbe
1 changed files with 7 additions and 5 deletions
  1. 7 5
      lisp/org-bibtex.el

+ 7 - 5
lisp/org-bibtex.el

@@ -312,11 +312,13 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t."
 				  org-bibtex-prefix)
 			     (mapcar 
 			      (lambda (kv)
-				(when (string-match org-bibtex-prefix (car kv))
-				  (cons (downcase (replace-regexp-in-string 
-						   org-bibtex-prefix ""
-						   (car kv)))
-					(cdr kv))))
+				(let ((key (car kv)) (val (cdr kv)))
+				  (when (and (string-match org-bibtex-prefix key)
+					     (not (equalp 
+						   (concat org-bibtex-prefix "TYPE") key)))
+				    (cons (downcase (replace-regexp-in-string 
+						     org-bibtex-prefix "" key))
+					  val))))
 			      (org-entry-properties nil 'standard))
 			   (mapcar
 			    (lambda (field)