emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tony day <tonyday567@gmail.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>, Esben Stien <b0ef@esben-stien.name>
Cc: emacs-orgmode@gnu.org
Subject: Header Jumping
Date: Thu, 25 Oct 2012 00:02:22 +1100	[thread overview]
Message-ID: <205DDA2A-1D9D-4F02-B645-242AF0B3293A@gmail.com> (raw)
In-Reply-To: <874nln3mvd.fsf@ucl.ac.uk>

> Esben Stien <b0ef@esben-stien.name> writes:
> 
>> Is there some way to go directly to a node?
>> 
>> F.ex, I have: 
>> 
>> * foo
>> ** bar..
>> ** baz..
>> ** hukarz..
>> 
>> I do C-c a s to search for baz, which brings up a buffer with baz
>> somewhere in there and I have to move down the list to hit TAB on baz.
>> 

Whoever crafted org-refile thought ahead.  C-u C-c C-w selects and jumps to the header selected rather than doing a refiling.

Just played around with that and =bookmark-set= and it works nicely with norang settings eg

#+begin_src emacs-lisp
; Targets include this file and any file contributing to the agenda - up to 4 levels deep
(setq org-refile-targets (quote ((nil :maxlevel . 2)
                                 (org-agenda-files :maxlevel . 2))))
; Use full outline paths for refile targets - we file directly with IDO
(setq org-refile-use-outline-path t)
; Targets complete directly with IDO
(setq org-outline-path-complete-in-steps nil)
; Allow refile to create parent tasks with confirmation
(setq org-refile-allow-creating-parent-nodes (quote confirm))
; every header is a refile target
(setq org-refile-target-verify-function nil)
; use IDO
(setq org-completion-use-ido t)

  (defun org-jump ()
    (interactive)
    (bookmark-set "org-jumped-from")
    (org-refile t nil nil "Jump")
    (bookmark-set "org-jumped-to"))
    
   
  (defun org-jump-back()
    (interactive)
    (if (equal (point) (bookmark-get-position "org-jumped-from"))
        (bookmark-jump "org-jumped-to")
      (if (bookmark-get-position "org-jumped-to")
          (bookmark-jump "org-jumped-from"))))
     
  
  (bind-key "C-. j" 'org-jump)
  (bind-key "C-. l" 'org-jump-back)
#+end_src

tony

 

  reply	other threads:[~2012-10-24 13:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18 23:37 Random Access Node Esben Stien
2012-10-20  5:12 ` Marcelo de Moraes Serpa
2012-10-21 14:45 ` Eric S Fraga
2012-10-24 13:02   ` tony day [this message]
2012-10-24 17:17     ` Header Jumping Darlan Cavalcante Moreira

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=205DDA2A-1D9D-4F02-B645-242AF0B3293A@gmail.com \
    --to=tonyday567@gmail.com \
    --cc=b0ef@esben-stien.name \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /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).