Browse Source

Fix `org-store-log-note'

* lisp/org.el (org-store-log-note): Ignore empty log buffers.

The regression was introduced in
f776e65373fa135fffb51e201698823fbfb3865b. From then, (org-split-string
"") no longer returns nil.

Suggested-by: Dale Sedivec <dale@codefu.org>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00013.html>
Nicolas Goaziou 7 years ago
parent
commit
80d7025770
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -13640,7 +13640,7 @@ EXTRA is additional text that will be inserted into the notes buffer."
       (setq txt (replace-match "" t t txt)))
     (when (string-match "\\s-+\\'" txt)
       (setq txt (replace-match "" t t txt)))
-    (setq lines (org-split-string txt "\n"))
+    (setq lines (and (not (equal "" txt)) (org-split-string txt "\n")))
     (when (org-string-nw-p note)
       (setq note
 	    (org-replace-escapes