From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: narrowing to subtree in navi-mode Date: Thu, 07 Nov 2013 22:37:52 +0100 Message-ID: <87ppqb99lb.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeXHK-0001nw-CC for emacs-orgmode@gnu.org; Thu, 07 Nov 2013 16:38:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VeXHD-00057J-2M for emacs-orgmode@gnu.org; Thu, 07 Nov 2013 16:38:14 -0500 Received: from plane.gmane.org ([80.91.229.3]:60796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeXHC-000570-Sm for emacs-orgmode@gnu.org; Thu, 07 Nov 2013 16:38:07 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VeXHB-0004y0-FP for emacs-orgmode@gnu.org; Thu, 07 Nov 2013 22:38:05 +0100 Received: from g231110158.adsl.alicedsl.de ([92.231.110.158]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Nov 2013 22:38:05 +0100 Received: from tjolitz by g231110158.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Nov 2013 22:38:05 +0100 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Matt Price writes: Hi Matt, > I am trying to rewrite my org-writers-mode to use a navi-mode buffer > as a guide for the org-mode buffer > > In navi-mode, it is possible to narrow the original ("twin)) buffer > using the quick ommand "r". However, doing so also narrows the > navi-mode buffer, so that only the current heading is visible. But this is a big advantage in IMO. E.g. when using navi-mode to explore org.el, a giant file with lots of headlines and many functions and vars in each subtree, its very useful to quickly restrict search to the subtree at point and then use e.g. f and v for viewing functions and variables in that subtree. Otherwise you would see a narrowed original buffer in one window, but hundreds of functions (most of them not in the narrowed subtree) when you type f in the *Navi* buffer. > I would like to keep the full tree visible in the navi-mode buffer > while narrowing the original org buffer. I wonder if this is > possible? In particular, I wonder if I am confronting an underlying > limitation in occur-mode, on which navi-mode is based. Actually navi-mode does nothing special wrt to narrowing, and a quick search in occur-mode (replace.el) gave no match for 'narrow' or 'restriction' or so. I think this is just basic Emacs behaviour for most functions to only act on the visible parts of the buffer. I would try to (partly) achieve your goal with visibility cycling: with point in the *Navi* buffer, use to globally cycle the associated Org-buffer into the states OVERVIEW or CONTENTS, then move point in the *Navi* buffer to the headline your are interested in and use to locally cycle this headline to state SHOW ALL. Not a perfect solution, but yields a folded Org file with only one headline unfolded, while all navi searches still act on the whole file. -- cheers, Thorsten