Re: [Orgmode] Feature suggestion: context sensitive movement
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 Dominikcarsten.domi...@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 ___ 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
Re: [Orgmode] Feature suggestion: context sensitive movement
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 Dominikcarsten.domi...@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 Dominikcarsten.domi...@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 ___ 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
Re: [Orgmode] Feature suggestion: context sensitive movement
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.moyni...@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 ___ 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
Re: [Orgmode] Feature suggestion: context sensitive movement
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 ___ 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
Re: [Orgmode] Feature suggestion: context sensitive movement
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 Dominikcarsten.domi...@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 ___ 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
[Orgmode] Feature suggestion: context sensitive movement
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
Re: [Orgmode] Feature suggestion: context sensitive movement
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 Adamsrlad...@adamsinfoserv.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ___ 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
Re: [Orgmode] Feature suggestion: context sensitive movement
Rick Moynihan rick.moyni...@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 ___ 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
Re: [Orgmode] Feature suggestion: context sensitive movement
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.moyni...@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