Ver código fonte

org-bibtex-read: Fix regression from f7d6db1bf

* lisp/ol-bibtex.el (org-bibtex-read): Make sure that the return value
is the updated `org-bibtex-entries'.  Document the return value
requirement.  The assumption about the return value is used by
`org-bibtex-yank'.

Fixes https://list.orgmode.org/86zgn689m5.fsf@krailli2.fritz.box/T/#u
Ihor Radchenko 3 anos atrás
pai
commit
7543da991f
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      lisp/ol-bibtex.el

+ 4 - 2
lisp/ol-bibtex.el

@@ -655,7 +655,8 @@ With a prefix arg, query for optional fields."
 
 (defun org-bibtex-read ()
   "Read a bibtex entry and save to `org-bibtex-entries'.
-This uses `bibtex-parse-entry'."
+This uses `bibtex-parse-entry'.
+Return the new value of `org-bibtex-entries'."
   (interactive)
   (let ((keyword (lambda (str) (intern (concat ":" (downcase str)))))
 	(clean-space (lambda (str) (replace-regexp-in-string
@@ -678,7 +679,8 @@ This uses `bibtex-parse-entry'."
                    (funcall clean-space (funcall strip-delim (cdr pair)))))
            (save-excursion (bibtex-beginning-of-entry) (bibtex-parse-entry)))
           org-bibtex-entries)
-    (unless (car org-bibtex-entries) (pop org-bibtex-entries))))
+    (unless (car org-bibtex-entries) (pop org-bibtex-entries))
+    org-bibtex-entries))
 
 (defun org-bibtex-read-buffer (buffer)
   "Read all bibtex entries in BUFFER and save to `org-bibtex-entries'.