* Feature suggestion: context sensitive movement
@ 2009-06-18 11:10 Rick Moynihan
2009-06-18 11:59 ` Russell Adams
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Rick Moynihan @ 2009-06-18 11:10 UTC (permalink / raw
To: emacs-orgmode
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Feature suggestion: context sensitive movement
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
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Russell Adams @ 2009-06-18 11:59 UTC (permalink / raw
To: emacs-orgmode
C-c C-n
C-c C-p
Enjoy!
On Thu, Jun 18, 2009 at 12:10:53PM +0100, Rick Moynihan 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
>
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Feature suggestion: context sensitive movement
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-18 19:54 ` Samuel Wales
3 siblings, 1 reply; 13+ messages in thread
From: Matthew Lundin @ 2009-06-18 12:02 UTC (permalink / raw
To: Rick Moynihan; +Cc: emacs-orgmode
Hi Rick,
Rick Moynihan <rick.moynihan@gmail.com> writes:
> 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>.
For navigating headlines, I use C-c C-n (outline-next-visible-heading),
C-c C-p (outline-previous-visible-heading). There are other commands
available as well (see the menu entry Org --> Navigate Headings).
I'm not aware of context detection related to such movement.
Regards,
Matt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Feature suggestion: context sensitive movement
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 14:10 ` Sebastian Rose
2009-06-19 12:56 ` Daniel Clemente
2009-06-18 19:54 ` Samuel Wales
3 siblings, 1 reply; 13+ messages in thread
From: Sebastian Rose @ 2009-06-18 14:10 UTC (permalink / raw
To: Rick Moynihan; +Cc: emacs-orgmode
Rick Moynihan <rick.moynihan@gmail.com> writes:
> 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>.
We now have:
C-c C-j - traverse the tree using UP and DOWN
C-c C-u - privious
C-c C-n - next
C-c C-b - previous sibling
C-c C-f - next sibling
But I agree: `forward-paragraph' and `backward-paragraph' are much more
convenient to use (and I use those all the time instead).
I still tend to expect the behaviour you describe when on a headline or
list item and I'm disapointed each time I try ;)
Regards
Sebastian
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: Feature suggestion: context sensitive movement
2009-06-18 12:02 ` Matthew Lundin
@ 2009-06-18 15:04 ` Bill White
0 siblings, 0 replies; 13+ messages in thread
From: Bill White @ 2009-06-18 15:04 UTC (permalink / raw
To: Matthew Lundin; +Cc: emacs-orgmode
On Thu Jun 18 2009 at 07:02, Matthew Lundin <mdl@imapmail.org> wrote:
> Hi Rick,
>
> Rick Moynihan <rick.moynihan@gmail.com> writes:
>
>> 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>.
>
> For navigating headlines, I use C-c C-n
> (outline-next-visible-heading), C-c C-p
> (outline-previous-visible-heading). There are other commands available
> as well (see the menu entry Org --> Navigate Headings).
>
> I'm not aware of context detection related to such movement.
allout.el has a great setup for this - when the cursor is at a
headline's "hotspot" (on the '#' in, for example, ".#3 header"), 'n' and
'p' can be used to navigate through the visible headers, landing on each
header's '#'. From the hotspot you can also cycle visibility with 'h'
(hide) and 's' (show).
Every time I navigate among headers in orgmode, I miss this allout
functionality.
Cheers -
bw
--
Bill White . billw@wolfram.com . http://members.wolfram.com/billw
"No ma'am, we're musicians."
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Feature suggestion: context sensitive movement
2009-06-18 11:10 Feature suggestion: context sensitive movement Rick Moynihan
` (2 preceding siblings ...)
2009-06-18 14:10 ` Sebastian Rose
@ 2009-06-18 19:54 ` Samuel Wales
2009-06-19 6:17 ` Carsten Dominik
3 siblings, 1 reply; 13+ messages in thread
From: Samuel Wales @ 2009-06-18 19:54 UTC (permalink / raw
To: Rick Moynihan; +Cc: emacs-orgmode
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?
(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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Feature suggestion: context sensitive movement
2009-06-18 19:54 ` Samuel Wales
@ 2009-06-19 6:17 ` Carsten Dominik
2009-06-19 17:33 ` Samuel Wales
0 siblings, 1 reply; 13+ messages in thread
From: Carsten Dominik @ 2009-06-19 6:17 UTC (permalink / raw
To: Samuel Wales; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Feature suggestion: context sensitive movement
2009-06-18 14:10 ` Sebastian Rose
@ 2009-06-19 12:56 ` Daniel Clemente
2009-06-19 13:01 ` Bernt Hansen
0 siblings, 1 reply; 13+ messages in thread
From: Daniel Clemente @ 2009-06-19 12:56 UTC (permalink / raw
To: Sebastian Rose; +Cc: emacs-orgmode
El dj, jun 18 2009 a les 16:10, Sebastian Rose va escriure:
>
> We now have:
>
>
> C-c C-j - traverse the tree using UP and DOWN
> C-c C-u - privious
> C-c C-n - next
> C-c C-b - previous sibling
> C-c C-f - next sibling
>
I miss one key to go back to the current entry's heading (that's outline-back-to-heading).
I tried to bind it to C-c C-h, but the C-h still triggers something about help (even when I unbounded C-h in the global keymap).
Anyone else misses it?
-- Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Feature suggestion: context sensitive movement
2009-06-19 12:56 ` Daniel Clemente
@ 2009-06-19 13:01 ` Bernt Hansen
2009-06-22 9:02 ` Daniel Clemente
0 siblings, 1 reply; 13+ messages in thread
From: Bernt Hansen @ 2009-06-19 13:01 UTC (permalink / raw
To: Daniel Clemente; +Cc: emacs-orgmode
Daniel Clemente <n142857@gmail.com> writes:
> El dj, jun 18 2009 a les 16:10, Sebastian Rose va escriure:
>>
>> We now have:
>>
>>
>> C-c C-j - traverse the tree using UP and DOWN
>> C-c C-u - privious
>> C-c C-n - next
>> C-c C-b - previous sibling
>> C-c C-f - next sibling
>>
>
> I miss one key to go back to the current entry's heading (that's outline-back-to-heading).
> I tried to bind it to C-c C-h, but the C-h still triggers something about help (even when I unbounded C-h in the global keymap).
>
> Anyone else misses it?
C-c C-p
-Bernt
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Feature suggestion: context sensitive movement
2009-06-19 6:17 ` Carsten Dominik
@ 2009-06-19 17:33 ` Samuel Wales
2009-06-20 19:26 ` Carsten Dominik
0 siblings, 1 reply; 13+ messages in thread
From: Samuel Wales @ 2009-06-19 17:33 UTC (permalink / raw
To: Carsten Dominik; +Cc: emacs-orgmode
These look very useful. Is there one for moving to the parent item,
and is there one for moving to the item first line analogous to
back-to-heading?
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<carsten.dominik@gmail.com> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Feature suggestion: context sensitive movement
2009-06-19 17:33 ` Samuel Wales
@ 2009-06-20 19:26 ` Carsten Dominik
2009-06-20 20:07 ` Samuel Wales
0 siblings, 1 reply; 13+ messages in thread
From: Carsten Dominik @ 2009-06-20 19:26 UTC (permalink / raw
To: Samuel Wales; +Cc: emacs-orgmode
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<carsten.dominik@gmail.com
> > 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Feature suggestion: context sensitive movement
2009-06-20 19:26 ` Carsten Dominik
@ 2009-06-20 20:07 ` Samuel Wales
0 siblings, 0 replies; 13+ messages in thread
From: Samuel Wales @ 2009-06-20 20:07 UTC (permalink / raw
To: Carsten Dominik; +Cc: emacs-orgmode
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<carsten.dominik@gmail.com> 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<carsten.dominik@gmail.com>
>> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Feature suggestion: context sensitive movement
2009-06-19 13:01 ` Bernt Hansen
@ 2009-06-22 9:02 ` Daniel Clemente
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Clemente @ 2009-06-22 9:02 UTC (permalink / raw
To: Bernt Hansen; +Cc: emacs-orgmode
>>>
>>> We now have:
>>>
>>>
>>> C-c C-j - traverse the tree using UP and DOWN
>>> C-c C-u - privious
>>> C-c C-n - next
>>> C-c C-b - previous sibling
>>> C-c C-f - next sibling
>>>
>>
>> I miss one key to go back to the current entry's heading (that's outline-back-to-heading).
>
> C-c C-p
>
Thanks, that was easy. I had always expected C-c C-u to do this (go to higher level heading), and therefore I didn't find it in C-c C-p.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-06-22 9:03 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-06-19 17:33 ` Samuel Wales
2009-06-20 19:26 ` Carsten Dominik
2009-06-20 20:07 ` Samuel Wales
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.