Function: org-export-copy-buffer

org-export-copy-buffer is a byte-compiled function defined in ox.el.gz.

Signature

(org-export-copy-buffer &key TO-BUFFER DROP-VISIBILITY DROP-NARROWING DROP-CONTENTS DROP-LOCALS)

Documentation

Return a copy of the current buffer.

This function calls org-element-copy-buffer, passing the same arguments TO-BUFFER, DROP-VISIBILITY, DROP-NARROWING, DROP-CONTENTS, and DROP-LOCALS.

In addition, buffer-local variables are set according to #+BIND: keywords.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
(cl-defun org-export-copy-buffer (&key to-buffer drop-visibility
                                       drop-narrowing drop-contents
                                       drop-locals)
  "Return a copy of the current buffer.
This function calls `org-element-copy-buffer', passing the same
arguments TO-BUFFER, DROP-VISIBILITY, DROP-NARROWING, DROP-CONTENTS,
and DROP-LOCALS.

In addition, buffer-local variables are set according to #+BIND:
keywords."
  (let ((new-buf (org-element-copy-buffer
                  :to-buffer to-buffer
                  :drop-visibility drop-visibility
                  :drop-narrowing drop-narrowing
                  :drop-contents drop-contents
                  :drop-locals drop-locals)))
    (let ((bind-variables (org-export--list-bound-variables)))
      (with-current-buffer new-buf
        (org-export--set-variables bind-variables)))
    new-buf))