Re: [O] Any easy way to use multiple indirect buffers based on subtrees?

2018-09-13 Thread Adam Porter
In addition to Kyle's suggestion, you may find Helm useful, as commands
like helm-org-in-buffer-headings have an "Open in indirect buffer"
action, which makes it easy to open subtrees in indirect buffers.
helm-org-rifle can also do this.

If there are certain subtrees you often work with together, you could
write a function to open certain entries by UUID in indirect buffers,
then arrange the buffers into frames/windows accordingly.




Re: [O] Any easy way to use multiple indirect buffers based on subtrees?

2018-09-04 Thread Kyle Meyer
Cody Goodman  writes:

> I would like to be able to create N indirect buffers per subtree because I
> like working on each subtree in it's own eyebrowse workspace. Does anyone
> already do this? I didn't see config options to achieve what I wanted, so
> wanted to ask here before I look at the indirect buffer implementation to
> figure out how to do this.

I'm not sure I'm reading your question correctly, but does a C-u before
org-tree-to-indirect-buffer do what you want?  From
org-tree-to-indirect-buffer's docstring:

However, when you call the command with a ‘C-u’ prefix, or when
‘org-indirect-buffer-display’ is ‘new-frame’, the last buffer is
kept so that you can work with several indirect buffers at the same
time.

I prefer to reverse the meaning of the prefix argument, so I define the
following wrapper in my config:

--8<---cut here---start->8---
(defun km/org-tree-to-indirect-buffer ( arg)
  "Run `org-tree-to-indirect-buffer', keeping previous buffer.
By default, `org-tree-to-indirect-buffer' deletes the previous
indirect buffer when making a new one to avoid accumulating
buffers, which can be overriden by a C-u prefix. Reverse this
behavior so that the prefix must be given in order to delete the
previous indirect buffer. If the argument is a number, which has
a different meaning, it is left untouched."
  (interactive "P")
  (unless (numberp arg)
(setq arg (not arg)))
  (org-tree-to-indirect-buffer arg))
--8<---cut here---end--->8---

-- 
Kyle



[O] Any easy way to use multiple indirect buffers based on subtrees?

2018-09-04 Thread Cody Goodman
I would like to be able to create N indirect buffers per subtree because I
like working on each subtree in it's own eyebrowse workspace. Does anyone
already do this? I didn't see config options to achieve what I wanted, so
wanted to ask here before I look at the indirect buffer implementation to
figure out how to do this.

Thanks,

Cody