From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: better than read-hide-char Date: Tue, 31 Jul 2018 12:10:46 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1533053363 406 195.159.176.226 (31 Jul 2018 16:09:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 31 Jul 2018 16:09:23 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 31 18:09:19 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fkXD4-0008Q8-9d for ged-emacs-devel@m.gmane.org; Tue, 31 Jul 2018 18:09:18 +0200 Original-Received: from localhost ([::1]:59724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkXF9-0005aB-CP for ged-emacs-devel@m.gmane.org; Tue, 31 Jul 2018 12:11:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkXEZ-0005Zv-Gc for emacs-devel@gnu.org; Tue, 31 Jul 2018 12:10:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fkXEW-00048J-9N for emacs-devel@gnu.org; Tue, 31 Jul 2018 12:10:51 -0400 Original-Received: from mail-qt0-x229.google.com ([2607:f8b0:400d:c0d::229]:45719) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fkXEW-00048B-4D for emacs-devel@gnu.org; Tue, 31 Jul 2018 12:10:48 -0400 Original-Received: by mail-qt0-x229.google.com with SMTP id y5-v6so16505063qti.12 for ; Tue, 31 Jul 2018 09:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=0tfvL6yopAdnAGOxw08KtFAoh6R530C4ZqXU5xFL3bw=; b=ru96Bqc32PJ6OsHvXKjASQRwZpt81hkfets2rZezuPG+h5BJTt59otNs1u+ghrFYN9 z2w7YMdUiQBGlurGAsEINO1BVdSsvLWDqSbNTSUWLnmXCGNJCNftsXEsWbFR3H5kByBj SbEfSIPq6fPAZuAmvfUoQo8dE5HWbfzCRjgCfeBD4Ukszh45vm7i5zmpsxMmaBST9a4T yC6RBTAmSYFecRrFFLouiMgoV+GLIL4DjmXKlnE/CF8dsBMoFTEzzam1elYbgisxafT5 orVpo2lr52Hl2n/uTnNRGMJJlVC7Lb7oUPPHabLvxrSEZWbfzTlNkrSjvD9qAjqkk4qF VjQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0tfvL6yopAdnAGOxw08KtFAoh6R530C4ZqXU5xFL3bw=; b=r4avEXMXDtHWurlZwvvv3rENG1FwXHLE3HbTZwuta0UTH1LqTG+26fEQ4XT0zRkNVc 2DEaIHzsz2apOQiuG0pZnRV7L1JHG6PAZAxq0VhcDU/uPARkyRP7gsFlJ2y65zaqC9bP LS2LtbxC/c+3cUKnv2QwFxTQcpaIYBiSJIjxTxGPo3RYYTniM60R9hOnM2C0OxPWP7vv zVTdRcAGstI2GLMZj85SHUejACXxXU1YfB915qLn+g22b9K72dQaPTUlaveuKrie830v cuQN7sv7y7Uuj23+EAOapQFcCcdd8xYVE4a8IPW3pbJawCdMCa7ziusARd0V5h3EkolP IBfw== X-Gm-Message-State: AOUpUlGlxWn+neW5VPlPlUXgtdwxm/uD4iEdFItfjSDYjgCH3txGK97F DfINzaK6oCi+hUiLhj+HeVvvyjK8 X-Google-Smtp-Source: AAOMgpdfla57YvDGbr6Gvg8jIvq6dw+3gSjDQ+Y3GliPzykDHYgcOEs3BULTgFecRDFW/3ZVI3D8JQ== X-Received: by 2002:a0c:ae89:: with SMTP id j9-v6mr9631263qvd.174.1533053447545; Tue, 31 Jul 2018 09:10:47 -0700 (PDT) Original-Received: from [10.8.0.6] (c-73-126-99-55.hsd1.ma.comcast.net. [73.126.99.55]) by smtp.gmail.com with ESMTPSA id r13-v6sm9065501qke.21.2018.07.31.09.10.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jul 2018 09:10:47 -0700 (PDT) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:228050 Archived-At: On 2018-07-30 22:25, Richard Stallman wrote: > How about a feature whereby instead of ******************* or ............. > the password echoes as 012345678901234567890123456789... > That way, you could tell how many characters you have successfully typed > even when they are 20, 30, 40, 50, 60 or 70 characters. > That would help people notice some mistakes in long passwords. This sounds like a good idea, but I think it'd be even better to put that information in the modeline of the window above the minibuffer, rather than in the minibuffer itself. Something like this, partly copied from eldoc: (progn (defvar passwd-mode-line nil) (put 'passwd-mode-line 'risky-local-variable t) (minibuffer-with-setup-hook (lambda () (add-hook 'minibuffer-exit-hook (lambda () (setq passwd-mode-line nil)) nil t) (let ((prefix-len (buffer-size))) (with-current-buffer (window-buffer (or (window-in-direction 'above (minibuffer-window)) (minibuffer-selected-window) (get-largest-window))) (when mode-line-format (unless (and (listp mode-line-format) (assq 'passwd-mode-line mode-line-format)) (setq mode-line-format `("" (passwd-mode-line passwd-mode-line) ,mode-line-format)))) (setq passwd-mode-line (concat (make-string (1+ prefix-len) ?\s) "0123456789012345678901234567890")) (force-mode-line-update)))) (read-passwd "Test: "))) Clément.