Function: org-update-dblock
org-update-dblock is an interactive and byte-compiled function defined
in org.el.gz.
Signature
(org-update-dblock)
Documentation
Update the dynamic block at point.
This means to empty the block, parse for parameters and then call the correct writing function.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-update-dblock ()
"Update the dynamic block at point.
This means to empty the block, parse for parameters and then call
the correct writing function."
(interactive)
(save-excursion
(let* ((win (selected-window))
(pos (point))
(line (org-current-line))
(params
;; Called for side effect.
(org-prepare-dblock))
(name (plist-get params :name))
(indent (plist-get params :indentation-column))
(cmd (intern (concat "org-dblock-write:" name))))
(message "Updating dynamic block `%s' at line %d..." name line)
(funcall cmd params)
(message "Updating dynamic block `%s' at line %d...done" name line)
(goto-char pos)
(when (and indent (> indent 0))
(setq indent (make-string indent ?\ ))
(save-excursion
(select-window win)
(org-beginning-of-dblock)
(forward-line 1)
(while (not (looking-at org-dblock-end-re))
(insert indent)
(forward-line 1))
(when (looking-at org-dblock-end-re)
(and (looking-at "[ \t]+")
(replace-match ""))
(insert indent)))))))