emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] contribute: three pane mode for org


From: Thorsten Jolitz
Subject: Re: [O] contribute: three pane mode for org
Date: Wed, 27 Aug 2014 12:13:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Ernesto Durante <address@hidden> writes:

> Florian Knupfer <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]