如何(自动)删除或防止在 emacs 中弹出 *Async Sh​​ell Command*?

发布于 2024-09-18 10:36:37 字数 501 浏览 1 评论 0原文

正如此处中所要求的那样。我可以在 emacs 中运行 vi 或 mate。

问题是,运行 (async-shell-command "vi") 后,我总是弹出“*Async Sh​​ell Command”窗口。

我可以阻止弹出此窗口吗?或者,可以我修改emacs代码,让窗口一弹出就去掉?

(defun runvi ()
  (interactive)
  (let (filename (file-truename buffer-file-name))
    (setq cmd (format "/Users/smcho/bin/mvim %s" (file-truename buffer-file-name)))
    (async-shell-command cmd)))

As is asked in here. I could run vi or mate within emacs.

The problem is that after running (async-shell-command "vi"), I always have the *Async Shell Command" popped up as a window.

Can I prevent popping up this windows? Or, can I modify the emacs code to remove the window as soon as it pops up?

(defun runvi ()
  (interactive)
  (let (filename (file-truename buffer-file-name))
    (setq cmd (format "/Users/smcho/bin/mvim %s" (file-truename buffer-file-name)))
    (async-shell-command cmd)))

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

灼疼热情 2024-09-25 10:36:37

这将起作用(假设 cmd 绑定到您想要的命令,就像上面一样):

(save-window-excursion
   (async-shell-command cmd))

This will work (assuming cmd is bound to the command you want, like you have above):

(save-window-excursion
   (async-shell-command cmd))
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文