From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Liang Wang Newsgroups: gmane.emacs.devel Subject: Re: read-passwd breaks tramp Date: Thu, 19 Apr 2012 09:17:05 +0800 Message-ID: References: <87bompkrsl.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1334798241 14908 80.91.229.3 (19 Apr 2012 01:17:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Apr 2012 01:17:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 19 03:17:20 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SKfzq-0006XW-Vk for ged-emacs-devel@m.gmane.org; Thu, 19 Apr 2012 03:17:19 +0200 Original-Received: from localhost ([::1]:53382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKfzq-0004ef-5Z for ged-emacs-devel@m.gmane.org; Wed, 18 Apr 2012 21:17:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKfzk-0004eF-9W for emacs-devel@gnu.org; Wed, 18 Apr 2012 21:17:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKfzf-00007N-PI for emacs-devel@gnu.org; Wed, 18 Apr 2012 21:17:11 -0400 Original-Received: from mail-wg0-f49.google.com ([74.125.82.49]:64212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKfzf-000074-Gx for emacs-devel@gnu.org; Wed, 18 Apr 2012 21:17:07 -0400 Original-Received: by wgbdr1 with SMTP id dr1so6004550wgb.30 for ; Wed, 18 Apr 2012 18:17:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=y7x17LhaoomN+a/C3Pp26oRdSay26oYtk0MKQadCc1A=; b=SmfwZItqGkAlZbs0mFEGSr86ALl6nin9IRUARCqJd4U6wxJJBTRo/ay2z5z0rkD0qd ic4KtzS6E4l5kHJqRE3754/ZojWIBavNiqYjPh5cxerR56tLMr/NlW8TbEN6nJxWggOA zB9R+2SX/29eradKGFXbUnQyEOKUTmmDYHPXIiORisjGK9RKlLb0k0DLLAstrqWvHCab dx/LdAybgmN/ROSBiBnf0F+5r85k0PrVFlVOEnkO9PQAWrQpl01Bm+ixhw4cdHZskkRs xfA2aXk34Tv9SlBdnOp9VL6buImTzoJW5W3Dooa0j+TYnlO5PkOqHvIB7aaq6+DFZu3h v9hQ== Original-Received: by 10.180.104.65 with SMTP id gc1mr447953wib.13.1334798225596; Wed, 18 Apr 2012 18:17:05 -0700 (PDT) Original-Received: by 10.223.122.209 with HTTP; Wed, 18 Apr 2012 18:17:05 -0700 (PDT) In-Reply-To: <87bompkrsl.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.49 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149795 Archived-At: On Wed, Apr 18, 2012 at 11:01 PM, Michael Albinus wrote: > Liang Wang 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 >> >> =C2=A0 =C2=A0 Tramp: Opening connection for root@localhost using sudo...= done >> >> in echo area. =C2=A0But I haven't had a chance to input password yet. = =C2=A0In >> *Messages* buffer, I can see a line of message like: >> >> =C2=A0 =C2=A0 completion--some: Command attempted to use minibuffer whil= e in minibuffer >> >> By using previous version of read-passwd, I can use tramp without proble= ms. > > 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 **** > =C2=A0(defun tramp-action-password (proc vec) > =C2=A0 =C2=A0"Query the user for a password." > =C2=A0 =C2=A0(with-current-buffer (process-buffer proc) > ! =C2=A0 =C2=A0 (tramp-check-for-regexp proc tramp-password-prompt-regexp= ) > ! =C2=A0 =C2=A0 (tramp-message vec 3 "Sending %s" (match-string 1)) > ! =C2=A0 =C2=A0 (tramp-enter-password proc) > ! =C2=A0 =C2=A0 ;; Hide password prompt. > ! =C2=A0 =C2=A0 (narrow-to-region (point-max) (point-max)))) > > =C2=A0(defun tramp-action-succeed (proc vec) > =C2=A0 =C2=A0"Signal success in finding shell prompt." > --- 3133,3144 ---- > =C2=A0(defun tramp-action-password (proc vec) > =C2=A0 =C2=A0"Query the user for a password." > =C2=A0 =C2=A0(with-current-buffer (process-buffer proc) > ! =C2=A0 =C2=A0 (let ((enable-recursive-minibuffers t)) > ! =C2=A0 =C2=A0 =C2=A0 (tramp-check-for-regexp proc tramp-password-prompt= -regexp) > ! =C2=A0 =C2=A0 =C2=A0 (tramp-message vec 3 "Sending %s" (match-string 1)= ) > ! =C2=A0 =C2=A0 =C2=A0 (tramp-enter-password proc) > ! =C2=A0 =C2=A0 =C2=A0 ;; Hide password prompt. > ! =C2=A0 =C2=A0 =C2=A0 (narrow-to-region (point-max) (point-max))))) > > =C2=A0(defun tramp-action-succeed (proc vec) > =C2=A0 =C2=A0"Signal success in finding shell prompt." > --8<---------------cut here---------------end--------------->8--- > >> Thanks, >> Liang. > > Best regards, Michael.