emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: zwz <zhangweize@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-todo-keywords-1 detection in asyn export
Date: Fri, 18 Apr 2014 22:21:54 +0800	[thread overview]
Message-ID: <87d2ged8fx.fsf@gmail.com> (raw)
In-Reply-To: 87a9bj3e1a.fsf@gmail.com

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> zwz <zhangweize@gmail.com> writes:
>
>> So here what I mean by "locally" is to adjust the org-latex-pdf-process
>> by some keywords, instead of binding it with some specific code/value
>> (which is difficult for modification)
>
> `org-latex-pdf-process' can be a function. You could send it a message
> telling it what functions to use. For example, a hook could find out
> what LaTeX class you're using and send the appropriate message to the
> function.
>

Thank you, Nicolas.
Can you give me some example code?

>> However I found it does not work in asyn export.
>
> Is is not related to async export.

I am not sure if I get you totally.
Here is what I put in my org-export-async-init-file:
(defun ox-xetex-setup ()
  (if (member "XeTeX" org-todo-keywords-1)
      (setq org-latex-default-packages-alist
                      (remove '("AUTO" "inputenc" t)
                              org-latex-default-packages-alist)
                      org-latex-pdf-process
                      '("latexmk -xelatex -pdf -silent -f %f"))))

(add-hook 'org-mode-hook (lambda () (ox-xetex-setup)))
;; instead of add-hook as above, you can just put
;; (ox-xetex-setup)
;; but again, it still calls pdflatex when export asynchronously


And in some test.org:

#+TODO: XeTeX
* test
  blah blah


When I export it asynchronously, org-export calls pdflatex rather than
xelatex to generate pdf.

And even I put (ox-xetex-setup) directly in org-export-async-init-file,
it still does not work as expected.

>
> A few variables live outside the scope of BIND keywords.
> `org-latex-pdf-process' is one of them. Though, you can always define it
> as a file local variable.
>
>
> Regards,

  reply	other threads:[~2014-04-18 14:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01  6:17 org-todo-keywords-1 detection in asyn export zwz
2014-04-17  7:07 ` Bastien
2014-04-17 10:58   ` zwz
2014-04-17 20:18     ` Nicolas Goaziou
2014-04-18 14:21       ` zwz [this message]
2014-04-18 19:13         ` Nicolas Goaziou
2014-04-19 13:47           ` zwz

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=87d2ged8fx.fsf@gmail.com \
    --to=zhangweize@gmail.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).