Function: embark-org-copy-block-contents

embark-org-copy-block-contents is an interactive and byte-compiled function defined in embark-org.el.

Signature

(embark-org-copy-block-contents)

Documentation

Save contents of source block at point to the kill-ring.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark-org.el
;;; Source blocks

(defun embark-org-copy-block-contents ()
  "Save contents of source block at point to the `kill-ring'."
  (interactive)
  (when (org-in-src-block-p)
    (let ((contents (nth 2 (org-src--contents-area (org-element-at-point)))))
    (with-temp-buffer
      (insert contents)
      (org-do-remove-indentation)
      (kill-new (buffer-substring (point-min) (point-max)))))))