all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: "Trent W. Buck" <trentbuck@gmail.com>
Cc: emacs-pretest-bug@gnu.org, rfrancoise@debian.org
Subject: Re: Shell-command is no longer a shell
Date: Tue, 29 Jan 2008 22:06:00 +0100	[thread overview]
Message-ID: <87sl0gl4uf.fsf@gmx.de> (raw)
In-Reply-To: <20080129004351.GB10119@Clio.twb.ath.cx> (Trent W. Buck's message of "Tue, 29 Jan 2008 11:43:53 +1100")

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

"Trent W. Buck" <trentbuck@gmail.com> writes:

> I also tried M-! sh -c 'echo foo' & RET.  I notice that unlike normal
> shell-command, it creates a new *Async Shell Command* buffer each
> time, and that this buffer does not popup (in a new window).

You are a pretty good tester! Thanks a lot for this!

The appended patch shall fix it.

Best regards, Michael.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 3179 bytes --]

*** /home/albinus/src/tramp/lisp/tramp.el.~2.626.~	2008-01-28 22:10:50.000000000 +0100
--- /home/albinus/src/tramp/lisp/tramp.el	2008-01-29 21:35:59.000000000 +0100
***************
*** 3789,3795 ****
  	   ((bufferp output-buffer) output-buffer)
  	   ((stringp output-buffer) (get-buffer-create output-buffer))
  	   (output-buffer (current-buffer))
! 	   (t (generate-new-buffer
  	       (if asynchronous
  		   "*Async Shell Command*"
  		 "*Shell Command Output*")))))
--- 3789,3795 ----
  	   ((bufferp output-buffer) output-buffer)
  	   ((stringp output-buffer) (get-buffer-create output-buffer))
  	   (output-buffer (current-buffer))
! 	   (t (get-buffer-create
  	       (if asynchronous
  		   "*Async Shell Command*"
  		 "*Shell Command Output*")))))
***************
*** 3801,3822 ****
  	  (if (and (not asynchronous) error-buffer)
  	      (with-parsed-tramp-file-name default-directory nil
  		(list output-buffer (tramp-make-tramp-temp-file v)))
! 	    output-buffer)))
  
!     (prog1
! 	;; Run the process.
! 	(if (integerp asynchronous)
  	    (apply 'start-file-process "*Async Shell*" buffer args)
! 	  (apply 'process-file (car args) nil buffer nil (cdr args)))
!       ;; Insert error messages if they were separated.
!       (when (listp buffer)
! 	(with-current-buffer error-buffer (insert-file-contents (cadr buffer)))
! 	(delete-file (cadr buffer)))
!       ;; There's some output, display it.
!       (when (with-current-buffer output-buffer (> (point-max) (point-min)))
! 	(if (functionp 'display-message-or-buffer)
! 	    (funcall (symbol-function 'display-message-or-buffer) output-buffer)
! 	  (pop-to-buffer output-buffer))))))
  
  ;; File Editing.
  
--- 3801,3842 ----
  	  (if (and (not asynchronous) error-buffer)
  	      (with-parsed-tramp-file-name default-directory nil
  		(list output-buffer (tramp-make-tramp-temp-file v)))
! 	    output-buffer))
! 	 (proc (get-buffer-process output-buffer)))
  
!     ;; Check whether there is another process running.  Tramp does not
!     ;; support 2 (asynchronous) processes in parallel.
!     (when proc
!       (if (yes-or-no-p "A command is running.  Kill it? ")
! 	  (ignore-errors (kill-process proc))
! 	(error "Shell command in progress")))
! 
!     (with-current-buffer output-buffer
!       (setq buffer-read-only nil
! 	    buffer-undo-list t)
!       (erase-buffer))
! 
!     (if (integerp asynchronous)
! 	(prog1
! 	    ;; Run the process.
  	    (apply 'start-file-process "*Async Shell*" buffer args)
! 	  ;; Display output.
! 	  (pop-to-buffer output-buffer))
! 
!       (prog1
! 	  ;; Run the process.
! 	  (apply 'process-file (car args) nil buffer nil (cdr args))
! 	;; Insert error messages if they were separated.
! 	(when (listp buffer)
! 	  (with-current-buffer error-buffer
! 	    (insert-file-contents (cadr buffer)))
! 	  (delete-file (cadr buffer)))
! 	;; There's some output, display it.
! 	(when (with-current-buffer output-buffer (> (point-max) (point-min)))
! 	  (if (functionp 'display-message-or-buffer)
! 	      (funcall (symbol-function 'display-message-or-buffer)
! 		       output-buffer)
! 	    (pop-to-buffer output-buffer)))))))
  
  ;; File Editing.
  

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2008-01-29 21:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-27  4:00 Tramp 2.0 -> 2.1 migration woes Trent W. Buck
2008-01-27 13:42 ` Michael Albinus
2008-01-28  2:13   ` Trent W. Buck
2008-01-28 15:32     ` Michael Albinus
2008-01-28 15:57       ` Trent W. Buck
2008-01-28 16:31         ` Michael Albinus
2008-01-29  0:34           ` Trent W. Buck
2008-01-31 11:00             ` Michael Albinus
2008-01-31 14:51               ` Stefan Monnier
2008-01-31 15:46                 ` Michael Albinus
2008-01-27 14:57 ` Michael Albinus
2008-01-28  2:30   ` Trent W. Buck
2008-01-28 14:50     ` Host name for su(do)? (was: Tramp 2.0 -> 2.1 migration woes) Michael Albinus
2008-01-28 15:46       ` Trent W. Buck
2008-01-28 16:10         ` Host name for su(do)? Michael Albinus
2008-01-28 21:47           ` Michael Albinus
2008-01-28 20:54 ` Shell-command is no longer a shell (was: Tramp 2.0 -> 2.1 migration woes) Michael Albinus
2008-01-29  0:43   ` Trent W. Buck
2008-01-29 21:06     ` Michael Albinus [this message]
2008-01-31  2:09       ` Shell-command is no longer a shell Trent W. Buck
2008-01-29 20:58 ` sudo -s -H (was: Tramp 2.0 -> 2.1 migration woes) Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sl0gl4uf.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=rfrancoise@debian.org \
    --cc=trentbuck@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.