emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: async export not working for me
Date: Wed, 17 Sep 2014 19:03:27 +0200	[thread overview]
Message-ID: <87wq92ch7k.fsf@gmx.us> (raw)
In-Reply-To: 87bnqe6ytz.fsf@free.fr

Hi Julien,

Julien Cubizolles <j.cubizolles@free.fr> writes:

> I'm running org-mode 8.3beta from org-plus-contrib in melpa. I must have
> missed something obvious cause I could never get async export working.
>
> Here is what I do:
> emacs -Q
> (require 'package)
> (package-initialize) ;; since org is installed by package
>
>
> create a test.org file with only
>
> * First Heading
> * Second Heading
>
> run 
>
> C-c
> C-a ;; in the export dispatcher
> l
> p
>
> I get:
>
> Initializing asynchronous export process
> org-export-to-file: Wrong type argument: stringp, nil
>
> the synchronous export works fine.
>
> If I run emacs with my regular config files, I get:
> Initializing asynchronous export process
> Process 'org-export-process' exited abnormally
>
> different error message but still not ok.
>
> What could possibly go wrong ?

Probably you are somehow not loading settings "correctly".  In your
normal init file you need to set `org-export-async-init-file'.  In
that file you then need to make sure everything is working as
expected.  On way to debug is to start from emacs -q, load
`org-export-async-init-file' and see what error you expect.

I set `org-export-async-init-file' like the following snippet.  It's
"complicated" because my init-org-async.el loads a subset of my init
file.

(eval-after-load 'ox ;; shouldn't be byte compiled.
  '(when (and user-init-file (buffer-file-name)) ;; don't do it in async
     (setq org-export-async-init-file
           (expand-file-name "init-org-async.el" (file-name-directory user-init-file)))))

Here's my init file for async export.  Perhaps you will find a trick
that makes your files export async there.

;; initialization file for org async.

;; Note that in my init.el I use
;; orgstruct with headlines like:
;;   ;;* PRE
;;   ...
;;   ;;* ORG 
;;   ...

(defun read-between-headlines (start &optional end file)
  "Read a part of the init file.  Give a START regexp to find the
start point and optionally an end regexp."
  (save-match-data
    (let ((file (or file
                    (expand-file-name "init.el" user-emacs-directory)))
	  (end (or end  "^;+ ?\\*\\*? ?[A_Za-z0-9]+"))
	  (case-fold-search t)
	  m1 m2)
      (with-temp-buffer
	(insert-file file)
	(goto-char (point-min))
	(search-forward-regexp start)
	(setq m1 (point))
	(search-forward-regexp "^;+ ?\\*\\*? ?[A_Za-z0-9]+")
	(setq m2 (point))
	(eval-region m1 m2)))))

(mapc (lambda (x) (add-to-list 'load-path x))
      `("/usr/share/emacs/site-lisp/org"
        "/usr/share/emacs/site-lisp/org_contrib/lisp"
        ,(expand-file-name "lisp" user-emacs-directory)))

(setq user-full-name "Rasmus")
(setq user-mail-address "rasmus@gmx.us")
(require 'org) ;; loads from site lisp
(require 'ox)
(require 'cl)  ;; stupid bug in one of the org-packages? 
(setq org-export-async-debug nil)

(mapc (lambda (x) (read-between-headlines (concat ";+ ?\\*+ ?" x))) '("PRE" "ORG"))

;; from http://sachachua.com/notebook/emacs/dotemacs.el
(defun ask-user-about-lock (file opponent) "Always steal lock." t)

Hope it helps,
Rasmus

-- 
Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio

  reply	other threads:[~2014-09-17 17:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17 15:39 async export not working for me Julien Cubizolles
2014-09-17 17:03 ` Rasmus [this message]
2014-09-17 19:45   ` Julien Cubizolles
2014-09-18  4:41     ` Julien Cubizolles
2014-09-18 12:55       ` Rasmus
2014-09-17 17:16 ` Nicolas Goaziou

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=87wq92ch7k.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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).