all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Liang Wang <netcasper@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: read-passwd breaks tramp
Date: Wed, 18 Apr 2012 17:01:30 +0200	[thread overview]
Message-ID: <87bompkrsl.fsf@gmx.de> (raw)
In-Reply-To: <CAO+NnCaH-nV8ihocwz57h8ZUhHc-MP+MG1uKReq94gTC4-BetQ@mail.gmail.com> (Liang Wang's message of "Wed, 18 Apr 2012 17:25:22 +0800")

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.



  reply	other threads:[~2012-04-18 15:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18  9:25 read-passwd breaks tramp Liang Wang
2012-04-18 15:01 ` Michael Albinus [this message]
2012-04-19  1:17   ` Liang Wang
2012-04-19  8:41     ` 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=87bompkrsl.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=netcasper@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.