emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read-passwd breaks tramp


From: Michael Albinus
Subject: Re: read-passwd breaks tramp
Date: Wed, 18 Apr 2012 17:01:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

Liang Wang <address@hidden> writes:

> Hi,

Hi,

> In latest trunk, read-passwd change in revision 107874 breaks tramp.
> When I try to C-x C-f /sudo::/etc/fstab RET, I can see
>
>     Tramp: Opening connection for address@hidden using sudo...done
>
> in echo area.  But I haven't had a chance to input password yet.  In
> *Messages* buffer, I can see a line of message like:
>
>     completion--some: Command attempted to use minibuffer while in minibuffer
>
> By using previous version of read-passwd, I can use tramp without problems.

Does the following patch fixes it?

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs/lisp/net/tramp.el.~107957~
--- /home/albinus/src/emacs/lisp/net/tramp.el
***************
*** 3133,3143 ****
  (defun tramp-action-password (proc vec)
    "Query the user for a password."
    (with-current-buffer (process-buffer proc)
!     (tramp-check-for-regexp proc tramp-password-prompt-regexp)
!     (tramp-message vec 3 "Sending %s" (match-string 1))
!     (tramp-enter-password proc)
!     ;; Hide password prompt.
!     (narrow-to-region (point-max) (point-max))))
  
  (defun tramp-action-succeed (proc vec)
    "Signal success in finding shell prompt."
--- 3133,3144 ----
  (defun tramp-action-password (proc vec)
    "Query the user for a password."
    (with-current-buffer (process-buffer proc)
!     (let ((enable-recursive-minibuffers t))
!       (tramp-check-for-regexp proc tramp-password-prompt-regexp)
!       (tramp-message vec 3 "Sending %s" (match-string 1))
!       (tramp-enter-password proc)
!       ;; Hide password prompt.
!       (narrow-to-region (point-max) (point-max)))))
  
  (defun tramp-action-succeed (proc vec)
    "Signal success in finding shell prompt."
--8<---------------cut here---------------end--------------->8---

> Thanks,
> Liang.

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]