Browse Source

org-bibtex.el (org-bibtex-headline): Don't throw an error

* org-bibtex.el (org-bibtex-headline): Don't throw an error
when trying to add a keyword field to a BibTeX entry that is
not known by BibTeX or defined by the user.

Thanks to Leonard Randall for reporting this and suggesting a fix.
Bastien Guerry 5 years ago
parent
commit
aff6a10aac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org-bibtex.el

+ 1 - 1
lisp/org-bibtex.el

@@ -371,7 +371,7 @@ 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 ", "))
-	      (bibtex-make-field "keywords" t t))
+	      (ignore-errors (bibtex-make-field "keywords" t t)))
 	    (insert (mapconcat #'identity tags ", ")))
 	  (buffer-string))))))