소스 검색

Daniel Clemente writes:

      Consider a file with 2 lines:

     ------------------
     **** heading

     ------------------

      Place the cursor at line 2 (where you can type). Then use C-c C-x C-i
      to start a clock.

      You have now 3 lines:

     ------------------
     **** heading
         CLOCK: [2009-02-07 sb 01:06]

     ------------------

      However, the cursor is still placed at line 2, like before. I think
      it would be more useful if it were moved to line 3 so that you can
      start writing right away, just as before.  This saves you the C-n
      needed to move again to a blank line.

This commit implements exactly this request.
Carsten Dominik 16 년 전
부모
커밋
f993ecd67d
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      lisp/ChangeLog
  2. 2 1
      lisp/org-clock.el

+ 1 - 0
lisp/ChangeLog

@@ -2,6 +2,7 @@
 
 	* org-clock.el (org-clock-find-position): Do not swallow an item
 	less indented than the CLOCK line itself.
+	(org-clock-in): Push markers to lin after the clock line.
 
 	* org-exp.el (org-html-level-start): Add a CSS class to section
 	numbers.

+ 2 - 1
lisp/org-clock.el

@@ -354,7 +354,8 @@ the clocking selection, associated with the letter `d'."
 	      (sit-for 2)
 	      (throw 'abort nil))
 	     (t
-	      (insert "\n") (backward-char 1)
+	      (insert-before-markers "\n")
+	      (backward-char 1)
 	      (org-indent-line-function)
 	      (insert org-clock-string " ")
 	      (setq org-clock-start-time (current-time))