Skip over unimportant contexts in +org/dwim-at-point
This commit is contained in:
parent
ce17ecd239
commit
3c05966347
1 changed files with 4 additions and 0 deletions
|
@ -46,6 +46,10 @@ If on a:
|
|||
(let* ((scroll-pt (window-start))
|
||||
(context (org-element-context))
|
||||
(type (org-element-type context)))
|
||||
;; skip over unimportant contexts
|
||||
(while (and context (memq type '(verbatim code bold italic underline strike-through)))
|
||||
(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))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue