emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] async export not working for me


From: Rasmus
Subject: Re: [O] async export not working for me
Date: Wed, 17 Sep 2014 19:03:27 +0200
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux)

Hi Julien,

Julien Cubizolles <address@hidden> 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 "address@hidden")
(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 via email to

[Prev in Thread] Current Thread [Next in Thread]