unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* read-passwd breaks tramp
@ 2012-04-18  9:25 Liang Wang
  2012-04-18 15:01 ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: Liang Wang @ 2012-04-18  9:25 UTC (permalink / raw)
  To: emacs-devel

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 root@localhost 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.

Thanks,
Liang.



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

* Re: read-passwd breaks tramp
  2012-04-18  9:25 read-passwd breaks tramp Liang Wang
@ 2012-04-18 15:01 ` Michael Albinus
  2012-04-19  1:17   ` Liang Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2012-04-18 15:01 UTC (permalink / raw)
  To: Liang Wang; +Cc: emacs-devel

Liang Wang <netcasper@gmail.com> 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 root@localhost 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.



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

* Re: read-passwd breaks tramp
  2012-04-18 15:01 ` Michael Albinus
@ 2012-04-19  1:17   ` Liang Wang
  2012-04-19  8:41     ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: Liang Wang @ 2012-04-19  1:17 UTC (permalink / raw)
  To: Michael Albinus; +Cc: emacs-devel

On Wed, Apr 18, 2012 at 11:01 PM, Michael Albinus
<michael.albinus@gmx.de> wrote:
> Liang Wang <netcasper@gmail.com> 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 root@localhost 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?

Yes, it fixes the issue.  Thank you.

Liang

>
> --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.



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

* Re: read-passwd breaks tramp
  2012-04-19  1:17   ` Liang Wang
@ 2012-04-19  8:41     ` Michael Albinus
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2012-04-19  8:41 UTC (permalink / raw)
  To: Liang Wang; +Cc: emacs-devel

Liang Wang <netcasper@gmail.com> writes:

>> Does the following patch fixes it?
>
> Yes, it fixes the issue.  Thank you.

Thanks for the test. I've committed the patch to the trunk.

> Liang

Best regards, Michael.



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

end of thread, other threads:[~2012-04-19  8:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-18  9:25 read-passwd breaks tramp Liang Wang
2012-04-18 15:01 ` Michael Albinus
2012-04-19  1:17   ` Liang Wang
2012-04-19  8:41     ` Michael Albinus

Code repositories for project(s) associated with this public inbox

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

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).