emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Bug: Blank line when logging state changes [9.0.9 (9.0.9-692-gfbf31d


From: Dale Sedivec
Subject: [O] Bug: Blank line when logging state changes [9.0.9 (9.0.9-692-gfbf31d.dirty-elpaplus @ /tmp/emacs/.emacs.d/elpa/org-plus-contrib-20170801/)]
Date: Tue, 1 Aug 2017 11:27:05 -0500

Hi!

I think a recent change to org-split-string in master may have made logging of state changes a little uglier, adding "\\" and an empty line with trailing whitespace.  Steps to reproduce:

1. Start fresh Emacs with no local configuration (e.g. mkdir /tmp/emacs && HOME=/tmp/emacs emacs)

2. Install org-plus-contrib package dated 20170731

3. Create an org file with the following two lines:

~~~~~~
#+TODO: TODO(!) DONE(!)
* Test
~~~~~~

4. Move point to the beginning of the "* Test" headline and call org-todo with C-c C-t to change it to a TODO item

Expected result:

~~~~~~
* TODO Test
  - State "TODO"       from              [2017-08-01 Tue 11:18]
~~~~~~

Actual result:

~~~~~~
* TODO Test
  - State "TODO"       from              [2017-08-01 Tue 11:18] \\
    
~~~~~~

Note the " \\" and blank line with trailing whitespace in the actual result.

I strongly suspect this is a result of a change in behavior of org-split-string in f776e65373.  Before that commit, calling

    (org-split-string "" "\n")

as org-store-log-note is doing returned nil.  After f776e65373 it returns '("").

IMHO the new behavior of org-split-string actually seems correct to me (splitting a string should arguably never result in nil), so I've fixed this by patching org-store-log-note as demonstrated in the attached patch.

Regards,
Dale

Attachment: org-store-log-note.diff
Description: Text document


reply via email to

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