From mboxrd@z Thu Jan 1 00:00:00 1970 From: Darlan Cavalcante Moreira Subject: Re: Header Jumping Date: Wed, 24 Oct 2012 14:17:41 -0300 Message-ID: <508822b9.0ae2640a.44c3.ffff94bb@mx.google.com> References: <87k3unnyho.fsf@quasar.esben-stien.name> <874nln3mvd.fsf@ucl.ac.uk> <205DDA2A-1D9D-4F02-B645-242AF0B3293A@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR4aS-0003Hd-2q for emacs-orgmode@gnu.org; Wed, 24 Oct 2012 13:17:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR4aQ-0000rs-Oo for emacs-orgmode@gnu.org; Wed, 24 Oct 2012 13:17:47 -0400 Received: from mail-ye0-f169.google.com ([209.85.213.169]:59946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR4aQ-0000rl-K3 for emacs-orgmode@gnu.org; Wed, 24 Oct 2012 13:17:46 -0400 Received: by mail-ye0-f169.google.com with SMTP id q11so131449yen.0 for ; Wed, 24 Oct 2012 10:17:46 -0700 (PDT) In-Reply-To: <205DDA2A-1D9D-4F02-B645-242AF0B3293A@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: tony day Cc: emacs-orgmode@gnu.org, Esben Stien You can also pass C-u two times to go to the last refiled/captured headline, that is, "C-u C-u C-c C-w" and "C-u C-u C-c c". At Thu, 25 Oct 2012 00:02:22 +1100, tony day wrote: > > > Esben Stien 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 > > > > > >