lang/org: prioritize checkboxes lower in dwim command

Otherwise, checkboxes take priority over links, clocks or tables.
This commit is contained in:
Henrik Lissner 2019-07-13 02:24:11 +02:00
parent 05eb333a0c
commit e81cdc0523
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -78,10 +78,6 @@ If on a:
(setq context (org-element-property :parent context)
type (org-element-type context)))
(pcase type
((guard (org-element-property :checkbox (org-element-lineage context '(item) t)))
(let ((match (and (org-at-item-checkbox-p) (match-string 1))))
(org-toggle-checkbox (if (equal match "[ ]") '(16)))))
(`headline
(cond ((and (fboundp 'toc-org-insert-toc)
(member "TOC" (org-get-tags)))
@ -147,6 +143,10 @@ If on a:
(+org/refresh-inline-images)
(org-open-at-point))))
((guard (org-element-property :checkbox (org-element-lineage context '(item) t)))
(let ((match (and (org-at-item-checkbox-p) (match-string 1))))
(org-toggle-checkbox (if (equal match "[ ]") '(16)))))
(_ (+org/refresh-inline-images)))))
(defun +org-insert-item (direction)