From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#17839: 24.4.50; read-passwd echoes password input in non-interactive sessions Date: Fri, 11 Jul 2014 11:15:14 +0200 Message-ID: <87vbr48del.fsf@gmx.de> References: <53FA2CB5-2009-4F77-B10D-03B16CE6D715@lunaryorn.com> <87fvi9jn5w.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1405070263 25182 80.91.229.3 (11 Jul 2014 09:17:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Jul 2014 09:17:43 +0000 (UTC) Cc: Andreas Schwab , 17839@debbugs.gnu.org, Sebastian Wiesner To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 11 11:17:35 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1X5WxQ-0000q9-Bj for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jul 2014 11:17:32 +0200 Original-Received: from localhost ([::1]:43370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5WxP-00046l-RI for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jul 2014 05:17:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5Ww5-0002Qc-A1 for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 05:16:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5Wvy-0003P6-Pu for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 05:16:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5Wvy-0003Ot-Ka for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 05:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X5Wvy-0007G3-1I for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2014 05:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Jul 2014 09:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17839 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17839-submit@debbugs.gnu.org id=B17839.140507013827841 (code B ref 17839); Fri, 11 Jul 2014 09:16:01 +0000 Original-Received: (at 17839) by debbugs.gnu.org; 11 Jul 2014 09:15:38 +0000 Original-Received: from localhost ([127.0.0.1]:52948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5WvV-0007Ev-MU for submit@debbugs.gnu.org; Fri, 11 Jul 2014 05:15:37 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:53752) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5WvO-0007EX-CP for 17839@debbugs.gnu.org; Fri, 11 Jul 2014 05:15:30 -0400 Original-Received: from detlef.gmx.de ([87.146.57.149]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0M86PB-1WjCkh0vGD-00vgXV; Fri, 11 Jul 2014 11:15:18 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 10 Jul 2014 12:43:46 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-Provags-ID: V03:K0:12wgEVug0he3eh/gQYH+IKwGlIbtvdv+sXq0+yrezPZB/ATAkeP gAopH7FwejPZSsYLSiRawrFdUWIhtx5Xcgjf83htOI+XBip+GE6xkdqZOjsc3dIe5GhKL8O FBYxlk1kPXxe/eKSt8PPVFT+d5SLbq66fvyZJu1Dqu2Hx6u6N5Bm1HhvkDB//44KxyQB6sp M5XyOCrGD4BilrKEucVWw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91431 Archived-At: Stefan Monnier writes: >> Well, I've tried this 'cos I believe it is important. The idea is to >> give the prompt in read-passwd the text property 'hide-chars. In >> noninteractive mode, emacs writes "." instead of echoing the password >> while typing. You can test it with > > I think a more idiomatic way to do that would be to use a global Lisp > var that's let-bound in read-passwd. OK. There is now `read-hide-char', which triggers it. Users can let-bind it to the character they prefer for hiding. This will be used in `read-passwd', choosing the default ?. if it is not let-bound already. >> + else if (hide_chars && (c == 127)) /* DEL */ >> + { >> + /* Unfortunately, we cannot edit stdout. */ >> + // fprintf (stdout, "%c", c); >> + /* Hmm, this doesn't work for multi-byte characters. */ >> + (len > 0) && len--; >> + } > > I don't think that's worth the trouble. I've removed this. The patch is committed to the trunk as revision 117510. > Stefan Best regards, Michael.