From aff6a10aac5ebb0bec50187fd4039424c23ead82 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sat, 19 Apr 2014 16:40:11 +0200 Subject: [PATCH] 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. --- lisp/org-bibtex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el index 71a04ef03..78520f2e6 100644 --- a/lisp/org-bibtex.el +++ b/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))))))