M-x org-export-visible RET SPC
will copy only the currently-visible text of your org-mode buffer into a new buffer.
org-export-visible is an interactive compiled Lisp function in
`org-exp.el'.
(org-export-visible TYPE ARG)
Create a copy of the visible part of the current buffer, and export it.
The copy is created in a temporary buffer and removed after use.
TYPE is the final key (as a string) that also select the export command in
the `C-c C-e' export dispatcher.
As a special case, if the you type SPC at the prompt, the temporary
org-mode file will not be removed but presented to you so that you can
continue to use it. The prefix arg ARG is passed through to the exporting
command.
If you wanted to bind that (to C-c o
in this example), you could use the following:
(add-hook 'org-mode-hook 'my-org-mode-hook)
(defun my-org-mode-hook ()
"Custom behaviours when entering org-mode."
(local-set-key (kbd "C-c o") (function (lambda () (interactive)
(org-export-visible ?\s nil)))))