forked from mirrors/org-mode
Merge branch 'maint'
This commit is contained in:
commit
21cf8d8e61
|
@ -116,6 +116,7 @@
|
||||||
(declare-function org-element-set-element "org-element" (old new))
|
(declare-function org-element-set-element "org-element" (old new))
|
||||||
(declare-function org-element-type "org-element" (element))
|
(declare-function org-element-type "org-element" (element))
|
||||||
(declare-function org-element-update-syntax "org-element" ())
|
(declare-function org-element-update-syntax "org-element" ())
|
||||||
|
(declare-function org-end-of-meta-data "org" (&optional full))
|
||||||
(declare-function org-entry-get "org" (pom property &optional inherit literal-nil))
|
(declare-function org-entry-get "org" (pom property &optional inherit literal-nil))
|
||||||
(declare-function org-export-create-backend "ox" (&rest rest) t)
|
(declare-function org-export-create-backend "ox" (&rest rest) t)
|
||||||
(declare-function org-export-data-with-backend "ox" (data backend info))
|
(declare-function org-export-data-with-backend "ox" (data backend info))
|
||||||
|
@ -2320,16 +2321,17 @@ is an integer, 0 means `-', 1 means `+' etc. If WHICH is
|
||||||
|
|
||||||
(defun org-toggle-checkbox (&optional toggle-presence)
|
(defun org-toggle-checkbox (&optional toggle-presence)
|
||||||
"Toggle the checkbox in the current line.
|
"Toggle the checkbox in the current line.
|
||||||
With prefix arg TOGGLE-PRESENCE, add or remove checkboxes. With
|
|
||||||
double prefix, set checkbox to [-].
|
With prefix argument TOGGLE-PRESENCE, add or remove checkboxes.
|
||||||
|
With a double prefix argument, set the checkbox to \"[-]\".
|
||||||
|
|
||||||
When there is an active region, toggle status or presence of the
|
When there is an active region, toggle status or presence of the
|
||||||
first checkbox there, and make every item inside have the same
|
first checkbox there, and make every item inside have the same
|
||||||
status or presence, respectively.
|
status or presence, respectively.
|
||||||
|
|
||||||
If the cursor is in a headline, apply this to all checkbox items
|
If point is on a headline, apply this to all checkbox items in
|
||||||
in the text below the heading, taking as reference the first item
|
the text below the heading, taking as reference the first item in
|
||||||
in subtree, ignoring drawers."
|
subtree, ignoring planning line and any drawer following it."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let* (singlep
|
(let* (singlep
|
||||||
|
@ -2353,15 +2355,10 @@ in subtree, ignoring drawers."
|
||||||
(error "No item in region"))
|
(error "No item in region"))
|
||||||
(setq lim-down (copy-marker limit))))
|
(setq lim-down (copy-marker limit))))
|
||||||
((org-at-heading-p)
|
((org-at-heading-p)
|
||||||
;; On an heading, start at first item after drawers and
|
;; On a heading, start at first item after drawers and
|
||||||
;; time-stamps (scheduled, etc.).
|
;; time-stamps (scheduled, etc.).
|
||||||
(let ((limit (save-excursion (outline-next-heading) (point))))
|
(let ((limit (save-excursion (outline-next-heading) (point))))
|
||||||
(forward-line 1)
|
(org-end-of-meta-data t)
|
||||||
(while (or (looking-at org-drawer-regexp)
|
|
||||||
(looking-at keyword-re))
|
|
||||||
(if (looking-at keyword-re)
|
|
||||||
(forward-line 1)
|
|
||||||
(re-search-forward "^[ \t]*:END:" limit nil)))
|
|
||||||
(if (org-list-search-forward (org-item-beginning-re) limit t)
|
(if (org-list-search-forward (org-item-beginning-re) limit t)
|
||||||
(setq lim-up (point-at-bol))
|
(setq lim-up (point-at-bol))
|
||||||
(error "No item in subtree"))
|
(error "No item in subtree"))
|
||||||
|
|
Loading…
Reference in New Issue