|
From: | Buchs, Kevin |
Subject: | Avoiding/removing the Async Shell Command buffer |
Date: | Tue, 27 Sep 2011 11:19:27 -0500 |
In gnuemacs 23, I have a shell command I want to run asynchronously but I want it to not open an output buffer (except perhaps if there is an error - but that is quite unlikely). Could someone suggest an approach to solving this? Does it take creation of a custom async-shell-command variant? I have tried implementing some commands to remove that buffer, but it fails and prompts me to be sure I want to kill the buffer. Here is what I have tried: (defun org-doc () "Open PDF for Org Mode" (interactive) (async-shell-command (concat custom-dir "/org-7.7/doc/org.pdf")) ; like to have it put away the *Async Shell Command* buffer (let ( (process (get-buffer-process "*Async Shell Command*")) ) (kill-process process)) (kill-buffer "*Async Shell Command*")) Does anyone see any *mistakes* in that code? Kevin Buchs | Senior Engineer | Department of Physiology and Biomedical Engineering - SPPDG 507-538-5459 | buchs.kevin@mayo.edu | http://www.mayo.edu/sppdg |
[Prev in Thread] | Current Thread | [Next in Thread] |