Function: org-capture-place-template

org-capture-place-template is a byte-compiled function defined in org-capture.el.gz.

Signature

(org-capture-place-template &optional INHIBIT-WCONF-STORE)

Documentation

Insert the template at the target location, and display the buffer.

When INHIBIT-WCONF-STORE is non-nil, don't store the window configuration, as it may have been stored before.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-capture.el.gz
(defun org-capture-place-template (&optional inhibit-wconf-store)
  "Insert the template at the target location, and display the buffer.
When INHIBIT-WCONF-STORE is non-nil, don't store the window configuration, as it
may have been stored before."
  (unless inhibit-wconf-store
    (org-capture-put :return-to-wconf (current-window-configuration)))
  (delete-other-windows)
  (org-switch-to-buffer-other-window
   (org-capture-get-indirect-buffer (org-capture-get :buffer) "CAPTURE"))
  (widen)
  (org-fold-show-all)
  (goto-char (org-capture-get :pos))
  (setq-local outline-level 'org-outline-level)
  (pcase (org-capture-get :type)
    ((or `nil `entry) (org-capture-place-entry))
    (`table-line (org-capture-place-table-line))
    (`plain (org-capture-place-plain-text))
    (`item (org-capture-place-item))
    (`checkitem (org-capture-place-item)))
  (setq-local org-capture-current-plist org-capture-plist)
  (org-capture--run-template-functions :hook 'local)
  (org-capture-mode 1))