emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Bug: Modifying org-latex-pdf-process doesn't modify the async export


From: Leo Vivier
Subject: [O] Bug: Modifying org-latex-pdf-process doesn't modify the async export behaviour
Date: Fri, 6 Apr 2018 11:13:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

Hi,

I've encountered an issue trying to write a function to toggle between two org-latex-pdf-process states (short & long). The function works as intended when using synchronous export (the PDF is created with the appropriate number of steps), but it doesn't work with asynchronous export (org-latex-pdf-process isn't grabbed past the first run).

Here's my function:
# ----------------------------------------------------------------------
(defvar zaeph/org-latex-pdf-process-mode)
(defun zaeph/toggle-org-latex-pdf-process ()
  "Toggle the number of steps in the xelatex PDF process."
  (interactive)
  (if (or (not (bound-and-true-p zaeph/org-latex-pdf-process-mode))
          (string= zaeph/org-latex-pdf-process-mode "short"))
      (progn (setq org-latex-pdf-process '("xelatex -shell-escape\
-interaction nonstopmode\ -output-directory %o %f"
                                           "biber %b"
                                           "xelatex -shell-escape\
-interaction nonstopmode\ -output-directory %o %f"
                                           "xelatex -shell-escape\
-interaction nonstopmode\ -output-directory %o %f")
                   zaeph/org-latex-pdf-process-mode 'long)
             (message "XeLaTeX process mode: Long"))
    (progn (setq org-latex-pdf-process '("xelatex -shell-escape\
                                                  -interaction nonstopmode\
                                                  -output-directory %o %f")
                 zaeph/org-latex-pdf-process-mode 'short)
           (message "XeLaTeX process mode: Short"))))
(zaeph/toggle-org-latex-pdf-process)
# ----------------------------------------------------------------------

I've tried appending (org-reload) to my function, but it didn't work.
I've also tried modifying org-latex-pdf-process on a fresh emacs session prior to any async export, and I can confirm that it grabs the latest state of org-latex-pdf-process. I'd surmise that async export has a process running in the background, but I don't know how to force it to reload.

Would you have any idea?

Thanks.

Best,
--
Leo Vivier
English Studies & General Linguistics
Master Student, English Department
Rennes 2



reply via email to

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