Ver código fonte

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 anos atrás
pai
commit
aff6a10aac
1 arquivos alterados com 1 adições e 1 exclusões
  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))))))