fix(org): respect org-insert-heading-hook in +org--insert-item
Doom replaces `org-insert-heading`, but its replacement does not respect `org-insert-heading-hook`. This commit fixes that, enabling folks to customize their insert-heading behavior, e.g. adding a time stamp: (defun my/org-set-creation-date-heading-property () (save-excursion (org-back-to-heading) (org-set-property "CREATED" (format-time-string "[%Y-%m-%d %T]")))) (add-hook 'org-insert-heading-hook #'my/org-set-creation-date-heading-property) Ref: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org.el#n6187 Ref: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org.el#n1615
This commit is contained in:
parent
e1ef4cc001
commit
d156e58577
1 changed files with 1 additions and 0 deletions
|
@ -90,6 +90,7 @@
|
||||||
(org-back-to-heading)
|
(org-back-to-heading)
|
||||||
(insert (make-string level ?*) " ")
|
(insert (make-string level ?*) " ")
|
||||||
(save-excursion (insert "\n"))))
|
(save-excursion (insert "\n"))))
|
||||||
|
(run-hooks 'org-insert-heading-hook)
|
||||||
(when-let* ((todo-keyword (org-element-property :todo-keyword context))
|
(when-let* ((todo-keyword (org-element-property :todo-keyword context))
|
||||||
(todo-type (org-element-property :todo-type context)))
|
(todo-type (org-element-property :todo-type context)))
|
||||||
(org-todo
|
(org-todo
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue