ソースを参照

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 11 年 前
コミット
aff6a10aac
1 ファイル変更1 行追加1 行削除
  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))))))