On 10 jun 2013, at 21:00, Myles English <[email protected]> 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
