From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: multiple indirect buffers, and limiting to a drawer Date: Tue, 01 Oct 2013 19:19:46 +0200 Message-ID: <87wqlw52od.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VR3cC-0007dW-Vh for emacs-orgmode@gnu.org; Tue, 01 Oct 2013 13:20:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VR3c7-0000Yj-9h for emacs-orgmode@gnu.org; Tue, 01 Oct 2013 13:20:04 -0400 Received: from plane.gmane.org ([80.91.229.3]:40905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VR3c6-0000YX-Um for emacs-orgmode@gnu.org; Tue, 01 Oct 2013 13:19:59 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VR3c5-0007ON-On for emacs-orgmode@gnu.org; Tue, 01 Oct 2013 19:19:57 +0200 Received: from e178190201.adsl.alicedsl.de ([85.178.190.201]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Oct 2013 19:19:57 +0200 Received: from tjolitz by e178190201.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Oct 2013 19:19:57 +0200 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, > (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. -- cheers, Thorsten