Function: org-roam--promote-entire-buffer-internal

org-roam--promote-entire-buffer-internal is a byte-compiled function defined in org-roam-node.el.

Signature

(org-roam--promote-entire-buffer-internal)

Documentation

Promote the current buffer.

Source Code

;; Defined in ~/.emacs.d/elpa/org-roam-20260224.1637/org-roam-node.el
(defun org-roam--promote-entire-buffer-internal ()
  "Promote the current buffer."
  (unless (org-roam--buffer-promoteable-p)
    (user-error "Cannot promote: multiple root headings or there is extra file-level text"))
  (org-with-point-at 1
    (let ((title (nth 4 (org-heading-components)))
          (tags (org-get-tags)))
      (org-fold-show-all)
      (kill-whole-line)
      (org-roam-end-of-meta-data t)
      (insert "#+title: " title "\n")
      (when tags (org-roam-tag-add tags))
      (org-map-region #'org-promote (point-min) (point-max)))))