From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Thompson Subject: Alternate org-cycle-level behavior Date: Fri, 29 Jan 2010 17:26:11 -0800 Message-ID: <2a4ba2fd1001291726s31f6a760i20ace437f9755c9b@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1430567534==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nb26d-0007Ho-Fj for emacs-orgmode@gnu.org; Fri, 29 Jan 2010 20:26:35 -0500 Received: from [199.232.76.173] (port=58086 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nb26d-0007HL-2v for emacs-orgmode@gnu.org; Fri, 29 Jan 2010 20:26:35 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nb26b-00005i-GQ for emacs-orgmode@gnu.org; Fri, 29 Jan 2010 20:26:34 -0500 Received: from mail-iw0-f185.google.com ([209.85.223.185]:43929) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nb26b-00005e-7C for emacs-orgmode@gnu.org; Fri, 29 Jan 2010 20:26:33 -0500 Received: by iwn15 with SMTP id 15so1323123iwn.10 for ; Fri, 29 Jan 2010 17:26:32 -0800 (PST) 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: Org-Mode List --===============1430567534== Content-Type: multipart/alternative; boundary=001636d3425565776b047e57a42e --001636d3425565776b047e57a42e Content-Type: text/plain; charset=ISO-8859-1 Hi all, I've implemented my own org-cycle-level function. The major difference is that it's stateless, taking cues only from the level of the previous headline, rather than the level at which the current headline started. That way you can always look at the buffer and know what the TAB key will do on an empty headline. For example, if the previous headline is at level 4 and you create a new blank one under it, pressing TAB to cycle levels will cycle in the following order: 4 -> 5 -> 3 -> 2 -> 1 -> 4. Even if you move the point away and back, then keep cycling, the cycling picks up where it left off. (The default org-cycle-level function does not work this way.) You can get it on Worg: http://orgmode.org/worg/org-hacks.php#sec-23 -Ryan --001636d3425565776b047e57a42e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi all,

I've implemented my own org-cycle-level function. The ma= jor difference is that it's stateless, taking cues only from the level = of the previous headline, rather than the level at which the current headli= ne started. That way you can always look at the buffer and know what the TA= B key will do on an empty headline. For example, if the previous headline i= s at level 4 and you create a new blank one under it, pressing TAB to cycle= levels will cycle in the following order: 4 -> 5 -> 3 -> 2 -> = 1 -> 4. Even if you move the point away and back, then keep cycling, the= cycling picks up where it left off. (The default org-cycle-level function = does not work this way.)

You can get it on Worg: http://orgmode.org/worg/org-hacks.php#sec-23

-Ryan
--001636d3425565776b047e57a42e-- --===============1430567534== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1430567534==--