emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: contribute: three pane mode for org
Date: Wed, 27 Aug 2014 12:13:25 +0200	[thread overview]
Message-ID: <8738ci9r5m.fsf@gmail.com> (raw)
In-Reply-To: 87r402l25i.fsf@gmail.com

Ernesto Durante <stobossey@gmail.com> writes:

> Florian Knupfer <f.knupfer@gmail.com> writes:
>
>> Hello,
>>
>> I've written a function that enables a three pane view on org files.
>> I'm quite new to emacs but I'd like to contribute and receive 
>> feedbacks, improvement etc.
>>
>> It can be found at:
>> https://github.com/knupfer/org-panes
>>
>> Best regards
>
> very good and integrates nicely with the current workflow.
> Why not 2 panes only (content and showall) ? 

Are you aware of navi-mode.el? 

It does exactly this - put the overview (-> content) in a second
window next to the details (-> showall). Only that the overview is a
*Navi* buffer that is

- plain read-only text (not a folded outline), what has many advantages
  (though, like in occur and dired, 'M-x navi-edit-mode' makes the
  buffer temporarily editable and propagates changes to the associated
  Org/Outshine buffer)

- a pretty smart remote-control of the associated Org (or Outshine)
  buffer, offering many different views on the Org buffer, and lots of
  navigation & structure editing commands with vim-like
  one-key-bindings.

Keys 1 to 8 in the *Navi* buffer show the headlines up to that
level. Additionally, these keyword searches have been defined for
Org-mode:

,----
| [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
`----

(note that these searches are customizable, so they can be modified  or
extended by the user via the customize interface)

With a prefix-arg, you can combine headline and keyword searches. 
E.g. given this Org buffer

,----
| * A
| ** B 
| 
| #+BEGIN_SRC emacs-lisp
|  (+ 2 2)
| #+END_SRC
| 
| #+results:
| : 4
| 
| ** C :mytag:
|    DEADLINE: <2014-08-27 Mi 22:00>
| *** [#A] D
| very important
`----

trigger *Navi* buffer with 

,----[ C-h f navi-search-and-switch RET ]
| navi-search-and-switch is an interactive Lisp function in
| `navi-mode.el'.
| 
| It is bound to M-s n.
| 
| (navi-search-and-switch)
| 
| Call `occur' and immediatley switch to `*Navi:original-buffer-name*' buffer
`----

then typing '2' shows

,----
|   1:* A
|   2:** B 
|  11:** C :mytag:
`----

typing 'A' shows

,----
|  12:   DEADLINE: <2014-08-27 Mi 22:00>
`----

and combining headline with keyword-searches with 'C-2 A' or 'C-u 2 A'
shows

,----
|   1:* A
|   2:** B 
|  11:** C :mytag:
|  12:   DEADLINE: <2014-08-27 Mi 22:00>
`----

The *Navi* buffer is like a remote-control for the associated Org or
Outshine buffer, here is a list of things (besides the headline and
keyword searches) you can do without leaving the *Navi* buffer (using
vim-like one-key bindings):

,----[ C-h f navi-mode RET ]
| navi-mode is an interactive Lisp function in `navi-mode.el'.
| 
| (navi-mode)
| 
| Parent mode: `occur-mode'.
| 
| Major mode for easy buffer-navigation.
| In this mode (derived from `occur-mode') you can easily navigate
| in an associated original-buffer via one-key commands in the
| navi-buffer. You can alter the displayed document structure in
| the navi-buffer by sending one-key commands that execute
| predefined occur searches in the original buffer. `navi-mode' is
| especially useful in buffers with outline structure, e.g. buffers
| with `outline-minor-mode' activated and `outshine' extensions
| loaded.
| key             binding
| ---             -------
| 
| C-c		Prefix Command
| TAB		navi-cycle-subtree
| RET		occur-mode-goto-occurrence
| C-o		occur-mode-display-occurrence
| ESC		Prefix Command
| SPC		scroll-up-command
| ! .. *		navi-generic-command
| +		navi-demote-subtree
| ,		navi-act-on-thing-at-point
| -		navi-promote-subtree
| .		scroll-other-window
| / .. 9		navi-generic-command
| :		scroll-other-window-down
| ;		navi-generic-command
| <		navi-move-down-subtree
| = .. D		navi-generic-command
| E		navi-edit-mode
| F .. ]		navi-generic-command
| ^		navi-move-up-subtree
| _ .. b		navi-generic-command
| c		navi-copy-thing-at-point-to-register-s
| d		occur-mode-display-occurrence
| e		navi-edit-as-org
| f		navi-generic-command
| g		navi-revert-function
| h		navi-show-help
| i		navi-isearch
| j		navi-generic-command
| k		navi-kill-thing-at-point
| l		navi-query-replace
| m		navi-mark-thing-at-point-and-switch
| n		occur-next
| o		navi-goto-occurrence-other-window
| p		occur-prev
| q		navi-quit-and-switch
| r		navi-narrow-to-thing-at-point
| s		navi-switch-to-twin-buffer
| t		navi-generic-command
| u		navi-undo
| v		navi-generic-command
| w		navi-widen
| x		navi-generic-command
| y		navi-yank-thing-from-register-s
| z		navi-mail-subtree
| { .. ~		navi-generic-command
| DEL		scroll-down-command
| <mouse-2>	occur-mode-mouse-goto
| <remap>		Prefix Command
| 
| C-M-i		navi-cycle-buffer
| 
| M-n		occur-next
| M-p		occur-prev
| 
| C-c C-c		occur-mode-goto-occurrence
| C-c C-f		next-error-follow-minor-mode
| 
| 
| 
| In addition to any hooks its parent mode might have run,
| this mode runs the hook `navi-mode-hook', as the final step
| during initialization.
`----
 
-- 
cheers,
Thorsten

  reply	other threads:[~2014-08-27 10:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-23 15:06 contribute: three pane mode for org Florian Knupfer
2014-08-24  9:32 ` Thierry Banel
2014-08-24 14:17 ` Suvayu Ali
2014-08-26 17:20 ` Eric S Fraga
     [not found]   ` <6fc48620-bea8-482c-ba5a-c3d259f84051@email.android.com>
2014-08-26 19:01     ` Eric S Fraga
     [not found]       ` <8850026e-6574-449f-85c9-1e78d3bc3104@email.android.com>
2014-08-27  7:31         ` Eric S Fraga
2014-08-27  9:20 ` Ernesto Durante
2014-08-27 10:13   ` Thorsten Jolitz [this message]
2014-08-28 13:46     ` Ernesto Durante

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=8738ci9r5m.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).