Преглед изворни кода

Fix empty-line problem after repeating entry

Tom writes:

> if I have a heading like this:
>
>
> ** TODO test task
> stuff
>  SCHEDULED: <2010-05-15 Sat 07:35 +1d>
>
>
> Then an empty line is inserted below the heading (before "stuff") if
> org-indent-mode is on and logging is set like this:
>
>
> (setq org-log-repeat nil)
> (setq org-log-done 'time)
>
>
>
> I tested it with a clean config using only the settings above.
Carsten Dominik пре 15 година
родитељ
комит
d180631686
2 измењених фајлова са 4 додато и 1 уклоњено
  1. 3 0
      lisp/ChangeLog
  2. 1 1
      lisp/org.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2010-05-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org.el (org-add-planning-info): Remove the empty line also
+	if there is no whitespace at all in there.
+
 	* org-table.el (org-table-align): Fix alignment of strings
 	with invisible characters.
 

+ 1 - 1
lisp/org.el

@@ -11360,7 +11360,7 @@ be removed."
 	      (end-of-line 1))
 	    (goto-char (point-min))
 	    (widen)
-	    (if (and (looking-at "[ \t]+\n")
+	    (if (and (looking-at "[ \t]*\n")
 		     (equal (char-before) ?\n))
 		(delete-region (1- (point)) (point-at-eol)))
 	    ts))))))