emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Joon Ro <joon.ro@outlook.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: export fails with "byte-code: Before first headline at position ..."
Date: Sun, 26 Apr 2015 16:13:00 -0500	[thread overview]
Message-ID: <COL125-W366A34763E17C055D6B02CEBEA0@phx.gbl> (raw)
In-Reply-To: <COL125-W477F0BBC8433577B0DC265EBEA0@phx.gbl>

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

Apparently it was caused by the following custom function for org-export-before-parsing-hook that I had to remove the subtree with "beameronly" tag:
(defun as/delete-ignored-heading (backend)
    (unless (equal backend 'beamer)
      ; 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 for others.
From: joon.ro@outlook.com
To: emacs-orgmode@gnu.org
Date: Sun, 26 Apr 2015 14:35:53 -0500
Subject: [O] export fails with "byte-code: Before first headline at position	..."




Hi,
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,Joon
 		 	   		   		 	   		  

[-- Attachment #2: Type: text/html, Size: 2276 bytes --]

      parent reply	other threads:[~2015-04-26 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-26 19:35 export fails with "byte-code: Before first headline at position ..." Joon Ro
2015-04-26 21:00 ` Rasmus
2015-04-26 21:13 ` Joon Ro [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=COL125-W366A34763E17C055D6B02CEBEA0@phx.gbl \
    --to=joon.ro@outlook.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).