From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: multiple indirect buffers, and limiting to a drawer Date: Wed, 2 Oct 2013 06:13:49 -0400 Message-ID: References: <87wqlw52od.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRJRN-00067s-2E for emacs-orgmode@gnu.org; Wed, 02 Oct 2013 06:14:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRJRG-0002SW-5C for emacs-orgmode@gnu.org; Wed, 02 Oct 2013 06:13:57 -0400 Received: from mail-qe0-x236.google.com ([2607:f8b0:400d:c02::236]:40983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRJRG-0002SM-05 for emacs-orgmode@gnu.org; Wed, 02 Oct 2013 06:13:50 -0400 Received: by mail-qe0-f54.google.com with SMTP id cy11so366043qeb.27 for ; Wed, 02 Oct 2013 03:13:49 -0700 (PDT) In-Reply-To: <87wqlw52od.fsf@gmail.com> 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: Thorsten Jolitz Cc: Org Mode On Tue, Oct 1, 2013 at 1:19 PM, Thorsten Jolitz wrote: > Matt Price writes: > > Hi, > >> (1) in a narrow window on the left, an outline of the whole org-file, >> which I take to represent a major writing project >> >> (2) in the main window, a heading element in an indirect buffer >> >> >> (3) in the right-hand panel, I'd like to just show the properties >> drawer of the currently active heading. >> >> >> Can someone suggest the best way to create that third buffer (or more >> precisely, that second indirect buffer)? I guess I don't know the >> best way to limit to a drawer, nor do I really understand how to make >> multiple indirect buffers ( from what I can see, >> org-tree-to-indirect-buffer will only permit one indirect buffer at a >> time to be crate, which is fine, but which takes away the only tool I >> sort of understand). >> >> >> Another question: does emacs allow indirect buffers to have different >> modes than their parents If so, I would like to write some trivial >> minor modes that remap keybindings in each of the three windows, and >> .e.g I would like to prohibit full unfolding of the outline in the >> left-hand window if that's possible. > > Much of this is possible with > [[https://github.com/tj64/navi][navi-mode.el]] (see screencast on > [[http://www.youtube.com/watch?v%3DII-xYw5VGFM:][youtube]]), although > you won't have 3 buffers, just 2: the Org file and the associated > *Navi-buffer*, but the latter is very flexibel: with one key commands > you can switch rapidly between multiple views of your Org file, change > the visibility of the Org buffer, and more 'remote-control' like stuff. > > Just to give you an example using Bernt Hansen org-mode.org tutorial: > > 1. M-s n -> fire up navi buffer showing level 1 headlines: > > ,---------------------------------------------------- > | 19 matches for "^\* " in buffer: org-mode.org > | 39:* Getting Started > | 411:* Tasks and States > | 566:* Adding New Tasks Quickly with Org Capture > | 712:* Refiling Tasks ... > `---------------------------------------------------- > > 2. move up and down with n an p, narrow and widen subtrees with r and w, > change visibility of headline at point (whole buffer) with TAB (BACKTAB). > use d to see the element at point in the Org-buffer, o (or s) to switch to > it. use M-s M-s to switch back from Org-buffer to the navi-buffer. > > 3. type 2 or 3 to see headlines up to level 2 (3) > > ,-------------------------------------------------- > | 122 matches for "^\*\*? " in buffer: org-mode.org > | 39:* Getting Started > | 42:** Org-Mode Setup > | 130:** Organizing Your Life Into Org Files > | 184:** Agenda Setup > | 233:** Org File Structure > | 291:** Key bindings > | 411:* Tasks and States > | 425:** TODO keywords > | 510:** Fast Todo Selection > | 533:** TODO state triggers > `-------------------------------------------------- > > 4. type h to see all (currently) possible keyword-searches (and q to quit the > help page) > > ,------------------------------------------------ > | [KEY] : [SEARCH] > | ================ > | b : srcblock > | x : time > | I : inline-srcblock > | W : srcname-w-name > | M : multilineheader > | Y : priority > | T : target > | R : radiotarget > | D : drawer > | S : timestamp > | N : srcname > | U : result > | Z : result-w-name > | O : options > | P : propertydrawer > | A : deadline > | H : scheduled-time-hour > `------------------------------------------------ > > 5. play around with the keyword searches, e.g. type b > > ,----------------------------------------------------- > | 51:#+begin_src emacs-lisp :tangle no > | 65:#+begin_src emacs-lisp :tangle yes :exports none > | 86:#+begin_src emacs-lisp :tangle yes > | 103:#+begin_src emacs-lisp :tangle yes > | 190:#+begin_src emacs-lisp :tangle no > `----------------------------------------------------- > > type S > > ,------------------------------------------------ > | 2130: , SCHEDULED: <2009-05-18 Mon ++1w> > | 3771: , DEADLINE: <2009-07-01 Wed +1m -0d> > | 3843: , SCHEDULED: <2009-06-16 Tue +1w> > | 4081: , DEADLINE: <2009-07-01 Wed +1m -0d> > | 4265: , SCHEDULED: <2009-11-21 Sat .+7d/30d> > `------------------------------------------------ > > and - for your use case - type P: > > ,---------------------------- > | 43::PROPERTIES: > | ::CUSTOM_ID: Setup > | ::END: > | 131::PROPERTIES: > | ::CUSTOM_ID: OrgFiles > | ::END: > | 185::PROPERTIES: > | ::CUSTOM_ID: AgendaSetup > | ::END: > `---------------------------- > > 6. finally, combine headline and keyword searches: > > type C-1 S > > ,------------------------------------------------ > | 2100:* GTD stuff > | 2130: , SCHEDULED: <2009-05-18 Mon ++1w> > | 2397:* Archiving > | 2490:* Publishing and Exporting > | 3090:* Reminders > | 3125:* Productivity Tools > | 3771: , DEADLINE: <2009-07-01 Wed +1m -0d> > | 3843: , SCHEDULED: <2009-06-16 Tue +1w> > | 4081: , DEADLINE: <2009-07-01 Wed +1m -0d> > | 4265: , SCHEDULED: <2009-11-21 Sat .+7d/30d> > | 5031:* Things I Don't Use (Anymore) > `------------------------------------------------ > > type C-3 P > > ,------------------------------------------- > | 39:* Getting Started > | 42:** Org-Mode Setup > | 43::PROPERTIES: > | ::CUSTOM_ID: Setup > | ::END: > | 130:** Organizing Your Life Into Org Files > | 131::PROPERTIES: > | ::CUSTOM_ID: OrgFiles > | ::END: > | 184:** Agenda Setup > | 185::PROPERTIES: > | ::CUSTOM_ID: AgendaSetup > | ::END: > `------------------------------------------- > > Although navigation inside the Org-modes buffers is quite convenient, its > somehow even more convenient to have a splitted screen and switch to the > read-only navi-buffer and use 1-key bindings for navigation, visibility > changes, all kinds of buffer views, and even a kind of remote control for > common copy, edit and search commands. > Wow, that is very cool. I had never seen navi-mode before. I am looking at it and hoping I might be able to modify navi-narrow-to-subtree in a way that allows me to add a third window which will contain an indirect buffer, itself narrowed to the properties drawer for the current headline. It seems like that might be possible? I would need to figure out how navi-mode manages the window layouts, which I haven't looked at yet. Thanks veyr much. Matt > -- > cheers, > Thorsten > >