How to copy org file to other buffer, if source is:
** TODO task #1
- some text for task #1
** TODO task #2
- some text for task #2
but when you collapse all tasks it will look like
** TODO task #1 ...
** TODO task #2 ...
I want to mark all tasks and copy to another buffer and it must look like a second variant. Don’t include texts for tasks which stored inside every task.
How i can to do it ?
As per Hendy’s comment, in current versions of org-mode you use
org-copy-visible(C-c C-x v) to copy the visible content of the current region to the kill ring. (C-x hcan be used first to mark the entire buffer, as usual.)In addition, note that the export dispatch menu (
C-x C-e) provides a “Visible only” switch, if you want to export that content to a different format.For older versions of org-mode, the original answer below should still apply:
M-x org-export-visible RET SPCwill copy only the currently-visible text of your org-mode buffer into a new buffer.If you wanted to bind that (to
C-c oin this example), you could use the following: