mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-24 07:20:29 +00:00
`org-cycle-item-indentation' works only on empty items.
* org-list.el (org-cycle-item-indentation): Cycle when the whole item only contains bullet and maybe a checkbox. Previously, TAB would cycle when the first line of the item was blank.
This commit is contained in:
parent
7c424b33ea
commit
eabb018913
@ -927,9 +927,11 @@ Assumes cursor in item line."
|
||||
(defun org-cycle-item-indentation ()
|
||||
(let ((org-suppress-item-indentation t)
|
||||
(org-adapt-indentation nil))
|
||||
(when (and (looking-at "[ \t]*$")
|
||||
(or (org-at-description-p) (org-at-item-checkbox-p) (org-at-item-p))
|
||||
(>= (match-end 0) (save-excursion (skip-chars-backward " \r\t\n") (point))))
|
||||
(when (and (or (org-at-description-p) (org-at-item-checkbox-p) (org-at-item-p))
|
||||
(>= (match-end 0) (save-excursion
|
||||
(org-end-of-item-text-before-children)
|
||||
(skip-chars-backward " \r\t\n")
|
||||
(point))))
|
||||
(setq this-command 'org-cycle-item-indentation)
|
||||
;; When in the middle of the cycle, try to outdent first. If it
|
||||
;; fails, and point is still at initial position, indent. Else,
|
||||
|
Loading…
Reference in New Issue
Block a user