Org mode 今年 8 月的 patch 可能导致相关特性没法在非 org buffer 中使用吗?

我最近在使用 shr-face 或者在 makrdown-mode 下使用 [GitHub - io12/org-fragtog: Automatically toggle Org mode LaTeX fragment previews as the cursor enters and exits them] 的时候都会出现 warning 或者 error,如下所示:

后来搜索这个问题的时候发现了 org-mode 这个 patch,似乎意思是不让非 org-mode buffer 使用 org-mode 了,请问这个更改会持续到 org-mode 9.7 吗?如果会的话,有没有什么办法使得之前的依赖于 org-mode 的插件依然正常工作呢?(会不会 poly-mode 管用呀,但是我还没有调研过)

目前我的解决办法是将 org-mode 限制在 9.6.9 ,但是似乎这样 org-appear 对于 link 和下标又不能自动展开了,会报

Error in post-command-hook (org-appear--post-cmd): (void-function org-element--property)

The packages that attempt to use Org functions outside of Org mode only work by chance. The warning just makes the problem more clear - it was added to tame an inflow of bug reports that had nothing to do with Org mode itself and were caused by trying to use Org functions improperly.

If things happen to be working for your setup as a user, nothing is changed in Org 9.7-pre except this warning being dislpayed. So, feel free to hide it locally.

试图在组织模式外使用组织功能的软件包仅偶然地工作。 警告只是使问题更加清晰 - 它被添加到驯服与ORG模式本身无关的错误报告的流入,并且是由于尝试不正确地使用ORG功能而引起的。

如果事情恰好适合您作为用户的设置工作,那么在ORG 9.7 pre中没有任何更改,除了不喜欢此警告。 因此,请随时在本地隐藏它。

And this looks like a mixed Org mode installation.


Thank you for your relpy. How can I hide it? I found this

(setq warning-minimum-level :emergency)

But I think it’s too coarse-grained. Can I just hide only this warning?

What does mixed Org mode installtion refer to? I can’t catch the concept.

(setq warning-suppress-types '((emacs)))

But I think it’s too coarse-grained. Can I just hide only this warning?

Currently, no. But you can do (setq warning-suppress-types '((org-element org-element-parser))) if you upgrade to the latest main (

It means that you have part of the Org libraries loaded from built-in Org mode version and part of the Org libraries loaded from a newer Org mode version that is installed on top.

You can try (1) ensure that you setup the correct load-path for Org mode early in your config (2) reinstall; (3) if does not help, reinstall from emacs -Q. See Update On The Org-9.6 Problem | Irreal


您可以尝试(1)确保在配置(2)重新安装的早期设置ORG模式的正确负载路径; (3)如果没有帮助,请从emacs -q重新安装。 请参阅Update On The Org-9.6 Problem | Irreal

Thanks a lot! I have another question. When I use org-fragtog in markdown-mode for some latex, it warning this, is this one same as the warning above? the warning is infinite so I can’t edit md file anymore.

That’s one of the manifestations using Org parser in non-Org buffers - Org relies upon certain buffer-local variables to operate; and these variables are not set property in non-Org buffers.

Why are you even using org-fragtog in md buffers? org-fragtog is designed for Org mode, not for md.

这是在非ORG缓冲液中使用组织解析器的表现之一 - org依赖于某些缓冲区 - 本地变量来操作; 这些变量未在非ORG缓冲区中设置属性。

为什么您甚至在MD缓冲区中使用org-fragtog? org-fragtog是为组织模式而不是MD设计的。

I am very appeciate for your patience and generous.

Sometimes I use md for writing, I hope org-fragtog can work well in md-mode(Its README has mentioned that in the last chapter).

You may report this to org-fragtog authors. From the point of view of Org mode, parsing non-Org buffers is not supported. If other packages need to parse something as Org mode, they need to arrange the buffer being parsed to use Org mode. If it is not done, the errors like you encountered may appear. Moreover, user-customized Org parser settings will not apply - for example, custom TODO keywords cannot be parsed.

您可以将此报告给Org-Fragtog作者。 从组织模式的角度来看,不支持解析非ORG缓冲区。 如果其他软件包需要将某些内容解析为ORG模式,则需要安排解析的缓冲区以使用ORG模式。 如果未完成,则可能会出现像您遇到的错误。 此外,用户注定的组织解析器设置将不应用 - 例如,无法解析自定义托尔多关键字。