3
votes

In org-mode, I can run org-tree-to-indirect-buffer to open a subtree in an indirect buffer and edit it in isolation.

When I'm done editing the subtree in the indirect buffer, what command do I run to close the buffer containing the subtree and return to the main buffer containing all my trees?

1
You can try <kbd>C-c `</kbd>, as it is the usual command to come back after editing parts of the document, as a code snippet in babel, for example. - Diego Sevilla
Yes, it seems to be the same file opened in another buffer with narrowing. The only option would be to kill the buffer with C-x k. In fact, you can edit the whole file in that buffer if you widen it (M-x widen), but you'll have two buffers with the same org file. - Diego Sevilla
Yes, they're made automatically in the previous buffer (the one that contains the whole file). You have to save the file eventually, but the changes also appear in the other buffer. - Diego Sevilla
For clarity, you might like to read what the manual says about indirect buffers: C-h i g (emacs) Indirect Buffers RET - phils
I believe I suggested that on account of the prior comments; as it seemed to me that not everyone was clear about how indirect buffers work (in general; rather than specifically in relation to the question). - phils

1 Answers

1
votes

When I am finished with an indirect buffer, I kill it (e.g. C-x k). Indirect buffers are used for other purposes as well as Org-mode.

https://www.gnu.org/software/emacs/manual/html_node/emacs/Indirect-Buffers.html said:

If you try to save the indirect buffer, that actually works by saving the base buffer. Killing the base buffer effectively kills the indirect buffer, but killing an indirect buffer has no effect on its base buffer.