Subject: bug#1973 closed by Chong Yidong <[email-masked]> (Re: Bug in simple.el (Emacs version 22.2.1))

From: [email-masked] (Emacs bug Tracking System)
Date: Tue, 11 Aug 2009 04:45:04 +0000

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#1973: Bug in simple.el (Emacs version 22.2.1)

It has been closed by Chong Yidong <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <[email-masked]> by
replying to this email.

-- 
1973: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1973
Emacs Bug Tracking System
Contact [email-masked] with problems

Subject: Re: Bug in simple.el (Emacs version 22.2.1)
From: Chong Yidong <[email-masked]>
To: [email-masked]
Date: Tue, 11 Aug 2009 00:40:04 -0400

Closing Bug#1973, since async-shell-command is now in the trunk.

Subject: Bug in simple.el (Emacs version 22.2.1)
From: Sebastian Tennant <[email-masked]>
To: [email-masked]
Date: Tue, 20 Jan 2009 20:10:58 +0000

Hello all,

Asynchronous commands called via shell-command, for example:

 (shell-command "apt-get update &")

fill the buffer *Async Shell Command Output* with Ctrl-Ms, which I'm
sure is not what's intended.

My patch (attached) fixes this by using make-comint-in-buffer, rather
than start-process, to call the asynchronous process.

HTH,

Sebastian

--- /usr/share/emacs/22.2/lisp/simple-patched.el	2009-01-20 19:51:29.528333079 +0000
+++ /usr/share/emacs/22.2/lisp/simple.el	2008-03-11 01:57:32.000000000 +0000
@@ -1892,11 +1892,10 @@
 		  (erase-buffer)
 		  (display-buffer buffer)
 		  (setq default-directory directory)
-		  (setq proc (get-buffer-process
-			      (make-comint-in-buffer
-			       "Shell" buffer shell-file-name nil
-			       shell-command-switch command)))
+		  (setq proc (start-process "Shell" buffer shell-file-name
+					    shell-command-switch command))
 		  (setq mode-line-process '(":%s"))
+		  (require 'shell) (shell-mode)
 		  (set-process-sentinel proc 'shell-command-sentinel)
 		  ))
 	    (shell-command-on-region (point) (point) command