需要org-mode zip,如何克服?
我有一个组织模式文档,我想将其转换为开放文档格式。当我尝试执行此操作 (ctrl
+c
+e
+o
) 时,我收到一条错误消息:
创建 OpenDocument 文件所需的可执行“zip”。正在中止。
我的机器上安装了 p7zip,但我不知道如何告诉 emacs 它在那里。我不确定 org-mode 想要做什么,所以我不确定在 .emacs 中配置什么。
谢谢
I have an org-mode document that I want to convert to open Document format. When I try to do this (ctrl
+c
+e
+o
) I get an error message:
Executeable "zip" needed for creating OpenDocument files. Aborting.
I have p7zip installed on my machine but I don't know how to tell emacs it is there. I'm not sure what org-mode want to do so I'm not sure what to configure in .emacs.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的 p7zip 可执行文件必须位于 Emacs
exec-path
变量中,以便 Emacs 可以找到它。此外,可执行文件必须名为“zip”,因为它是硬编码在 org-odt-init-outfile 函数中的。
因此,首先检查 exec-path 的设置,确保它包含 zip 可执行文件的位置。
Your p7zip executable must be in Emacs
exec-path
variable, so that Emacs can find it.Also, the executable must be called "zip" since it is hard-coded in the
org-odt-init-outfile
function.So check the setting of
exec-path
first to make sure it includes the location of your zip executable.您需要 Info-ZIP。请参阅 http://lists.gnu.org/archive/ html/emacs-orgmode/2011-07/msg00485.html
p7zip 可能与 zip 命令行实用程序不兼容,如果我通过这篇文章: http://sourceforge.net/projects/sevenzip/forums /forum/45797/topic/1521207?message=3786349。因此,我认为 p7zip 可能不是一个可行的选择。
You need Info-ZIP. See http://lists.gnu.org/archive/html/emacs-orgmode/2011-07/msg00485.html
p7zip may not be compatible with zip command-line utility, if I go by this post: http://sourceforge.net/projects/sevenzip/forums/forum/45797/topic/1521207?message=3786349. So, I think, p7zip may not be a viable option here.
不需要
p7zip
或info-zip
外部程序,Emacsdeps
附带一个 zip 程序:minizip
。 (有关更多信息,请参阅安装 Emacs Windows 支持库的最简单方法)我们需要了解的一些情况:
minizip
不支持递归 zipzip
已被硬编码在ox-odt.el
minizip
的选项与 `zip' 不兼容,所以我在
elisp 中生成了
然后将zip.bat
批处理zip.bat
的路径添加到%PATH%
(用于组织导出到 odt)和exec-path
(用于zip 文件,dired-do-compress-to
)zip.bat
:生成
zip.bat
的函数make-zip-bat
:让
zip
的简单方法> 的工作原理是将 zip.bat 的内容复制到名为 zip.bat 的文件中,并将该文件放在 exec-path 下。要查看更多更合理的Emacs:zip程序,make- zip-bat
也支持7-Zip
。Do not need
p7zip
orinfo-zip
external programs, Emacsdeps
ship with a zip program:minizip
. (for more information, see Easiest way to install Emacs Windows support libraries)The some situations we need to be known:
minizip
does not support recursive zipzip
had been hard-coded inox-odt.el
minizip
's options is not compatible with `zip'So I generated a
zip.bat
batch inelisp
then add the path ofzip.bat
to%PATH%
(for org export to odt) andexec-path
(for zip files,dired-do-compress-to
)zip.bat
:The function
make-zip-bat
that generatezip.bat
:The simple way to let
zip
works is to copy the content ofzip.bat
into a file namedzip.bat
and put that file underexec-path
. To see more More Reasonable Emacs: zip program,make-zip-bat
support7-Zip
too.