Browse Source

Docs: Improve consistency of checkbox command description.

Carsten Dominik 16 years ago
parent
commit
626e47ce7c
5 changed files with 20 additions and 7 deletions
  1. 4 0
      doc/ChangeLog
  2. 6 3
      doc/org.texi
  3. 5 0
      lisp/ChangeLog
  4. 2 3
      lisp/org-list.el
  5. 3 1
      lisp/org.el

+ 4 - 0
doc/ChangeLog

@@ -1,3 +1,7 @@
+2009-02-15  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.texi (Checkboxes): Update to changed command behavior.
+
 2009-02-12  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.texi (Tracking TODO state changes): Document storing state

+ 6 - 3
doc/org.texi

@@ -3695,11 +3695,14 @@ percentage of checkboxes checked (in the above example, this would be
 @table @kbd
 @kindex C-c C-c
 @item C-c C-c
-Toggle checkbox at point.  With a prefix argument, set it to @samp{[-]},
-which is considered to be an intermediate state.
+Toggle checkbox status or (with prefix arg) checkbox presence at point.  With
+double prefix argument, set it to @samp{[-]}, which is considered to be an
+intermediate state.
 @kindex C-c C-x C-b
 @item C-c C-x C-b
-Toggle checkbox status or (with prefix arg) checkbox presence at point.
+Toggle checkbox status or (with prefix arg) checkbox presence at point.  With
+double prefix argument, set it to @samp{[-]}, which is considered to be an
+intermediate state.
 @itemize @minus
 @item
 If there is an active region, toggle the first checkbox in the region

+ 5 - 0
lisp/ChangeLog

@@ -1,9 +1,14 @@
 2009-02-15  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-list.el (org-toggle-checkbox): Improve cursor positioning
+	after removing a checkbox.
+
 	* org.el (org-show-entry): Make this work correctly also if it is
 	the last entry in the file.
 	(org-end-of-line, org-beginning-of-line): Make prefix arg work, by
 	falling back to normal, default command.
+	(org-ctrl-c-ctrl-c): When called with prefix arg at a non-checkbox
+	item, call the checkbox toggler to get a box.
 
 	* org-list.el (org-toggle-checkbox): Make double prefix set the
 	checkbox to "[-]".

+ 2 - 3
lisp/org-list.el

@@ -266,7 +266,7 @@ text below the heading."
        ((org-on-heading-p)
 	(setq beg (point) end (save-excursion (outline-next-heading) (point))))
        ((org-at-item-checkbox-p)
-	(let ((pos (point)))
+	(save-excursion
 	  (if (equal toggle-presence '(4))
 	      (progn
 		(replace-match "")
@@ -276,8 +276,7 @@ text below the heading."
 	     (cond ((equal toggle-presence '(16)) "[-]")
 		   ((member (match-string 0) '("[ ]" "[-]")) "[X]")
 		   (t "[ ]"))
-	     t t))
-	  (goto-char pos))
+	     t t)))
 	(throw 'exit t))
        ((org-at-item-p)
 	;; add a checkbox

+ 3 - 1
lisp/org.el

@@ -13709,7 +13709,9 @@ This command does many different things, depending on context:
      ((org-at-item-checkbox-p)
       (call-interactively 'org-toggle-checkbox))
      ((org-at-item-p)
-      (call-interactively 'org-maybe-renumber-ordered-list))
+      (if arg
+	  (call-interactively 'org-toggle-checkbox)
+	(call-interactively 'org-maybe-renumber-ordered-list)))
      ((save-excursion (beginning-of-line 1) (looking-at "#\\+BEGIN:"))
       ;; Dynamic block
       (beginning-of-line 1)