emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: multiple indirect buffers, and limiting to a drawer
Date: Wed, 02 Oct 2013 13:19:43 +0200	[thread overview]
Message-ID: <87zjqr2a40.fsf@gmail.com> (raw)
In-Reply-To: CAN_Dec9Ce_H45ZYf35FyiZ1s5UH+JVA7e6MShC_hrwA9+D=Z7w@mail.gmail.com

Matt Price <moptop99@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	other threads:[~2013-10-02 11:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-01 13:44 multiple indirect buffers, and limiting to a drawer Matt Price
2013-10-01 17:19 ` Thorsten Jolitz
2013-10-02 10:13   ` Matt Price
2013-10-02 11:19     ` Thorsten Jolitz [this message]
2013-10-01 21:37 ` Myles English
2013-10-02  9:54   ` Matt Price
     [not found] ` <87mwmskcyp.fsf@bobnewell.net>
2013-10-02  9:50   ` Matt Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zjqr2a40.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).