[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Feature suggestion: context sensitive movement
From: |
Samuel Wales |
Subject: |
Re: [Orgmode] Feature suggestion: context sensitive movement |
Date: |
Sat, 20 Jun 2009 13:07:56 -0700 |
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<address@hidden> wrote:
>
> On Jun 19, 2009, at 7:33 PM, Samuel Wales wrote:
>
>> These look very useful. Is there one for moving to the parent item,
>
> no. You can make it with
>
> (org-beginning-of-item-list)
> (backward-char 1)
> (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:
>>
>> ;;; (cond
>> ;;; ((org-at-item-p) (org-item-up)) ;parent
>> ;;; ((org-in-item-p) (org-back-to-item-heading))
>> ;;; ((org-at-heading-p) (outline-up-heading))
>> ;;; (t (outline-back-to-heading)))
>>
>> Thanks.
>>
>> On Thu, Jun 18, 2009 at 23:17, Carsten Dominik<address@hidden>
>> 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 ;; first line only
>>> org-in-item-p ;; does not have to be first line
>>> org-at-heading-p
>>>
>>
>>
>>
>> --
>> 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
>
>
--
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