lang/org: RET on TOC will now refresh the TOC

This commit is contained in:
Henrik Lissner 2019-03-02 01:57:54 -05:00
parent 9ed9daa79f
commit 8a57d9b5fd
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -83,7 +83,11 @@ If on a:
(org-toggle-checkbox (if (equal match "[ ]") '(16))))) (org-toggle-checkbox (if (equal match "[ ]") '(16)))))
(`headline (`headline
(cond ((org-element-property :todo-type context) (cond ((and (fboundp 'toc-org-insert-toc)
(member "TOC" (org-get-tags)))
(toc-org-insert-toc)
(message "Updating table of contents"))
((org-element-property :todo-type context)
(org-todo (org-todo
(if (eq (org-element-property :todo-type context) 'done) (if (eq (org-element-property :todo-type context) 'done)
(or (car (+org-get-todo-keywords-for (org-element-property :todo-keyword context))) (or (car (+org-get-todo-keywords-for (org-element-property :todo-keyword context)))