【问题标题】:Excluding Multiple Files in Org-mode Export Function组织模式导出功能中排除多个文件
【发布时间】:2014-03-06 22:18:52
【问题描述】:

我正在尝试找到从导出树中排除多个文件的方法。例如,在org-publish-project-alist 中的以下示例中,我排除了level-0.org,因此不会在/foo/bar/pub 以及站点地图中创建它。

("somewebproject" 
   :base-directory "/foo/bar/src"
   :base-extension "org"
   :publishing-directory "/foo/bar/pub"
   :recursive t
   :exclude "level-0.org" 
   :publishing-function org-html-publish-to-html
   :headline-levels 4 ; Just the default for this project.
   :auto-preamble t
   :auto-sitemap t
   :html-link-up "sitemap.html"
   :html-link-home "index.html"
   :sitemap-title "My Sitemap"
)

但是,我还有一个名为 level-1.org 的文件,我也想排除它,将文件放入列表中,例如 '("level-0.org" "level-1.org") 似乎也无济于事。

关于使它在这个 sn-p 中工作的任何提示,或者如果有更好的方法来做到这一点,我们将不胜感激!

【问题讨论】:

    标签: emacs elisp org-mode


    【解决方案1】:

    在阅读了实际的 org-mode 源代码后,我找到了一个解决方案。所以我在这里回答我自己的问题。

    简而言之,看起来:exclude 接受正则表达式,所以我可以使用level-0.org\\|level-1.org 或在本例中为level-..org

    【讨论】:

    • 耶!那是我缺少的,管道前的双反斜杠。谢谢!
    • 有人能解释一下为什么这里需要双反斜杠吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-19
    • 2014-05-24
    • 1970-01-01
    • 2018-05-06
    • 1970-01-01
    相关资源
    最近更新 更多