org.el (org-add-planning-info): Remove spurious blank line
* org.el (org-add-planning-info): Remove spurious blank line left after "unclosing" an entry.
This commit is contained in:
parent
25a974a231
commit
92e823c43d
|
@ -13532,9 +13532,14 @@ WHAT entry will also be removed."
|
||||||
(otherwise (error "Invalid planning type: %s" type)))
|
(otherwise (error "Invalid planning type: %s" type)))
|
||||||
(line-end-position) t))
|
(line-end-position) t))
|
||||||
(replace-match "")
|
(replace-match "")
|
||||||
(when (looking-at "--+<[^>]+>") (replace-match ""))))
|
(when (looking-at "--+<[^>]+>") (replace-match ""))
|
||||||
|
(when (and (not what) (eq type 'closed))
|
||||||
|
(save-excursion
|
||||||
|
(beginning-of-line)
|
||||||
|
(if (looking-at "[ \t]*$")
|
||||||
|
(delete-region (point) (1+ (point-at-eol)))))))
|
||||||
;; Remove leading white spaces.
|
;; Remove leading white spaces.
|
||||||
(when (looking-at "[ \t]+") (replace-match "")))
|
(when (and (not (bolp)) (looking-at "[ \t]+")) (replace-match ""))))
|
||||||
((not what) (throw 'exit nil)) ; Nothing to do.
|
((not what) (throw 'exit nil)) ; Nothing to do.
|
||||||
(t (insert-before-markers "\n")
|
(t (insert-before-markers "\n")
|
||||||
(backward-char 1)
|
(backward-char 1)
|
||||||
|
|
Loading…
Reference in New Issue