如何在Emacs Org-mode中启用并行PDF导出

3

最近我开始使用org-mode写一篇长文章,其中包含了很多图片、表格和代码。因此当我将org文件导出为pdf时,emacs会冻结一分钟以上才能生成pdf文件。然而,在我的观点中,我希望在导出的同时继续编写或修改文章。

所以问题来了,emacs能否使用多线程或多处理器并行处理导出呢?


3
Emacs 是单线程的。 - Barmar
1个回答

6
当然可以,因为这是emacs!
(info"(org) The export dispatcher")

‘C-a’ Toggle asynchronous export. Asynchronous export uses an external Emacs process that is configured with a specified initialization file.

 While exporting asynchronously, the output is not displayed.  It is
 stored in a list called “the export stack”, and can be viewed from
 there.  The stack can be reached by calling the dispatcher with a
 double ‘C-u’ prefix argument, or with ‘&’ key from the dispatcher.

 To make this behavior the default, customize the variable
 ‘org-export-in-background’.

因此,您可以像这样异步导出PDF:C-eC-alp

(注:该段内容是关于在IT技术中如何异步导出PDF文件的操作指南)

非常感谢,很棒。但是在我的情况下它不起作用。我将 F3 键绑定为 (global-set-key [f3] 'org-latex-export-to-pdf),当我按下 F3 键时,问题仍然存在,尽管我更改了该命令的默认值。 - Leu_Grady
2
@user3173715,如果您使用类似 (global-set-key [f3] (lambda () (interactive) (org-latex-export-to-pdf t))) 这样的东西会怎么样?(其中的 tASYNC 选项)。 - Chris
谢谢,它完美运行! - Leu_Grady

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接