emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Go to heading using LISP


From: Alexander Wingård
Subject: Re: [O] Go to heading using LISP
Date: Mon, 10 Jun 2013 23:14:19 +0200

On 10 jun 2013, at 21:00, Myles English <address@hidden> wrote:

> 
> Hi Alexander,
> 
> Alexander Wingård writes:
> 
>> I want to create special key-bindings that use the org-refile goto
>> interface to jump to specific headings.
> 
> It doesn't use org-refile but this is what I use:
> 
> (defun my-goto-heading(file heading-text)
>  "Visit file `file' and goto headline `heading-text'"
>  (find-file file)
>  (org-element-map (org-element-parse-buffer 'headline) 'headline
>      (lambda (x)
>          (if (string= (org-element-property :raw-value x) heading-text)
>              (goto-char (org-element-property :begin x))
>              nil))
>   nil t)) ;; stop at first find
> 

Thanks alot! This is exactly what I was asking for. This will suffice for me 
now.
Maybe some day I will learn some LISP and teach it to navigate the hierarchical 
structure.

Best Regards /Alexander


reply via email to

[Prev in Thread] Current Thread [Next in Thread]