从命令行调用 emacsclientw 的问题
我在 Win7 上调用 emacsclientw 来处理 Org 文件。我希望 Emacs 缓冲区在处理后关闭,这样如果在 Emacs 外部编辑文件并将调用重新发送到 emacsclientw ,它将处理更改的文件。我希望缓冲区在 emacsclient --eval 结束时被终止。如果我无法得到这一点,那么只需摆脱在 emacs 之外编辑文件后重做命令行调用时收到的“文件已更改,重新加载(是或否)”提示就可以了。
下面是命令行调用,它工作正常,只是缓冲区在屏幕上的 Emacs 框架中保持打开状态,即使在终止缓冲区函数之后(尽管它说“推送到终止环”)。我知道kill-buffer不应该在emacs客户端上做我想做的事;我也尝试过 server-edit 和 server-kill-buffer ,但没有更好的结果。:
c:/users/herbert/emacsclientw -n --eval ^"(let ((org-export-
babel-evaluate nil)) (progn (find-file \^"c:/users/herbert/desktop/org_files
/gtdsample.org\^") (org-export-as-html-and-open nil) (kill-buffer) ))^"
有没有办法让 Emacs 中的缓冲区关闭?或者,如果我在 Emacs 之外编辑 gtdsample.org 文件后尝试重做相同的命令,是否有某种方法可以阻止它弹出提示?
I'm calling emacsclientw on Win7 to process an Org file. I want the Emacs buffer to be closed after processing, so that if the file is edited outside Emacs and the call is resent to emacsclientw it will process the changed file. I would like for the buffer to be killed at the end of the emacsclient --eval. If I can't get that then it would be okay to just get rid of the 'File has changed, reload (yes or no)' prompt that I get when redoing command line call after editing the file outside emacs.
Here's the command line call, which works fine except that the buffer remains open in the Emacs frame on screen even after the kill-buffer function (although it says 'pushed to the kill ring'). I know kill-buffer is not supposed to do what I want on an emacs client; I've also tried server-edit and server-kill-buffer with no better result.:
c:/users/herbert/emacsclientw -n --eval ^"(let ((org-export-
babel-evaluate nil)) (progn (find-file \^"c:/users/herbert/desktop/org_files
/gtdsample.org\^") (org-export-as-html-and-open nil) (kill-buffer) ))^"
Is there some way to get the buffer in Emacs to close? Or, is there some way to just stop it from bringing up prompt if I try to redo the same command after editing the gtdsample.org file outside of Emacs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只是一个想法,您可以尝试 (server-edit) 或 (server-switch-buffer) 而不是 (kill-buffer)。
Just a thought, you might try (server-edit) or (server-switch-buffer) instead of (kill-buffer).