From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: FR: org-hide-context Date: Wed, 16 Dec 2009 13:58:56 -0500 Message-ID: <87zl5ioidr.fsf@stats.ox.ac.uk> References: <20091216155848.GB28842@atlantic.linksys.moosehall> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKz5f-0004LY-OK for emacs-orgmode@gnu.org; Wed, 16 Dec 2009 13:59:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKz5b-0004L2-MM for emacs-orgmode@gnu.org; Wed, 16 Dec 2009 13:59:15 -0500 Received: from [199.232.76.173] (port=42108 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKz5b-0004Kz-Ho for emacs-orgmode@gnu.org; Wed, 16 Dec 2009 13:59:11 -0500 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:51075) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKz5Y-0005xx-4n for emacs-orgmode@gnu.org; Wed, 16 Dec 2009 13:59:11 -0500 In-Reply-To: (Scot Becker's message of "Wed, 16 Dec 2009 18:38:07 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Scot Becker Cc: org-mode mailing list Scot Becker writes: > I like that, too. > > > On Wed, Dec 16, 2009 at 3:58 PM, Adam Spiers wro= te: > > It would be great to have an opposite to `org-reveal' which folded all > siblings, ancestors, and maybe even all ancestors' siblings of the > current headline. =C2=A0A suitable key-binding might be C-u C-u C-c C= -r > or similar. Are these speed commands at all similar to what you have in mind? ***** Speed commands #+begin_src emacs-lisp=20 (defun ded/org-show-next-heading-tidily () "Show next entry, keeping other entries closed." (if (save-excursion (end-of-line) (outline-invisible-p)) (progn (org-show-entry) (show-children)) (outline-next-heading) (unless (and (bolp) (org-on-heading-p)) (org-up-heading-safe) (hide-subtree) (error "Boundary reached")) (org-overview) (org-reveal t) (org-show-entry) (show-children))) =20=20 (defun ded/org-show-previous-heading-tidily () "Show previous entry, keeping other entries closed." (let ((pos (point))) (outline-previous-heading) (unless (and (< (point) pos) (bolp) (org-on-heading-p)) (goto-char pos) (hide-subtree) (error "Boundary reached")) (org-overview) (org-reveal t) (org-show-entry) (show-children))) =20=20 (setq org-use-speed-commands t) (add-to-list 'org-speed-commands-user '("n" ded/org-show-next-heading-tidily)) (add-to-list 'org-speed-commands-user=20 '("p" ded/org-show-previous-heading-tidily)) #+end_src Dan > > Thanks, > Adam > > > _______________________________________________ > Emacs-orgmode mailing list > Please 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 > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode