Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Emacs org-mode, how to narrow display to two subtrees in two separate files?

Tags:

I work with my frame split into two windows. I have two org-mode files open, each with subtrees I want to display in isolation.

I can do this successfully with a single subtree by navigating to Heading 1 in file-1.org and invoking the command org-tree-to-indirect-buffer.

But when I go to the second file in the second frame, navigate to the heading I want, and execute org-tree-to-indirect-buffer on that tree, it displays that subtree, BUT - in the first frame, it also unfocuses my subtree back to the main file.

How do I simultaneously view two subtrees in two separate files?

like image 976
incandescentman Avatar asked Jun 17 '13 20:06

incandescentman


1 Answers

Narrowing

Try narrowing instead:

(org-narrow-to-subtree) : C-x n s

then

(widen) : C-x n w

when you're done


org-tree-to-indirect-buffer

Alternatively, if you must use org-tree-to-indirect-buffer, it looks like you could also do this:

(setq org-indirect-buffer-display 'current-window)

C-u M-x org-tree-to-indirect-buffer

Where the normal action is to prevent buffer proliferation, but with the universal arg it will open a 2nd subtree without trashing the previous buffer. Check C-h f org-tree-to-indirect-buffer for full details.

like image 54
assem Avatar answered Oct 09 '22 11:10

assem