瀏覽代碼

org.el: fix issues with timestamps: insert them at the same position.

* install/git/org-mode/lisp/org.el (org-add-planning-info): fix
issues with timestamps not being inserted at the same position.
Bastien Guerry 14 年之前
父節點
當前提交
5fb8c750fb
共有 1 個文件被更改,包括 2 次插入5 次删除
  1. 2 5
      lisp/org.el

+ 2 - 5
lisp/org.el

@@ -11828,7 +11828,6 @@ be removed."
 	    (setq list (cons what remove))
 	    (while list
 	      (setq elt (pop list))
-	      (goto-char (point-min))
 	      (when (or (and (eq elt 'scheduled)
 			     (re-search-forward org-scheduled-time-regexp nil t))
 			(and (eq elt 'deadline)
@@ -11836,10 +11835,8 @@ be removed."
 			(and (eq elt 'closed)
 			     (re-search-forward org-closed-time-regexp nil t)))
 		(replace-match "")
-		(if (looking-at "--+<[^>]+>") (replace-match ""))
-		(skip-chars-backward " ")
-		(if (looking-at " +") (replace-match ""))))
-	    (goto-char (point-max))
+		(if (looking-at "--+<[^>]+>") (replace-match ""))))
+	    (and (looking-at "^[ \t]+") (replace-match ""))
 	    (and org-adapt-indentation (bolp) (org-indent-to-column col))
 	    (when what
 	      (insert