* async export not working for me
@ 2014-09-17 15:39 Julien Cubizolles
2014-09-17 17:03 ` Rasmus
2014-09-17 17:16 ` Nicolas Goaziou
0 siblings, 2 replies; 6+ messages in thread
From: Julien Cubizolles @ 2014-09-17 15:39 UTC (permalink / raw)
To: emacs-orgmode
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:
--8<---------------cut here---------------start------------->8---
emacs -Q
(require 'package)
(package-initialize) ;; since org is installed by package
--8<---------------cut here---------------end--------------->8---
create a test.org file with only
--8<---------------cut here---------------start------------->8---
* First Heading
* Second Heading
--8<---------------cut here---------------end--------------->8---
run
--8<---------------cut here---------------start------------->8---
C-c
C-a ;; in the export dispatcher
l
p
--8<---------------cut here---------------end--------------->8---
I get:
--8<---------------cut here---------------start------------->8---
Initializing asynchronous export process
org-export-to-file: Wrong type argument: stringp, nil
--8<---------------cut here---------------end--------------->8---
the synchronous export works fine.
If I run emacs with my regular config files, I get:
--8<---------------cut here---------------start------------->8---
Initializing asynchronous export process
Process 'org-export-process' exited abnormally
--8<---------------cut here---------------end--------------->8---
different error message but still not ok.
What could possibly go wrong ?
Julien.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: async export not working for me
2014-09-17 15:39 async export not working for me Julien Cubizolles
@ 2014-09-17 17:03 ` Rasmus
2014-09-17 19:45 ` Julien Cubizolles
2014-09-17 17:16 ` Nicolas Goaziou
1 sibling, 1 reply; 6+ messages in thread
From: Rasmus @ 2014-09-17 17:03 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: async export not working for me
2014-09-17 15:39 async export not working for me Julien Cubizolles
2014-09-17 17:03 ` Rasmus
@ 2014-09-17 17:16 ` Nicolas Goaziou
1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2014-09-17 17:16 UTC (permalink / raw)
To: Julien Cubizolles; +Cc: emacs-orgmode
Hello,
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.
[...]
> What could possibly go wrong ?
No idea. You may want to set `org-export-async-debug' to a non-nil
value and report the error.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: async export not working for me
2014-09-17 17:03 ` Rasmus
@ 2014-09-17 19:45 ` Julien Cubizolles
2014-09-18 4:41 ` Julien Cubizolles
0 siblings, 1 reply; 6+ messages in thread
From: Julien Cubizolles @ 2014-09-17 19:45 UTC (permalink / raw)
To: emacs-orgmode
Rasmus <rasmus@gmx.us> writes:
> Hi Julien,
> Probably you are somehow not loading settings "correctly". In your
> normal init file you need to set `org-export-async-init-file'.
I completely missed this part... I feel stupid now. Maybe org should
complain when this variable is not set and someone like me tries to
export async ?
I will pick what is necessary for export in my normal init file
(basically all org and latex related stuff) and give it a try.
Thanks for pointing that out. I'll have a look at your setup too.
Julien.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: async export not working for me
2014-09-17 19:45 ` Julien Cubizolles
@ 2014-09-18 4:41 ` Julien Cubizolles
2014-09-18 12:55 ` Rasmus
0 siblings, 1 reply; 6+ messages in thread
From: Julien Cubizolles @ 2014-09-18 4:41 UTC (permalink / raw)
To: emacs-orgmode
Julien Cubizolles <j.cubizolles@free.fr> writes:
> Rasmus <rasmus@gmx.us> writes:
>
>> Hi Julien,
>
>> Probably you are somehow not loading settings "correctly". In your
>> normal init file you need to set `org-export-async-init-file'.
I could get it to work at last, thank you a lot. I noticed something
though: when I run org-latex-export-to-pdf async on a very simple test
org file, the *Org Export Stack* buffer displays
--8<---------------cut here---------------start------------->8---
latex 0:07 /home/wilk/tmp/test.pdf
--8<---------------cut here---------------end--------------->8---
and the minibuffer indicates that the process completed.
When I publish a complex project, the line in this buffer is
--8<---------------cut here---------------start------------->8---
exit *Org Export Process*<6>
--8<---------------cut here---------------end--------------->8---
same as if there had been a problem. There is no success message in the
minibuffer, but no error message in the *Org Export Process* buffer.
Julien.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: async export not working for me
2014-09-18 4:41 ` Julien Cubizolles
@ 2014-09-18 12:55 ` Rasmus
0 siblings, 0 replies; 6+ messages in thread
From: Rasmus @ 2014-09-18 12:55 UTC (permalink / raw)
To: emacs-orgmode
Hi Julien,
Julien Cubizolles <j.cubizolles@free.fr> writes:
> I could get it to work at last, thank you a lot. I noticed something
> though: when I run org-latex-export-to-pdf async on a very simple test
> org file, the *Org Export Stack* buffer displays
>
> latex 0:07 /home/wilk/tmp/test.pdf
>
> and the minibuffer indicates that the process completed.
>
>
> When I publish a complex project, the line in this buffer is
>
> exit *Org Export Process*<6>
>
> same as if there had been a problem. There is no success message in the
> minibuffer, but no error message in the *Org Export Process* buffer.
Async is solid so most likely you're still facing a bug. Maybe
something is missing from your async init file that is available to
Org when you export without async — 'cause I expect the file to export
just fine without async.
I debug async errors by starting emacs -q, evaling my asyc init file
and exporting my non-functioning buffer without async.
Alternatively you should look for clues in `temporary-file-directory'
cf. the docstring of `org-export-async-debug'.
Hope it helps,
Rasmus
--
The Kids call him Billy the Saint
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-09-18 13:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 15:39 async export not working for me Julien Cubizolles
2014-09-17 17:03 ` Rasmus
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
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).