From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joon Ro Subject: Re: export fails with "byte-code: Before first headline at position ..." Date: Sun, 26 Apr 2015 16:13:00 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_5db45454-d698-4659-893b-363b045ef993_" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmTrN-0006t7-Gs for emacs-orgmode@gnu.org; Sun, 26 Apr 2015 17:13:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmTrK-0005aS-9b for emacs-orgmode@gnu.org; Sun, 26 Apr 2015 17:13:05 -0400 Received: from col004-omc1s2.hotmail.com ([65.55.34.12]:60129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmTrK-0005aN-1D for emacs-orgmode@gnu.org; Sun, 26 Apr 2015 17:13:02 -0400 In-Reply-To: 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: "emacs-orgmode@gnu.org" --_5db45454-d698-4659-893b-363b045ef993_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Apparently it was caused by the following custom function for org-export-be= fore-parsing-hook that I had to remove the subtree with "beameronly" tag: (defun as/delete-ignored-heading (backend) (unless (equal backend 'beamer) =3B remove subtree with beameronly tag (org-map-entries (lambda () (progn (org-narrow-to-subtree) (org-cut-subtree) ) ) "+beameronly" 'tree) ) ) (setq org-export-before-parsing-hook '(as/delete-ignored-heading)) What I did wrong to cause this error? It worked for sum subtrees but not fo= r others. From: joon.ro@outlook.com To: emacs-orgmode@gnu.org Date: Sun=2C 26 Apr 2015 14:35:53 -0500 Subject: [O] export fails with "byte-code: Before first headline at positio= n ..." Hi=2C When I try to export my org files I'm getting this error. For example: byte-code: Before first headline at position 1 in buffer Blog.org<2> I could not find any way to fix this - any help will be very appreciated. Thank you=2CJoon = --_5db45454-d698-4659-893b-363b045ef993_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Apparently it was caused by=  =3Bthe following =3Bcustom function for org-export-before-parsing-= hook that I had to remove the subtree with "beameronly" tag:

=
(defun as/delete-ignored-heading (backend)
 = =3B =3B =3B (unless (equal backend 'beamer)

 =3B =3B =3B =3B =3B =3B remove subtree with beameron= ly tag
 =3B =3B =3B =3B =3B (org-map-entries
&nbs= p=3B =3B =3B =3B =3B =3B (lambda ()
 =3B =3B=  =3B =3B =3B =3B =3B =3B (progn
 =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B (org-narro= w-to-subtree)
 =3B =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B (org-cut-subtree)
 =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B )
 =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B )
 =3B =3B = =3B =3B =3B =3B "+beameronly" 'tree)
 =3B =3B = =3B =3B =3B )
)

(setq org-export-before= -parsing-hook '(as/delete-ignored-heading))

What I did wrong to cause =3Bthis error? It =3Bworked = for sum subtrees but not for others.



<= hr id=3D"stopSpelling">From:=3B joon.ro@outlook.com
To:=3B emacs-o= rgmode@gnu.org
Date:=3B Sun=2C 26 Apr 2015 14:=3B35:=3B53 -0500=
Subject:=3B [O] export fails with "=3Bbyte-code:=3B Before fi= rst headline at position ..."=3B

Hi=2C

When I try to export my = org files I'm getting this error. For example:=3B

byte-code:=3B Before first headline at position 1 in buffer Blog.org&= lt=3B2>=3B

I could not find any way to fix this&= #160=3B- any help will be very appreciated.

Thank = you=2C
Joon

= = --_5db45454-d698-4659-893b-363b045ef993_--