emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org f7d6db1 16/22: org-bibtex-read: Do not add


From: ELPA Syncer
Subject: [elpa] externals-release/org f7d6db1 16/22: org-bibtex-read: Do not add nil when there is no entry at point
Date: Mon, 27 Sep 2021 15:57:35 -0400 (EDT)

branch: externals-release/org
commit f7d6db1bf6c479fa537f198c791851e248e5cdb1
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Bastien <bzg@gnu.org>

    org-bibtex-read: Do not add nil when there is no entry at point
    
    * lisp/ol-bibtex.el (org-bibtex-read): Previously, when there is no
    entry at point, `nil' would be added to `org-bibtex-entries' causing
    errors later, i.e. upon calling org-bibtex-write.  Now, nil is never
    pushed to `org-bibtex-entries'.
    
    Fixes https://orgmode.org/list/874kd3288n.fsf@yandex.com
---
 lisp/ol-bibtex.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ol-bibtex.el b/lisp/ol-bibtex.el
index 6b59121..0c88de0 100644
--- a/lisp/ol-bibtex.el
+++ b/lisp/ol-bibtex.el
@@ -674,7 +674,8 @@ This uses `bibtex-parse-entry'."
                        (_ field)))
                    (funcall clean-space (funcall strip-delim (cdr pair)))))
            (save-excursion (bibtex-beginning-of-entry) (bibtex-parse-entry)))
-          org-bibtex-entries)))
+          org-bibtex-entries)
+    (unless (car org-bibtex-entries) (pop org-bibtex-entries))))
 
 (defun org-bibtex-read-buffer (buffer)
   "Read all bibtex entries in BUFFER and save to `org-bibtex-entries'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]