Matt Price <mopto...@gmail.com> 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


Reply via email to