all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: mafeuser@gmail.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: emacs 23.3; tramp. remote activity adds extra login info.
Date: Mon, 25 Apr 2011 19:42:08 +0200	[thread overview]
Message-ID: <87mxjemdn3.fsf@gmx.de> (raw)
In-Reply-To: umt44o5r74w9.fsf@gmail.com

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

mafeuser@gmail.com writes:

> Hallo all!

Hi,

> There is one difference to 23.2 though.
>
> When I compile remotly, compilation buffer gets more verbose login
> prompt as it did before. Literally, "NEW" points out changes:
>
> -*- mode: compilation; default-directory: "/scpc:centos5.x86_64:/tmp/" -*-
> Compilation started at Wed Apr 20 15:51:34
>
> g++ -g -O3 -o p1 p1.cpp
> Last login: Wed Apr 20 17:51:02 2011 from 10.0.2.2      ;; "NEW"
> [root@user ~]#                                          ;; "NEW"
> Compilation finished at Wed Apr 20 15:51:36
>
> is it expected befaviour?

Nope, that is an error. The appended patch ought to save it. I'll commit
it to both Tramp 2.1 and 2.2 repositories.

Will be fixed with Emacs 23.4 (don't know, whether it will come before
Emacs 24), and Emacs 24.1.

> best regards,
> Paul.

Best regards, Michael.


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

Index: lisp/tramp-smb.el
===================================================================
RCS file: /sources/tramp/tramp/lisp/tramp-smb.el,v
retrieving revision 2.126.2.1
diff -c -r2.126.2.1 tramp-smb.el
*** lisp/tramp-smb.el	24 Jan 2011 10:09:41 -0000	2.126.2.1
--- lisp/tramp-smb.el	25 Apr 2011 17:34:24 -0000
***************
*** 1328,1334 ****
  
  	      ;; Play login scenario.
  	      (tramp-process-actions
! 	       p vec
  	       (if share
  		   tramp-smb-actions-with-share
  		 tramp-smb-actions-without-share))
--- 1328,1334 ----
  
  	      ;; Play login scenario.
  	      (tramp-process-actions
! 	       p vec nil
  	       (if share
  		   tramp-smb-actions-with-share
  		 tramp-smb-actions-without-share))
Index: lisp/tramp.el
===================================================================
RCS file: /sources/tramp/tramp/lisp/tramp.el,v
retrieving revision 2.814.2.13
diff -c -r2.814.2.13 tramp.el
*** lisp/tramp.el	12 Mar 2011 12:47:47 -0000	2.814.2.13
--- lisp/tramp.el	25 Apr 2011 17:34:39 -0000
***************
*** 4098,4104 ****
  		  (tramp-message
  		   v 6 "%s" (mapconcat 'identity (process-command p) " "))
  		  (tramp-set-process-query-on-exit-flag p nil)
! 		  (tramp-process-actions p v tramp-actions-copy-out-of-band))))
  
  	  ;; Reset the transfer process properties.
  	  (tramp-set-connection-property v "process-name" nil)
--- 4098,4105 ----
  		  (tramp-message
  		   v 6 "%s" (mapconcat 'identity (process-command p) " "))
  		  (tramp-set-process-query-on-exit-flag p nil)
! 		  (tramp-process-actions
! 		   p v nil tramp-actions-copy-out-of-band))))
  
  	  ;; Reset the transfer process properties.
  	  (tramp-set-connection-property v "process-name" nil)
***************
*** 6821,6828 ****
  	  (setq found (funcall action proc vec)))))
      found))
  
! (defun tramp-process-actions (proc vec actions &optional timeout)
!   "Perform actions until success or TIMEOUT."
    ;; Preserve message for `progress-reporter'.
    (with-temp-message ""
      ;; Enable auth-source and password-cache.
--- 6822,6832 ----
  	  (setq found (funcall action proc vec)))))
      found))
  
! (defun tramp-process-actions (proc vec pos actions &optional timeout)
!   "Perform ACTIONS until success or TIMEOUT.
! PROC and VEC indicate the remote connection to be used.  POS, if
! set, is the starting point of the region to be deleted in the
! connection buffer."
    ;; Preserve message for `progress-reporter'.
    (with-temp-message ""
      ;; Enable auth-source and password-cache.
***************
*** 6847,6853 ****
  	   (cond
  	    ((eq exit 'permission-denied) "Permission denied")
  	    ((eq exit 'process-died) "Process died")
! 	    (t "Login failed"))))))))
  
  ;; Utility functions.
  
--- 6851,6860 ----
  	   (cond
  	    ((eq exit 'permission-denied) "Permission denied")
  	    ((eq exit 'process-died) "Process died")
! 	    (t "Login failed"))))
! 	(when (numberp pos)
! 	  (with-current-buffer (tramp-get-connection-buffer vec)
! 	    (let (buffer-read-only) (delete-region pos (point)))))))))
  
  ;; Utility functions.
  
***************
*** 7523,7529 ****
    (catch 'uname-changed
      (let ((p (tramp-get-connection-process vec))
  	  (process-name (tramp-get-connection-property vec "process-name" nil))
! 	  (process-environment (copy-sequence process-environment)))
  
        ;; If too much time has passed since last command was sent, look
        ;; whether process is still alive.  If it isn't, kill it.  When
--- 7530,7537 ----
    (catch 'uname-changed
      (let ((p (tramp-get-connection-process vec))
  	  (process-name (tramp-get-connection-property vec "process-name" nil))
! 	  (process-environment (copy-sequence process-environment))
! 	  (pos (with-current-buffer (tramp-get-connection-buffer vec) (point))))
  
        ;; If too much time has passed since last command was sent, look
        ;; whether process is still alive.  If it isn't, kill it.  When
***************
*** 7677,7683 ****
  		;; Send the command.
  		(tramp-message vec 3 "Sending command `%s'" command)
  		(tramp-send-command vec command t t)
! 		(tramp-process-actions p vec tramp-actions-before-shell 60)
  		(tramp-message
  		 vec 3 "Found remote shell prompt on `%s'" l-host))
  	      ;; Next hop.
--- 7685,7691 ----
  		;; Send the command.
  		(tramp-message vec 3 "Sending command `%s'" command)
  		(tramp-send-command vec command t t)
! 		(tramp-process-actions p vec pos tramp-actions-before-shell 60)
  		(tramp-message
  		 vec 3 "Found remote shell prompt on `%s'" l-host))
  	      ;; Next hop.

  reply	other threads:[~2011-04-25 17:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21 19:58 emacs 23.3; tramp. remote activity adds extra login info mafeuser
2011-04-25 17:42 ` Michael Albinus [this message]
2011-05-01  8:56   ` mafeuser

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=87mxjemdn3.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mafeuser@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.