如何每次发布一个组织文件?

问题描述 投票:0回答:1

我有一些代码块,其输出根据副作用而变化,例如它们可能是与文件名交互的 bash 脚本。我如何告诉 org-publish 每次从文件中发布某个文件?

当然,我可以每次都强制发布,但是当我可以有选择地强制发布几个文件时,这会浪费时间。我还希望它来自文件内,因为编辑我的 emacs 配置而不是编辑我已经存在的文件需要更多工作。

emacs org-mode
1个回答
0
投票

假设您描述的问题是由时间戳检查引起的,您可以自定义

org-publish-use-timestamps-flag
并将其设置为
nil

参见手册中的触发发布

14.4 Triggering Publication
===========================

Once properly configured, Org can publish with the following commands:

‘C-c C-e P x’ (‘org-publish’)
     Prompt for a specific project and publish all files that belong to
     it.

‘C-c C-e P p’ (‘org-publish-current-project’)
     Publish the project containing the current file.

‘C-c C-e P f’ (‘org-publish-current-file’)
     Publish only the current file.

‘C-c C-e P a’ (‘org-publish-all’)
     Publish every project.

   Org uses timestamps to track when a file has changed.  The above
functions normally only publish changed files.  You can override this
and force publishing of all files by giving a prefix argument to any of
the commands above, or by customizing the variable
‘org-publish-use-timestamps-flag’.  This may be necessary in particular
if files include other files via ‘SETUPFILE’ or ‘INCLUDE’ keywords.
© www.soinside.com 2019 - 2024. All rights reserved.