Trevor Vartanoff <t...@codepuzzles.org> writes: > I've been using this macro on headings to open the subtree to the > children of children, since org-cycle just goes "nothing -> children - > everything": > > (fset 'och ;; Open children of children > [tab tab ?\C-n M-return ?\C-b ?* ?\C-a ?\C-p tab tab ?\C-n ?\C-k > ?\C-k ?\C-p]) > > Is there a more elegant solution available? If not, hopefully some of > you find this useful as well.
You are looking for `org-goto-first-child' (which is a non-interactive defun) Here is what I have in my .emacs. It uses speed commands and "d" is bound to "descend" in to a subtree. (defun jambu/org-goto-next-sibling () (org-goto-sibling) (org-overview) (org-reveal) (beginning-of-line) (re-search-forward "[*]+") (backward-char)) (defun jambu/org-goto-previous-sibling () (org-goto-sibling t) (org-overview) (org-reveal) (beginning-of-line) (re-search-forward "^[*]+") (backward-char)) (defun jambu/org-goto-first-child () (org-goto-first-child) (org-overview) (org-reveal) (beginning-of-line) (re-search-forward "^[*]+") (backward-char)) (setq org-use-speed-commands t) (add-to-list 'org-speed-commands-user '("n" jambu/org-goto-next-sibling)) (add-to-list 'org-speed-commands-user '("p" jambu/org-goto-previous-sibling)) (add-to-list 'org-speed-commands-user '("d" jambu/org-goto-first-child)) > Thanks > > --