From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: multiple indirect buffers, and limiting to a drawer Date: Wed, 02 Oct 2013 13:19:43 +0200 Message-ID: <87zjqr2a40.fsf@gmail.com> References: <87wqlw52od.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRKTP-000748-Cx for emacs-orgmode@gnu.org; Wed, 02 Oct 2013 07:20:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRKTI-00060f-34 for emacs-orgmode@gnu.org; Wed, 02 Oct 2013 07:20:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:58444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRKTH-00060W-PK for emacs-orgmode@gnu.org; Wed, 02 Oct 2013 07:20:00 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VRKTG-0006di-2F for emacs-orgmode@gnu.org; Wed, 02 Oct 2013 13:19:58 +0200 Received: from e178062065.adsl.alicedsl.de ([85.178.62.65]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Oct 2013 13:19:58 +0200 Received: from tjolitz by e178062065.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Oct 2013 13:19:58 +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: >> 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. navi-mode only sets "twin-markers" in the code/org buffer and the navi-buffer for quick buffer-switching. Its based on occur (i.e. replace.el), and there I find something like: #+begin_src emacs-lisp (win (or (get-buffer-window buf) (display-buffer buf '(nil (inhibit-same-window . t) (inhibit-switch-frame . t))))) #+end_src and thats how its behaves: navi-buffer is not displayed in another frame, and not in the same window as the code/org buffer. maybe my (constant) gnus window config (stolen somewhere) is helpful for you? #+begin_src emacs-lisp ; 3 part window for Gnus (gnus-add-configuration '(article (horizontal 1.0 (vertical 65 (group 1.0) ) (vertical 1.0 (summary 0.15 point) (article 1.0) )))) (gnus-add-configuration '(summary (horizontal 1.0 (vertical 65 (group 1.0) ) (vertical 1.0 (summary 1.0 point) )))) #+end_src `gnus-add-configuration' is defined in gnus-win.el. Here is what C-1 a (in *Navi-buffer*) shows me about this library, I guess there are quite a lot of things to copy/reuse for you: ,------------------------------------------------------------------------- | 1:;;; gnus-win.el --- window configuration functions for Gnus | 23:;;; Commentary: | 25:;;; Code: | 32:(defgroup gnus-windows nil | 36:(defcustom gnus-use-full-window t | 41:(defcustom gnus-window-min-width 2 | 46:(defcustom gnus-window-min-height 1 | 51:(defcustom gnus-always-force-window-configuration nil | 56:(defcustom gnus-use-frames-on-any-display nil | 64:(defvar gnus-buffer-configuration | 173:(defvar gnus-window-to-buffer | 197:(defcustom gnus-configure-windows-hook nil | 203:;;; Internal variables. | 205:(defvar gnus-current-window-configuration nil | 208:(defvar gnus-created-frames nil) | 209:(defvar gnus-window-frame-focus nil) | 211:(defun gnus-kill-gnus-frames () | 222:(defun gnus-add-configuration (conf) | 228:(defvar gnus-frame-list nil) | 230:(defun gnus-window-to-buffer-helper (obj) | 240:(defun gnus-configure-frame (split &optional window) | 358:(defvar gnus-frame-split-p nil) | 360:(defun gnus-configure-windows (setting &optional force) | 420:(defun gnus-delete-windows-in-gnusey-frames () | 438:(defun gnus-all-windows-visible-p (split) | 479:(defun gnus-window-top-edge (&optional window) | 483:(defun gnus-remove-some-windows () | 507: (defalias 'gnus-frames-on-display-list 'frames-on-display-list)) | 509: (defun gnus-frames-on-display-list () | 512: (defalias 'gnus-frames-on-display-list 'frame-list)))) | 514:(defun gnus-get-buffer-window (buffer &optional frame) | 527:;;; gnus-win.el ends here `------------------------------------------------------------------------- -- cheers, Thorsten