开发者

How to (automatically) remove or prevent popping up *Async Shell Command* in emacs?

开发者 https://www.devze.com 2023-01-15 06:51 出处:网络
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.

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)))


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

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

精彩评论

暂无评论...
验证码 换一张
取 消