From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Alexander_Wing=E5rd?= Subject: Re: Go to heading using LISP Date: Mon, 10 Jun 2013 23:14:19 +0200 Message-ID: <83D22E2E-B091-4BA7-8311-56F2DA9D57C4@gmail.com> References: <87wqq1oknt.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um9Q3-0005RN-6o for emacs-orgmode@gnu.org; Mon, 10 Jun 2013 17:14:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Um9Q0-0007rg-Kg for emacs-orgmode@gnu.org; Mon, 10 Jun 2013 17:14:27 -0400 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]:33631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um9Q0-0007rc-Bk for emacs-orgmode@gnu.org; Mon, 10 Jun 2013 17:14:24 -0400 Received: by mail-la0-f53.google.com with SMTP id fs12so4661608lab.26 for ; Mon, 10 Jun 2013 14:14:23 -0700 (PDT) In-Reply-To: <87wqq1oknt.fsf@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: Myles English Cc: emacs-orgmode On 10 jun 2013, at 21:00, Myles English wrote: >=20 > Hi Alexander, >=20 > Alexander Wing=E5rd writes: >=20 >> I want to create special key-bindings that use the org-refile goto >> interface to jump to specific headings. >=20 > It doesn't use org-refile but this is what I use: >=20 > (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=3D (org-element-property :raw-value x) = heading-text) > (goto-char (org-element-property :begin x)) > nil)) > nil t)) ;; stop at first find >=20 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=