From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: Feature suggestion: context sensitive movement Date: Sat, 20 Jun 2009 13:07:56 -0700 Message-ID: <20524da70906201307o318d0692wa175b62b0cd4d4a0@mail.gmail.com> References: <20524da70906181254y5fc43f9dh564f8aa0fe3c6a59@mail.gmail.com> <62CD457A-F0C3-4BDB-B6FA-CD707C2D43AF@gmail.com> <20524da70906191033q3d06d339nf821fe902422846f@mail.gmail.com> <86D9A2F7-D027-44DF-930A-9AAC89E0770A@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MI6rO-0006k5-P3 for emacs-orgmode@gnu.org; Sat, 20 Jun 2009 16:08:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MI6rK-0006Zv-8V for emacs-orgmode@gnu.org; Sat, 20 Jun 2009 16:08:22 -0400 Received: from [199.232.76.173] (port=38817 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MI6rJ-0006Zf-Ud for emacs-orgmode@gnu.org; Sat, 20 Jun 2009 16:08:17 -0400 Received: from mail-px0-f176.google.com ([209.85.216.176]:41962) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MI6rJ-00089h-Cm for emacs-orgmode@gnu.org; Sat, 20 Jun 2009 16:08:17 -0400 Received: by pxi6 with SMTP id 6so2696653pxi.14 for ; Sat, 20 Jun 2009 13:08:16 -0700 (PDT) In-Reply-To: <86D9A2F7-D027-44DF-930A-9AAC89E0770A@gmail.com> 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: Carsten Dominik Cc: emacs-orgmode@gnu.org Thanks, Carsten. Using Carsten's comments in this thread, here is my c-m-ret command. Don't know if it helps the OP, but I find it useful. (defun alpha-org-up () "Go up by moving point to the next-highest item or headline in the following. - the item - the parent item - the headline - the parent headline " (interactive) ;;'invisible-ok (cond ((org-at-item-p) (org-beginning-of-item-list) (backward-char 1) (if (org-in-item-p) (org-beginning-of-item) (beginning-of-line))) ((org-in-item-p) (org-beginning-of-item)) ((org-at-heading-p) (call-interactively 'outline-up-heading)) (t (outline-back-to-heading)))) On Sat, Jun 20, 2009 at 12:26, Carsten Dominik w= rote: > > On Jun 19, 2009, at 7:33 PM, Samuel Wales wrote: > >> These look very useful. =A0Is there one for moving to the parent item, > > no. =A0You can make it with > > =A0 (org-beginning-of-item-list) > =A0 (backward-char 1) > =A0 (org-begining-if-item) > > or something like this (untested). > >> and is there one for moving to the item first line analogous to >> back-to-heading? > > Yes, org-beginning-of-item > > HTH > > - Carsten > > >> >> My idea is to write a command that does something approx. like this: >> >> ;;; =A0 =A0(cond >> ;;; =A0 =A0 =A0((org-at-item-p) (org-item-up)) ;parent >> ;;; =A0 =A0 =A0((org-in-item-p) (org-back-to-item-heading)) >> ;;; =A0 =A0 =A0((org-at-heading-p) (outline-up-heading)) >> ;;; =A0 =A0 =A0(t (outline-back-to-heading))) >> >> Thanks. >> >> On Thu, Jun 18, 2009 at 23:17, Carsten Dominik >> wrote: >>>> >>>> Are there any functions to navigate plain lists? >>> >>> org-beginning-of-item >>> org-end-of-item >>> org-next-item >>> org-previous-item >>> org-beginning-of-item-list >>> >>> You could make you bindings below work for lists as well by checking >>> context >>> with >>> >>> >>> org-at-item-p =A0 =A0;; first line only >>> org-in-item-p =A0 =A0;; does not have to be first line >>> org-at-heading-p >>> >> >> >> >> -- >> Myalgic encephalomyelitis denialism is causing death and severe sufferin= g, >> worse than MS. =A0Conflicts of interest are destroying research. =A0/You= / can >> get the disease at any time permanently. =A0Do science and justice matte= r to >> you? =A0http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm > > --=20 Myalgic encephalomyelitis denialism is causing death and severe suffering, worse than MS. Conflicts of interest are destroying research. /You/ can get the disease at any time permanently. Do science and justice matter to you? http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm