From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Open Children of Children Date: Sun, 27 May 2012 02:05:43 +0530 Message-ID: <81pq9q1y00.fsf@gmail.com> References: <4FC1301F.6030603@codepuzzles.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYNiY-0000NQ-Kl for emacs-orgmode@gnu.org; Sat, 26 May 2012 16:36:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYNiW-0003JJ-Q0 for emacs-orgmode@gnu.org; Sat, 26 May 2012 16:36:06 -0400 Received: from mail-pb0-f41.google.com ([209.85.160.41]:37083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYNiW-0003GT-Gy for emacs-orgmode@gnu.org; Sat, 26 May 2012 16:36:04 -0400 Received: by pbbrp2 with SMTP id rp2so3249630pbb.0 for ; Sat, 26 May 2012 13:36:01 -0700 (PDT) In-Reply-To: <4FC1301F.6030603@codepuzzles.org> (Trevor Vartanoff's message of "Sat, 26 May 2012 15:33:51 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Trevor Vartanoff Cc: emacs-orgmode@gnu.org Trevor Vartanoff 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 > > --