unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Avoiding/removing the Async Shell Command buffer
@ 2011-09-27 16:19 Buchs, Kevin
  2011-09-28 10:25 ` Ludwig, Mark
  0 siblings, 1 reply; 3+ messages in thread
From: Buchs, Kevin @ 2011-09-27 16:19 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]

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 <mailto:buchs.kevin@mayo.edu>   |
http://www.mayo.edu/sppdg <http://www.mayo.edu/sppdg> 
Mayo Clinic  |  200 1st St. SW  |  Rochester, MN 55905  

 


[-- Attachment #2: Type: text/html, Size: 5124 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-28 15:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27 16:19 Avoiding/removing the Async Shell Command buffer Buchs, Kevin
2011-09-28 10:25 ` Ludwig, Mark
2011-09-28 15:19   ` Buchs, Kevin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).