Carsten Dominik <domi...@uva.nl> writes:

<...>
> I am happy to have a discussion what additional
> commands should be present by default.

I thought a speed command for scrolling through an org document might be
good -- move from heading to heading, displaying the next entry while
keeping all others hidden, and close subtrees as you leave them. Or is
there already an org command that does something like this?

(Try starting with everything closed.)

--------------------------------------------------------------
(defun ded/org-show-next-heading-tidily ()
  "Show next entry, keeping other entries closed."
  (if (save-excursion (end-of-line) (outline-invisible-p))
      (org-cycle)
    (let ((level (org-current-level)))
      (unless (org-heading-has-child-p) (org-cycle))
      (outline-next-heading)
      (if (< (org-current-level) level)
          (save-excursion
            (outline-backward-same-level 1)
            (org-cycle)))
      (if (and (bolp) (org-on-heading-p))
          (org-cycle)
        (outline-up-heading 1 t)
        (org-cycle)
        (error "Boundary reached")))))

(setq org-use-speed-commands t)
(add-to-list 'org-speed-commands-user 
             '("s" ded/org-show-next-heading-tidily))
--------------------------------------------------------------

(<space> might be quite natural for this one, it seems to get used for
scrolling e.g. in dired and gnus)

Dan


>
> - Carsten
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to