From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: Any easy way to use multiple indirect buffers based on subtrees? Date: Tue, 04 Sep 2018 20:11:38 -0400 Message-ID: <87o9dcx0p1.fsf@kyleam.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxLQC-0004QY-Vw for emacs-orgmode@gnu.org; Tue, 04 Sep 2018 20:11:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fxLQ9-0000Lg-RI for emacs-orgmode@gnu.org; Tue, 04 Sep 2018 20:11:48 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:61979) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fxLQ9-0000Ih-EX for emacs-orgmode@gnu.org; Tue, 04 Sep 2018 20:11:45 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Cody Goodman , emacs-orgmode@gnu.org 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 =E2=80=98C-u=E2=80=99 prefix,= or when =E2=80=98org-indirect-buffer-display=E2=80=99 is =E2=80=98new-frame=E2= =80=99, 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 (&optional 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--- --=20 Kyle