emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Samuel Wales <samologist@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Feature suggestion: context sensitive movement
Date: Fri, 19 Jun 2009 08:17:06 +0200	[thread overview]
Message-ID: <62CD457A-F0C3-4BDB-B6FA-CD707C2D43AF@gmail.com> (raw)
In-Reply-To: <20524da70906181254y5fc43f9dh564f8aa0fe3c6a59@mail.gmail.com>


On Jun 18, 2009, at 9:54 PM, Samuel Wales wrote:

> Others have pointed out the relevant commands.  Here are some possible
> bindings for you.
>
> What I do is bind c-m-arrow, analogous to the way I bind them in Lisp.
> Maybe you will find those bindings useful.  The relevant insight is
> trees -- both Lisp and outlines instantiate them.
>
> Would be great if they worked on plain list items also, as if those
> items were headlines.
>
> 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

HTH

- Carsten

>
>  (define-key org-mode-map [(control meta left)]
>    'outline-backward-same-level)
>  (define-key org-mode-map [(control meta right)]
>    'outline-forward-same-level)
>  (define-key org-mode-map [(control meta up)]
>    'outline-previous-visible-heading)
>  (define-key org-mode-map [(control meta down)]
>    'outline-next-visible-heading)
>  ;;in gnu lisp, there is no separate up as i have.  ud change  
> level.  lr go
>  ;;back and forward at the same level.  sounds simple in principle.
>  ;;however, that makes it hard to go to the previous visible heading  
> (or
>  ;;last element of prev list in lisp): you have to do up, left,  
> down, right
>  ;;repeat.
>  ;;
>  ;;upshot: my way is intuitive.  ud goes ud, lr goes same level, ret
>  ;;goes up.
>  (define-key org-mode-map [(control meta return)]
>    ;;'invisible-ok
>    'outline-up-heading)
>
>
> On 2009-06-18, Rick Moynihan <rick.moynihan@gmail.com> wrote:
>> I was just thinking that often I want to jump around items in org- 
>> mode
>> more quickly than I do at present, depending on the context of the
>> point.
>>
>> e.g.
>>
>> * Foo
>> blah blah blah
>> * Bar |
>> blah blah blah
>> * Baz
>>
>> Assuming the point is located at | I might want to quickly jump to
>> previous headings by pushing CTRL-<up>/<down>.
>>
>> Having this also occur when the point is located within a list would
>> be nice too.
>>
>> Does anyone else think this is a good idea?  Or is this another
>> feature which is already implemented, that I'm not aware of? :-)
>>
>> Thanks again,
>>
>> R.
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
>
> -- 
> 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
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2009-06-19  6:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18 11:10 Feature suggestion: context sensitive movement Rick Moynihan
2009-06-18 11:59 ` Russell Adams
2009-06-18 12:02 ` Matthew Lundin
2009-06-18 15:04   ` Bill White
2009-06-18 14:10 ` Sebastian Rose
2009-06-19 12:56   ` Daniel Clemente
2009-06-19 13:01     ` Bernt Hansen
2009-06-22  9:02       ` Daniel Clemente
2009-06-18 19:54 ` Samuel Wales
2009-06-19  6:17   ` Carsten Dominik [this message]
2009-06-19 17:33     ` Samuel Wales
2009-06-20 19:26       ` Carsten Dominik
2009-06-20 20:07         ` Samuel Wales

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62CD457A-F0C3-4BDB-B6FA-CD707C2D43AF@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=samologist@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).