From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Patch] Avoid recording chars when reading passwords Date: Tue, 14 Jun 2022 14:35:37 +0300 Message-ID: <83bkuvtr3q.fsf@gnu.org> References: <87edzz8dzo.fsf@elite.giraud> <834k0v5f7z.fsf@gnu.org> <8735g7vb47.fsf@elite.giraud> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14811"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Manuel Giraud , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 14 13:38:04 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o14ry-0003da-H4 for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Jun 2022 13:38:02 +0200 Original-Received: from localhost ([::1]:40810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o14rw-0006Jz-Ij for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Jun 2022 07:38:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o14pr-0004kY-G6 for emacs-devel@gnu.org; Tue, 14 Jun 2022 07:35:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33318) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o14pq-0006K6-72; Tue, 14 Jun 2022 07:35:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=DFeeRnJrj0Lvmiv7Om/yeJMWq84+/Q+Mv/432p64SwY=; b=cSUfOz43OS8i hZoteSuSJ8sXCb4k5ll+OagTMG7MJZXyom4o742RXMFL4wqyT+Ymumh55EYHnLeL5gotrR/mJ0ndP upfFsybUGP+Qhg3OG/nfQkfq8l503QYFJSIe93q/tYZzueJfL4EhHa9s3yR/oru52jpYXJHua1rsO gdBKm34OXEJXTC7L8pktgCgt9tcYyuiFfr17a/ZN7/350ipbx6saXgLckot24upZbuhOkqMrtFPIw PnmauidirW4QziFyyFnAJlQN8hyFY9Vl7NqVKbxe9QkbUOgPb8KDkLY+G2q9ckT3WuX/agAUBlOZk bS2EEpExSV8Yb+SyFjDoJw==; Original-Received: from [87.69.77.57] (port=3908 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o14po-00041y-P2; Tue, 14 Jun 2022 07:35:50 -0400 In-Reply-To: <8735g7vb47.fsf@elite.giraud> (message from Manuel Giraud on Tue, 14 Jun 2022 11:38:00 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291169 Archived-At: > From: Manuel Giraud > Cc: emacs-devel@gnu.org > Date: Tue, 14 Jun 2022 11:38:00 +0200 > > So I digged into the log and found that `inhibit--record-char' was > obsoleted in bd5c740419. > > The reason seems to be that "quail.el" was the last user of this > variable and use it to inhibit a second recording after the first > one. AFAIU, quail.el now have function (quail-add-unread-command-events) > that put a copy of those events with 'no-record into > unread-command-events to have this behaviour. > > I was not able to do the same when reading password (there is just one > read_char involved), so as Eli suggested, I choose to un-obsolete > `inhibit--record-char' and use it in `read-passwd' only. Thanks. Stefan, do you see any way of producing (no-record . CH) from "normal" input APIs, for reading input that shouldn't be echoed or recorded? If not, we will resurrect that variable and use it instead.