Browse Source

org-bibtex.el (org-bibtex-headline): Fix insertion of keywords

* org-bibtex.el (org-bibtex-headline): Fix insertion of
keywords of unknown BibTeX entries.

TINYCHANGE
Leonard Randall 7 years ago
parent
commit
24a1f7295c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/org-bibtex.el

+ 3 - 1
lisp/org-bibtex.el

@@ -371,7 +371,9 @@ This variable is relevant only if `org-bibtex-tags-are-keywords' is t."
 	    (bibtex-beginning-of-entry)
 	    (if (re-search-forward "keywords.*=.*{\\(.*\\)}" nil t)
 		(progn (goto-char (match-end 1)) (insert ", "))
-	      (ignore-errors (bibtex-make-field "keywords" t t)))
+	      (progn (re-search-forward ",\\(\n\\)" nil t) 
+		     (insert "  keywords={},\n"))
+	      (re-search-backward "}," nil t))
 	    (insert (mapconcat #'identity tags ", ")))
 	  (buffer-string))))))