org-dynamic-block-insert-dblock: Do not call non-commands interactively
* lisp/org.el (org-dynamic-block-insert-dblock): When insert command for a dynamic block is not interactive, do not try to call it interactively. Reported-by: chris <inkbottle007@gmail.com> Link: https://orgmode.org/list/5790810.DvuYhMxLoT@nixos
This commit is contained in:
parent
85aafac417
commit
d6c3ab08b4
|
@ -8796,7 +8796,7 @@ is non-nil, call the dynamic block function interactively."
|
|||
(pcase (org-dynamic-block-function type)
|
||||
(`nil (error "No such dynamic block: %S" type))
|
||||
((and f (pred functionp))
|
||||
(if interactive-p (call-interactively f) (funcall f)))
|
||||
(if (and interactive-p (commandp f)) (call-interactively f) (funcall f)))
|
||||
(_ (error "Invalid function for dynamic block %S" type))))
|
||||
|
||||
(defun org-dblock-update (&optional arg)
|
||||
|
|
Loading…
Reference in New Issue