From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Error because org-refile calls org-back-to-heading Date: Mon, 22 Aug 2011 08:28:09 -0500 Message-ID: <877h65h8ye.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvUY4-0006Yf-EN for emacs-orgmode@gnu.org; Mon, 22 Aug 2011 09:28:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvUY3-0003FF-6H for emacs-orgmode@gnu.org; Mon, 22 Aug 2011 09:28:16 -0400 Received: from out3.smtp.messagingengine.com ([66.111.4.27]:39140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvUY2-0003Ez-U7 for emacs-orgmode@gnu.org; Mon, 22 Aug 2011 09:28:15 -0400 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 9DCF320659 for ; Mon, 22 Aug 2011 09:28:12 -0400 (EDT) Received: from archeee (h-68-164-6-241.chcgilgm.dynamic.covad.net [68.164.6.241]) by mail.messagingengine.com (Postfix) with ESMTPSA id 16DC6860C55 for ; Mon, 22 Aug 2011 09:28:11 -0400 (EDT) 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: Org Mode I use the following function to jump quickly to first level headings in my org mode files: --8<---------------cut here---------------start------------->8--- (defun my-org-global-goto () (interactive) (let ((org-completion-use-ido t) (org-outline-path-complete-in-steps nil) (org-refile-use-outline-path nil) (org-refile-targets '((my-org-refile-targets :maxlevel . 1)))) (org-refile t) (org-reveal '(64)))) --8<---------------cut here---------------end--------------->8--- Since the commit c25165c25dc9fdb5b57b3c66b2e0ec0efdbeb7ad on August 18, I can only call this function when I am beneath the first level heading of an org-mode file. Otherwise I receive the following error: --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (error "Before first headline at position 1 in buffer *Annotate org.el (rev master)*") signal(error ("Before first headline at position 1 in buffer *Annotate org.el (rev master)*")) error("Before first headline at position %d in buffer %s" 1 #) byte-code("\300\301`p#\207" [error "Before first headline at position %d in buffer %s"] 4) org-back-to-heading(t) org-refile(t) my-org-global-goto() call-interactively(my-org-global-goto nil nil) --8<---------------cut here---------------end--------------->8--- This seems a unnecessary restriction/error when calling org-refile with the GOTO argument, since there is no need to be on a current headline when jumping to another headline. Thanks, Matt