From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 20 16:39:39 2018 Received: (at submit) by debbugs.gnu.org; 20 Jan 2018 21:39:40 +0000 Received: from localhost ([127.0.0.1]:36373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ed0rT-0000iG-KK for submit@debbugs.gnu.org; Sat, 20 Jan 2018 16:39:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ed0rS-0000i1-Fd for submit@debbugs.gnu.org; Sat, 20 Jan 2018 16:39:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ed0rM-0001qL-84 for submit@debbugs.gnu.org; Sat, 20 Jan 2018 16:39:33 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38997) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ed0rM-0001q7-4c for submit@debbugs.gnu.org; Sat, 20 Jan 2018 16:39:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ed0rL-00046Z-6t for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2018 16:39:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ed0rK-0001nL-54 for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2018 16:39:31 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:42398 helo=homiemail-a21.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ed0rJ-0001mm-Sw for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2018 16:39:30 -0500 Received: from homiemail-a21.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTP id EF46F1C0066 for ; Sat, 20 Jan 2018 13:39:28 -0800 (PST) Received: from localhost.linkov.net (m91-129-108-180.cust.tele2.ee [91.129.108.180]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPSA id 59D3A1C0065 for ; Sat, 20 Jan 2018 13:39:28 -0800 (PST) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 27.0.50; Password is not hidden in read-passwd Organization: LINKOV.NET Date: Sat, 20 Jan 2018 23:29:35 +0200 Message-ID: <871sikmd6o.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a regression and a security flaw. Reading a password with =E2=80=98read-passwd=E2=80=99 doesn't hide insert= ed characters anymore as it used to do in older versions. When the user has such customization: (custom-set-variables '(yank-excluded-properties t)) evaluating (read-passwd "Prompt: ") and yanking a password to the minibuffer with 'C-y' doesn't hide it as it did in Emacs 25. This can be traced down to =E2=80=98remove-yank-excluded-properties=E2=80= =99 where =E2=80=98set-text-properties=E2=80=99 used to leave =E2=80=98displa= y=E2=80=99 properties (with =E2=80=98.=E2=80=99 over inserted characters) in the minibuffer. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 21 10:59:45 2018 Received: (at 30186) by debbugs.gnu.org; 21 Jan 2018 15:59:45 +0000 Received: from localhost ([127.0.0.1]:37202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edI25-0008H1-B9 for submit@debbugs.gnu.org; Sun, 21 Jan 2018 10:59:45 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edI23-0008Go-2f for 30186@debbugs.gnu.org; Sun, 21 Jan 2018 10:59:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edI1u-00020F-Mi for 30186@debbugs.gnu.org; Sun, 21 Jan 2018 10:59:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edI1u-000209-Iv; Sun, 21 Jan 2018 10:59:34 -0500 Received: from [176.228.60.248] (port=2132 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1edI1t-0001dM-UH; Sun, 21 Jan 2018 10:59:34 -0500 Date: Sun, 21 Jan 2018 17:59:19 +0200 Message-Id: <83zi57qk2w.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-reply-to: <871sikmd6o.fsf@mail.linkov.net> (message from Juri Linkov on Sat, 20 Jan 2018 23:29:35 +0200) Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd References: <871sikmd6o.fsf@mail.linkov.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Juri Linkov > Date: Sat, 20 Jan 2018 23:29:35 +0200 > > This is a regression and a security flaw. > > Reading a password with ‘read-passwd’ doesn't hide inserted characters > anymore as it used to do in older versions. > > When the user has such customization: > > (custom-set-variables > '(yank-excluded-properties t)) > > evaluating > > (read-passwd "Prompt: ") > > and yanking a password to the minibuffer with 'C-y' doesn't hide it > as it did in Emacs 25. > > This can be traced down to ‘remove-yank-excluded-properties’ > where ‘set-text-properties’ used to leave ‘display’ properties > (with ‘.’ over inserted characters) in the minibuffer. Can you spot the commit which causes this, or bisect to find it? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 21 16:47:19 2018 Received: (at 30186) by debbugs.gnu.org; 21 Jan 2018 21:47:19 +0000 Received: from localhost ([127.0.0.1]:37444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edNSQ-0001sQ-Ng for submit@debbugs.gnu.org; Sun, 21 Jan 2018 16:47:18 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:33469 helo=homiemail-a21.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edNSQ-0001sJ-1D for 30186@debbugs.gnu.org; Sun, 21 Jan 2018 16:47:18 -0500 Received: from homiemail-a21.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTP id 00A5C1C0066; Sun, 21 Jan 2018 13:47:17 -0800 (PST) Received: from localhost.linkov.net (m91-129-108-180.cust.tele2.ee [91.129.108.180]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPSA id 1E5F51C0065; Sun, 21 Jan 2018 13:47:15 -0800 (PST) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Organization: LINKOV.NET References: <871sikmd6o.fsf@mail.linkov.net> <83zi57qk2w.fsf@gnu.org> Date: Sun, 21 Jan 2018 23:19:39 +0200 In-Reply-To: <83zi57qk2w.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 21 Jan 2018 17:59:19 +0200") Message-ID: <87bmhm7wbw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >> This can be traced down to =E2=80=98remove-yank-excluded-properties=E2= =80=99 >> where =E2=80=98set-text-properties=E2=80=99 used to leave =E2=80=98dis= play=E2=80=99 properties >> (with =E2=80=98.=E2=80=99 over inserted characters) in the minibuffer. > > Can you spot the commit which causes this, or bisect to find it? I'm trying to find a relevant commit in the git log manually because bisect is not feasible for me - =E2=80=98make=E2=80=99 takes more= than one hour to recompile. Is there a service like Travis CI that could do bisect and compile its commits and check for exit codes of the provided script containing the required condition? From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 21 20:53:37 2018 Received: (at 30186) by debbugs.gnu.org; 22 Jan 2018 01:53:37 +0000 Received: from localhost ([127.0.0.1]:37548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edRIm-0000Ch-Lx for submit@debbugs.gnu.org; Sun, 21 Jan 2018 20:53:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edRIk-0000CS-Nd for 30186@debbugs.gnu.org; Sun, 21 Jan 2018 20:53:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edRIf-000362-1b for 30186@debbugs.gnu.org; Sun, 21 Jan 2018 20:53:29 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edRIc-00035B-VA; Sun, 21 Jan 2018 20:53:26 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1edRIc-0007t8-Bv; Sun, 21 Jan 2018 20:53:26 -0500 From: Glenn Morris To: Juri Linkov Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd References: <871sikmd6o.fsf@mail.linkov.net> X-Spook: Emergency response Sonora ASO Comirex Emergency X-Ran: DlI)$#T~0Xq~K;GJ?$FL@M>{QCFgO}M`,4`pov#Zx~mw7u..z5>;f@SW]0g4I?^$ X-Hue: red X-Debbugs-No-Ack: yes X-Attribution: GM Date: Sun, 21 Jan 2018 20:53:26 -0500 In-Reply-To: <871sikmd6o.fsf@mail.linkov.net> (Juri Linkov's message of "Sat, 20 Jan 2018 23:29:35 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Juri Linkov wrote: > and yanking a password to the minibuffer with 'C-y' doesn't hide it > as it did in Emacs 25. In my tests, this stopped working in Emacs 25.1. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 22 13:27:13 2018 Received: (at 30186) by debbugs.gnu.org; 22 Jan 2018 18:27:13 +0000 Received: from localhost ([127.0.0.1]:38399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edgoL-0003Rp-8X for submit@debbugs.gnu.org; Mon, 22 Jan 2018 13:27:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51215) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edgoK-0003Rd-3x for 30186@debbugs.gnu.org; Mon, 22 Jan 2018 13:27:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edgoE-00004q-7l for 30186@debbugs.gnu.org; Mon, 22 Jan 2018 13:27:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edgoB-0008VC-6b; Mon, 22 Jan 2018 13:27:03 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1edgo9-0006Wi-F0; Mon, 22 Jan 2018 13:27:01 -0500 From: Glenn Morris To: Juri Linkov Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd References: <871sikmd6o.fsf@mail.linkov.net> <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> X-Spook: Police FDA Montenegro codes high security Centro Syria X-Ran: 8_z5Mr<5M44A,S}ulK4Xc`_W9=Q9s!.m|P%iP X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 22 Jan 2018 13:27:01 -0500 In-Reply-To: <87bmhm7wbw.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 21 Jan 2018 23:19:39 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30186 Cc: Eli Zaretskii , 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Juri Linkov wrote: > I'm trying to find a relevant commit in the git log manually > because bisect is not feasible for me - 'make' takes more than > one hour to recompile. Ouch. Some tips: 0) Keep old versions around to identify start/end ranges 1) Use a configure cache (one that does not get cleaned) 2) Do a minimal build. I use: make -C lib all; make -C src emacs 3) M0r3 cor3z (About 90 seconds per revision for me with this approach.) Anyway, I bisected it for you, to c5e89be20a3feba9c67be6855b1dbdc6d8ae5ce2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 22 13:45:39 2018 Received: (at 30186) by debbugs.gnu.org; 22 Jan 2018 18:45:39 +0000 Received: from localhost ([127.0.0.1]:38404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edh6A-0003tj-Re for submit@debbugs.gnu.org; Mon, 22 Jan 2018 13:45:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edh69-0003tV-Ah for 30186@debbugs.gnu.org; Mon, 22 Jan 2018 13:45:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edh63-0003GW-BU for 30186@debbugs.gnu.org; Mon, 22 Jan 2018 13:45:32 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edh60-0003EY-LD; Mon, 22 Jan 2018 13:45:28 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1edh60-0006kG-0p; Mon, 22 Jan 2018 13:45:28 -0500 From: Glenn Morris To: Juri Linkov Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd References: <871sikmd6o.fsf@mail.linkov.net> <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> X-Spook: CISU SAPO Serbian Disaster management Failure Baranyi X-Ran: :/ZT]KC^vJLLtlIn7"`e,iQs)fCMx:sN[AwD'GF5g}N9IT!%Wd,Af!ag4h0uAAz]d5!~M< X-Hue: yellow X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 22 Jan 2018 13:45:27 -0500 In-Reply-To: (Glenn Morris's message of "Mon, 22 Jan 2018 13:27:01 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Glenn Morris wrote: > Anyway, I bisected it for you, to > c5e89be20a3feba9c67be6855b1dbdc6d8ae5ce2 Here's the discussion reference that should have been in the commit message: http://lists.gnu.org/r/emacs-devel/2015-04/msg00506.html From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 22 16:45:54 2018 Received: (at 30186) by debbugs.gnu.org; 22 Jan 2018 21:45:54 +0000 Received: from localhost ([127.0.0.1]:38630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edjuc-0000Fx-0o for submit@debbugs.gnu.org; Mon, 22 Jan 2018 16:45:54 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:46638 helo=homiemail-a21.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edjuZ-0000Fn-VX for 30186@debbugs.gnu.org; Mon, 22 Jan 2018 16:45:52 -0500 Received: from homiemail-a21.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTP id 11D9A1C0065; Mon, 22 Jan 2018 13:45:51 -0800 (PST) Received: from localhost.linkov.net (m91-129-108-180.cust.tele2.ee [91.129.108.180]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPSA id 3E51C1C0062; Mon, 22 Jan 2018 13:45:50 -0800 (PST) From: Juri Linkov To: Glenn Morris Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Organization: LINKOV.NET References: <871sikmd6o.fsf@mail.linkov.net> <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> Date: Mon, 22 Jan 2018 23:38:00 +0200 In-Reply-To: (Glenn Morris's message of "Mon, 22 Jan 2018 13:45:27 -0500") Message-ID: <87y3kp8thj.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> Anyway, I bisected it for you, to >> c5e89be20a3feba9c67be6855b1dbdc6d8ae5ce2 Thank you very much, I was considering creating a service that would read git-bisect params in a webform and run a multi-core VM instance, but with your tips it should be doable locally. > Here's the discussion reference that should have been in the commit mes= sage: > > http://lists.gnu.org/r/emacs-devel/2015-04/msg00506.html I confirm that after removing with-silent-modifications from remove-yank-excluded-properties, C-y leaves =E2=80=98display=E2=80=99 pro= perties in the minibuffer. It's =E2=80=98(inhibit-modification-hooks t)=E2=80=99= in let-bind of with-silent-modifications that prevents read-passwd from calling hide-chars-fun again to put new =E2=80=98display=E2=80=99 pr= operties after set-text-properties removes old ones. So this patch should fix this issue, but I'm not sure if this is right. diff --git a/lisp/subr.el b/lisp/subr.el index 092850a..8673547 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3041,7 +3041,8 @@ remove-yank-excluded-properties (setq run-start run-end))))) (with-silent-modifications (if (eq yank-excluded-properties t) - (set-text-properties start end nil) + (let ((inhibit-modification-hooks nil)) + (set-text-properties start end nil)) (remove-list-of-text-properties start end yank-excluded-properti= es))))) =20 (defvar yank-undo-function) From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 23 17:05:15 2018 Received: (at 30186) by debbugs.gnu.org; 23 Jan 2018 22:05:15 +0000 Received: from localhost ([127.0.0.1]:40091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ee6gt-0001wT-8j for submit@debbugs.gnu.org; Tue, 23 Jan 2018 17:05:15 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:60184 helo=homiemail-a21.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ee6gr-0001wE-AD for 30186@debbugs.gnu.org; Tue, 23 Jan 2018 17:05:14 -0500 Received: from homiemail-a21.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTP id DA8ED1C0064; Tue, 23 Jan 2018 14:05:12 -0800 (PST) Received: from localhost.linkov.net (m91-129-108-180.cust.tele2.ee [91.129.108.180]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPSA id D56FF1C0062; Tue, 23 Jan 2018 14:05:11 -0800 (PST) From: Juri Linkov To: Alan Mackenzie Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Organization: LINKOV.NET References: <871sikmd6o.fsf@mail.linkov.net> <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> <87y3kp8thj.fsf@mail.linkov.net> Date: Tue, 23 Jan 2018 23:38:10 +0200 In-Reply-To: <87y3kp8thj.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 22 Jan 2018 23:38:00 +0200") Message-ID: <87372w8ddp.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: Glenn Morris , 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi Alan, Do you agree we could remove the effect of with-silent-modifications around set-text-properties, and leave it only on remove-list-of-text-properties? This will help to fix the reported regression. >>> Anyway, I bisected it for you, to >>> c5e89be20a3feba9c67be6855b1dbdc6d8ae5ce2 > >> Here's the discussion reference that should have been in the commit me= ssage: >> >> http://lists.gnu.org/r/emacs-devel/2015-04/msg00506.html > > I confirm that after removing with-silent-modifications from > remove-yank-excluded-properties, C-y leaves =E2=80=98display=E2=80=99 p= roperties > in the minibuffer. It's =E2=80=98(inhibit-modification-hooks t)=E2=80=99= in > let-bind of with-silent-modifications that prevents read-passwd > from calling hide-chars-fun again to put new =E2=80=98display=E2=80=99 = properties > after set-text-properties removes old ones. So this patch should > fix this issue, but I'm not sure if this is right. > > diff --git a/lisp/subr.el b/lisp/subr.el > index 092850a..8673547 100644 > --- a/lisp/subr.el > +++ b/lisp/subr.el > @@ -3041,7 +3041,8 @@ remove-yank-excluded-properties > (setq run-start run-end))))) > (with-silent-modifications > (if (eq yank-excluded-properties t) > - (set-text-properties start end nil) > + (let ((inhibit-modification-hooks nil)) > + (set-text-properties start end nil)) > (remove-list-of-text-properties start end yank-excluded-proper= ties))))) > =20 > (defvar yank-undo-function) From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 25 12:47:30 2018 Received: (at 30186) by debbugs.gnu.org; 25 Jan 2018 17:47:30 +0000 Received: from localhost ([127.0.0.1]:42783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eelcY-0005Tt-LE for submit@debbugs.gnu.org; Thu, 25 Jan 2018 12:47:30 -0500 Received: from colin.muc.de ([193.149.48.1]:54799 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1eelcW-0005Tj-0i for 30186@debbugs.gnu.org; Thu, 25 Jan 2018 12:47:28 -0500 Received: (qmail 29715 invoked by uid 3782); 25 Jan 2018 17:47:26 -0000 Received: from acm.muc.de (p548C7553.dip0.t-ipconnect.de [84.140.117.83]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 25 Jan 2018 18:47:25 +0100 Received: (qmail 4126 invoked by uid 1000); 25 Jan 2018 17:39:38 -0000 Date: Thu, 25 Jan 2018 17:39:38 +0000 To: Juri Linkov Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Message-ID: <20180125173937.GA3857@ACM> References: <871sikmd6o.fsf@mail.linkov.net> <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87372w8ddp.fsf@mail.linkov.net> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: Glenn Morris , 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Juri. On Tue, Jan 23, 2018 at 23:38:10 +0200, Juri Linkov wrote: > Hi Alan, > Do you agree we could remove the effect of > with-silent-modifications around set-text-properties, > and leave it only on remove-list-of-text-properties? > This will help to fix the reported regression. I'm not sure about this. Doesn't `set-text-properties' need to be "protected", too? I'm not sure why you want to do this. Why do you want to do this? One thing which is puzzling me is that `with-silent-modifications' is a macro which is defined in subr.el, but later in the file. Won't this invocation of w-s-m get compiled as a function call because of this? > >>> Anyway, I bisected it for you, to > >>> c5e89be20a3feba9c67be6855b1dbdc6d8ae5ce2 > >> Here's the discussion reference that should have been in the commit message: > >> http://lists.gnu.org/r/emacs-devel/2015-04/msg00506.html > > I confirm that after removing with-silent-modifications from > > remove-yank-excluded-properties, C-y leaves ‘display’ properties > > in the minibuffer. It's ‘(inhibit-modification-hooks t)’ in > > let-bind of with-silent-modifications that prevents read-passwd > > from calling hide-chars-fun again to put new ‘display’ properties > > after set-text-properties removes old ones. So this patch should > > fix this issue, but I'm not sure if this is right. > > diff --git a/lisp/subr.el b/lisp/subr.el > > index 092850a..8673547 100644 > > --- a/lisp/subr.el > > +++ b/lisp/subr.el > > @@ -3041,7 +3041,8 @@ remove-yank-excluded-properties > > (setq run-start run-end))))) > > (with-silent-modifications > > (if (eq yank-excluded-properties t) > > - (set-text-properties start end nil) > > + (let ((inhibit-modification-hooks nil)) > > + (set-text-properties start end nil)) > > (remove-list-of-text-properties start end yank-excluded-properties))))) > > (defvar yank-undo-function) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 25 16:44:03 2018 Received: (at 30186) by debbugs.gnu.org; 25 Jan 2018 21:44:03 +0000 Received: from localhost ([127.0.0.1]:42890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eepJT-0002St-8c for submit@debbugs.gnu.org; Thu, 25 Jan 2018 16:44:03 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:48842 helo=homiemail-a18.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eepJR-0002SN-G9 for 30186@debbugs.gnu.org; Thu, 25 Jan 2018 16:44:01 -0500 Received: from homiemail-a18.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTP id 5A259258067; Thu, 25 Jan 2018 13:44:00 -0800 (PST) Received: from localhost.linkov.net (m91-129-109-224.cust.tele2.ee [91.129.109.224]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTPSA id 49FA7258066; Thu, 25 Jan 2018 13:43:59 -0800 (PST) From: Juri Linkov To: Alan Mackenzie Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Organization: LINKOV.NET References: <871sikmd6o.fsf@mail.linkov.net> <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> Date: Thu, 25 Jan 2018 23:15:41 +0200 In-Reply-To: <20180125173937.GA3857@ACM> (Alan Mackenzie's message of "Thu, 25 Jan 2018 17:39:38 +0000") Message-ID: <87vafp7i82.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: Glenn Morris , 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> Do you agree we could remove the effect of >> with-silent-modifications around set-text-properties, >> and leave it only on remove-list-of-text-properties? >> This will help to fix the reported regression. > > I'm not sure about this. Doesn't `set-text-properties' need to be > "protected", too? I'm not sure either. Do you think that `set-text-properties' without `with-silent-modifications' will cause the same problem that you described in http://lists.gnu.org/r/emacs-devel/2015-04/msg00506.html > I'm not sure why you want to do this. Why do you want to do this? Doing yank `C-y' in the minibuffer of `read-passwd' puts dots `.' over the yanked characters using `display' properties, then later `set-text-properties' removes all properties (exposing the yanked characters), but without `with-silent-modifications' it used to put `display' properties back. After the change that added `with-silent-modifications', the hook that puts `display' properties back doesn't run. > One thing which is puzzling me is that `with-silent-modifications' is a > macro which is defined in subr.el, but later in the file. Won't this > invocation of w-s-m get compiled as a function call because of this? `with-silent-modifications' is a macro that let-binds `inhibit-modification-hooks' to `t', thus preventing the hook in `read-passwd' from running. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 26 13:45:05 2018 Received: (at 30186) by debbugs.gnu.org; 26 Jan 2018 18:45:05 +0000 Received: from localhost ([127.0.0.1]:44016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ef8zo-0000qf-NB for submit@debbugs.gnu.org; Fri, 26 Jan 2018 13:45:04 -0500 Received: from colin.muc.de ([193.149.48.1]:35817 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ef8zn-0000qQ-3t for 30186@debbugs.gnu.org; Fri, 26 Jan 2018 13:45:03 -0500 Received: (qmail 18252 invoked by uid 3782); 26 Jan 2018 18:45:01 -0000 Received: from acm.muc.de (p548C775F.dip0.t-ipconnect.de [84.140.119.95]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 26 Jan 2018 19:45:01 +0100 Received: (qmail 5399 invoked by uid 1000); 26 Jan 2018 18:37:02 -0000 Date: Fri, 26 Jan 2018 18:37:02 +0000 To: Juri Linkov Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Message-ID: <20180126183702.GA5056@ACM> References: <871sikmd6o.fsf@mail.linkov.net> <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87vafp7i82.fsf@mail.linkov.net> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: Glenn Morris , 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Juri. Firstly, apologies for answering your first post without having understood it properly. On Thu, Jan 25, 2018 at 23:15:41 +0200, Juri Linkov wrote: > >> Do you agree we could remove the effect of > >> with-silent-modifications around set-text-properties, > >> and leave it only on remove-list-of-text-properties? > >> This will help to fix the reported regression. > > I'm not sure about this. Doesn't `set-text-properties' need to be > > "protected", too? > I'm not sure either. Do you think that `set-text-properties' without > `with-silent-modifications' will cause the same problem that you > described in http://lists.gnu.org/r/emacs-devel/2015-04/msg00506.html set-text-properties outwith a with-silent-modifications will most definitely cause that problem. > > I'm not sure why you want to do this. Why do you want to do this? > Doing yank `C-y' in the minibuffer of `read-passwd' puts dots `.' > over the yanked characters using `display' properties, then later > `set-text-properties' removes all properties (exposing the yanked > characters), but without `with-silent-modifications' it used to put > `display' properties back. OK, I understand this, now. > After the change that added `with-silent-modifications', > the hook that puts `display' properties back doesn't run. Yes. [ .... ] The problem here appears to be a fundamental design bug in Emacs: that text properties are regarded as part of the buffer rather than something accompanying the buffer, as overlays are. before/after-change-functions are applied alike to proper buffer changes and text property changes. read-passwd absolutely needs an after-change-function to run on the text-property changes in remove-yank-excluded-properties. This seems fair enough. CC Mode absolutely requires the change hooks _not_ to run on the text-property changes in remove-yank-excluded-properties. The two conflict with eachother. A workaround might be for read-passwd to use an overlay rather than a text property for display. But this doesn't solve the underlying problem. I now see that the invocation of with-silent-modifications in remove-yank-excluded-properties is not the Right Thing. It breaks the model of text properties being an integral part of the buffer. Perhaps an alternative would be for Emacs to provide a flag which indicates to a before/after-change-function whether the current change is a "proper" change or merely a text property change. Change hook functions could then test this flag and, for example, refrain from doing anything for a text property change. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 26 14:08:38 2018 Received: (at 30186) by debbugs.gnu.org; 26 Jan 2018 19:08:38 +0000 Received: from localhost ([127.0.0.1]:44045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ef9Mc-0001UM-7W for submit@debbugs.gnu.org; Fri, 26 Jan 2018 14:08:38 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ef9Ma-0001U7-H3 for 30186@debbugs.gnu.org; Fri, 26 Jan 2018 14:08:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ef9MQ-0007gi-OA for 30186@debbugs.gnu.org; Fri, 26 Jan 2018 14:08:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ef9MQ-0007gN-Jz; Fri, 26 Jan 2018 14:08:26 -0500 Received: from [176.228.60.248] (port=1749 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ef9MP-00005h-2Z; Fri, 26 Jan 2018 14:08:25 -0500 Date: Fri, 26 Jan 2018 21:08:24 +0200 Message-Id: <831sicl9p3.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20180126183702.GA5056@ACM> (message from Alan Mackenzie on Fri, 26 Jan 2018 18:37:02 +0000) Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd References: <871sikmd6o.fsf@mail.linkov.net> <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> <20180126183702.GA5056@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Fri, 26 Jan 2018 18:37:02 +0000 > From: Alan Mackenzie > Cc: 30186@debbugs.gnu.org > > The problem here appears to be a fundamental design bug in Emacs: that > text properties are regarded as part of the buffer rather than something > accompanying the buffer, as overlays are. It's not a bug, it's a feature (and a very important one). From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 26 15:08:29 2018 Received: (at 30186) by debbugs.gnu.org; 26 Jan 2018 20:08:29 +0000 Received: from localhost ([127.0.0.1]:44083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efAIX-00033M-Av for submit@debbugs.gnu.org; Fri, 26 Jan 2018 15:08:29 -0500 Received: from colin.muc.de ([193.149.48.1]:17836 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1efAIV-00033E-Rf for 30186@debbugs.gnu.org; Fri, 26 Jan 2018 15:08:28 -0500 Received: (qmail 42406 invoked by uid 3782); 26 Jan 2018 20:08:26 -0000 Received: from acm.muc.de (p548C775F.dip0.t-ipconnect.de [84.140.119.95]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 26 Jan 2018 21:08:25 +0100 Received: (qmail 7502 invoked by uid 1000); 26 Jan 2018 20:00:27 -0000 Date: Fri, 26 Jan 2018 20:00:27 +0000 To: Eli Zaretskii Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Message-ID: <20180126200027.GB5056@ACM> References: <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> <20180126183702.GA5056@ACM> <831sicl9p3.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <831sicl9p3.fsf@gnu.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Good evening, Eli. On Fri, Jan 26, 2018 at 21:08:24 +0200, Eli Zaretskii wrote: > > Date: Fri, 26 Jan 2018 18:37:02 +0000 > > From: Alan Mackenzie > > Cc: 30186@debbugs.gnu.org > > The problem here appears to be a fundamental design bug in Emacs: that > > text properties are regarded as part of the buffer rather than something > > accompanying the buffer, as overlays are. > It's not a bug, it's a feature (and a very important one). Yes. We see its utility in read-passwd. But don't worry, I wasn't proposing to "fix" it. :-) Do you have any opinion on my suggestion: > > Perhaps an alternative would be for Emacs to provide a flag which > > indicates to a before/after-change-function whether the current > > change is a "proper" change or merely a text property change. > > Change hook functions could then test this flag and, for example, > > refrain from doing anything for a text property change. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 03:28:02 2018 Received: (at 30186) by debbugs.gnu.org; 27 Jan 2018 08:28:02 +0000 Received: from localhost ([127.0.0.1]:44319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efLqD-0007bB-RP for submit@debbugs.gnu.org; Sat, 27 Jan 2018 03:28:02 -0500 Received: from mout.gmx.net ([212.227.17.22]:53078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efLqC-0007az-Bf for 30186@debbugs.gnu.org; Sat, 27 Jan 2018 03:28:01 -0500 Received: from [192.168.1.100] ([212.95.5.248]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lx5hl-1eqm211mob-016fPS; Sat, 27 Jan 2018 09:27:48 +0100 Message-ID: <5A6C3802.1050603@gmx.at> Date: Sat, 27 Jan 2018 09:27:46 +0100 From: martin rudalics MIME-Version: 1.0 To: Alan Mackenzie , Juri Linkov Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd References: <871sikmd6o.fsf@mail.linkov.net> <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> <20180126183702.GA5056@ACM> In-Reply-To: <20180126183702.GA5056@ACM> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:0yS7WsJRcqcy/KBw8XuE612nhysvYjaY9jQjNmM1skLtD7HWUY/ 5BTOQImE4qAtf2fw7X6+2DyFQHTUvVkAs8HNeLNLKpQMwcSPwfF9bg0zldIKGispPCvgPHc zIynkbJkB/8gydYuewtKwoJDhhitVQ+5hgfX9Vwqo2SLwuFGMvb+Hn3vh/bj/yYP07hOCiP IUU8SOkIxLMWYQL8L2YGA== X-UI-Out-Filterresults: notjunk:1;V01:K0:LPuYh2NDzHg=:bphfQUOef3D0p/LOwinZIC /ISZrIhiWwxExAbqqBjzOpyE0LdIB0yv4YV9kIoiYq4aT9Mxk0ErAL+T1btOL/us/k3i1HUGy Z0sDY5Ji8pkXSr8pvrxTMklgyRxnZUnx3Av1AcMn4+xeHcBkTBV9GpXs3ryBbPWA62g4ABcLV HqfBvJLecCOSVwFWv8QcjdVG6Xya13pWU+UQHOc3J8q5SzNXiIQoP/eUTeD8ob52n3htrE+Z/ +PRjZtGli2evL60NAHnqChXMBPz1dUQYgGPueB+QGCrnDXJxjjWq7xZ2KnudHp5/t6VWM9UyK VgBo/VecXrVHLvEWLOnGTQzXizjgAqvA2GF9U4WiAO4teCgy00egawThiVJzS1H9WC0EgsC5M h6G39zkZdWUW888iuksnMhr/O+gPdcxuDc4Z3ONBTu0hzXzsim3b5D9s4pDHNy140SfEE6aKq HnPow2lwhZx3tb88vcJaiBaF54B+Z4zKMcRSlGHANgbC5zYWi59kO1w1bVQW/0I/I9zPu2UuV 763XIX0EEk1IhKMcOSch3BNUE91bS/Wx90EiahDq3lMPaRbkdRl14EoVl7pZFRnposSFw3g2z KGOdJIpk9GQ4CAbkAhVN2ANgt4ACgilBR9y1CfghAMNtIKJAGFJ/cWztrvZ2F58exEfvIMUXO 2+XnVYbeYRamfn/WBuCV7+ha88szasfcMz0IjmpHlrqHkHWZVyc6E//Qx7tPp8XpnL+Vsy4sO FDiDAM59Jf4OrrzB+AbepTWli90aSRonL4B0cjDL6hl0RyK3svN3y/pZQ3biwqVbTC0a9T4je POYJgWE500UNBMa5uvSTmZaQ1OyxEUM/J5umqdWWPU+TlmdNagDMrjyrvdmlDlM8cjVnaB1 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > The problem here appears to be a fundamental design bug in Emacs: that > text properties are regarded as part of the buffer rather than something > accompanying the buffer, as overlays are. Is that interpretation correct? I always regard text properties part of some text (as they are retained when copying text from one buffer to another) and only their text part of the buffer. And I do regard overlays parts of their buffers. Am I wrong? martin From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 04:29:44 2018 Received: (at 30186) by debbugs.gnu.org; 27 Jan 2018 09:29:44 +0000 Received: from localhost ([127.0.0.1]:44343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efMnw-0000eo-1N for submit@debbugs.gnu.org; Sat, 27 Jan 2018 04:29:44 -0500 Received: from colin.muc.de ([193.149.48.1]:59270 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1efMns-0000ed-4O for 30186@debbugs.gnu.org; Sat, 27 Jan 2018 04:29:42 -0500 Received: (qmail 95786 invoked by uid 3782); 27 Jan 2018 09:29:37 -0000 Received: from acm.muc.de (p548C7E39.dip0.t-ipconnect.de [84.140.126.57]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 27 Jan 2018 10:29:29 +0100 Received: (qmail 4345 invoked by uid 1000); 27 Jan 2018 09:21:24 -0000 Date: Sat, 27 Jan 2018 09:21:24 +0000 To: martin rudalics Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Message-ID: <20180127092124.GA4049@ACM> References: <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> <20180126183702.GA5056@ACM> <5A6C3802.1050603@gmx.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A6C3802.1050603@gmx.at> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Martin. On Sat, Jan 27, 2018 at 09:27:46 +0100, martin rudalics wrote: > > The problem here appears to be a fundamental design bug in Emacs: > > that text properties are regarded as part of the buffer rather than > > something accompanying the buffer, as overlays are. > Is that interpretation correct? No. I'm half joking. But an awful lot of Lisp code runs an awful lot of code separating text properties from actual text, mainly by preventing the change hooks being run for text property changes. read-passwd is an example (the only one I know) of the change hooks being an essential part of text property manipulation. > I always regard text properties part of some text (as they are retained > when copying text from one buffer to another) and only their text part > of the buffer. And I do regard overlays parts of their buffers. Am I > wrong? Text properties are indeed part of the buffer (or string). But I don't think overlays are - if you have an overlay on part of a buffer, and copy that part into a string, I don't think the overlay stays on the copy. > martin -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 04:40:46 2018 Received: (at 30186) by debbugs.gnu.org; 27 Jan 2018 09:40:46 +0000 Received: from localhost ([127.0.0.1]:44366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efMyc-0000vf-2H for submit@debbugs.gnu.org; Sat, 27 Jan 2018 04:40:46 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efMyb-0000vU-7E for 30186@debbugs.gnu.org; Sat, 27 Jan 2018 04:40:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efMyS-0002CG-Gf for 30186@debbugs.gnu.org; Sat, 27 Jan 2018 04:40:39 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efMyS-0002CA-DL; Sat, 27 Jan 2018 04:40:36 -0500 Received: from [176.228.60.248] (port=2486 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1efMyR-0007Z4-MU; Sat, 27 Jan 2018 04:40:36 -0500 Date: Sat, 27 Jan 2018 11:40:36 +0200 Message-Id: <83r2qbk5bf.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20180126200027.GB5056@ACM> (message from Alan Mackenzie on Fri, 26 Jan 2018 20:00:27 +0000) Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd References: <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> <20180126183702.GA5056@ACM> <831sicl9p3.fsf@gnu.org> <20180126200027.GB5056@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Fri, 26 Jan 2018 20:00:27 +0000 > Cc: juri@linkov.net, 30186@debbugs.gnu.org > From: Alan Mackenzie > > Do you have any opinion on my suggestion: > > > > Perhaps an alternative would be for Emacs to provide a flag which > > > indicates to a before/after-change-function whether the current > > > change is a "proper" change or merely a text property change. > > > Change hook functions could then test this flag and, for example, > > > refrain from doing anything for a text property change. I'm not sure it would be possible to provide such a flag. Did you look at the internals involved, and if so, can you tell where do we know which kind of change caused the hooks to run? I also don't understand the problem you have in CC Mode with text-property changes. Can you elaborate on that? From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 06:45:25 2018 Received: (at 30186) by debbugs.gnu.org; 27 Jan 2018 11:45:25 +0000 Received: from localhost ([127.0.0.1]:44412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efOvE-000448-T9 for submit@debbugs.gnu.org; Sat, 27 Jan 2018 06:45:25 -0500 Received: from colin.muc.de ([193.149.48.1]:11846 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1efOvC-00043y-Kg for 30186@debbugs.gnu.org; Sat, 27 Jan 2018 06:45:23 -0500 Received: (qmail 39427 invoked by uid 3782); 27 Jan 2018 11:45:20 -0000 Received: from acm.muc.de (p548C7E39.dip0.t-ipconnect.de [84.140.126.57]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 27 Jan 2018 12:45:18 +0100 Received: (qmail 30141 invoked by uid 1000); 27 Jan 2018 11:37:13 -0000 Date: Sat, 27 Jan 2018 11:37:13 +0000 To: Eli Zaretskii Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Message-ID: <20180127113713.GB4049@ACM> References: <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> <20180126183702.GA5056@ACM> <831sicl9p3.fsf@gnu.org> <20180126200027.GB5056@ACM> <83r2qbk5bf.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83r2qbk5bf.fsf@gnu.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Eli. On Sat, Jan 27, 2018 at 11:40:36 +0200, Eli Zaretskii wrote: > > Date: Fri, 26 Jan 2018 20:00:27 +0000 > > Cc: juri@linkov.net, 30186@debbugs.gnu.org > > From: Alan Mackenzie > > Do you have any opinion on my suggestion: > > > > Perhaps an alternative would be for Emacs to provide a flag which > > > > indicates to a before/after-change-function whether the current > > > > change is a "proper" change or merely a text property change. > > > > Change hook functions could then test this flag and, for example, > > > > refrain from doing anything for a text property change. > I'm not sure it would be possible to provide such a flag. Did you > look at the internals involved, and if so, can you tell where do we > know which kind of change caused the hooks to run? I envisage adding an extra boolean argument to prepare_to_modify_buffer, and to signal_after_change. When called from the text property routines, that argument would be true, otherwise it would be false. The essence of this argument would be a guarantee that the change is not going to alter the buffer text. There may be other primitives besides text properties for which we could set this argument. > I also don't understand the problem you have in CC Mode with > text-property changes. Can you elaborate on that? Yes. In a largish CC Mode file, mark the entire buffer, kill-ring-save, and append it after itself, with C-x h, M-w, M->, C-y . In buffer-undo-list there are no entries for text property changes. Before the with-silent-modifications was put in, there were many such entries. Assume this in the next paragraph Now undo this latest change with C-_. Each of the entries for text property changes wants to invoke CC Mode's before/after-change-functions, which would make the operation slow. (But see below.) The workaround (currently in Emacs) for this, back in 2015, was to put with-silent-modifications around the text property manipulations in remove-yank-excluded-properties. This prevents these manipulations getting into the undo list, but also stops read-passwd from working properly. I now see there is a second workaround, in CC Mode itself, where c-before-change and c-after-change use backtrace-frame to check the primitive invoking them, and do nothing if that primitive is, e.g., put-text-property. This is not an elegant workaround. So, I'm changing my mind, after looking into it a bit more. Removing the with-silent-modifications from remove-yank-excluded-properties would not slow down undo in CC Mode buffers noticeably. It might slow down other modes which make extensive use of before/after-change-functions. The extra flag for the change hooks might still be a good idea. It no longer seems pertinent for solving the current bug, though. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 07:23:41 2018 Received: (at 30186) by debbugs.gnu.org; 27 Jan 2018 12:23:41 +0000 Received: from localhost ([127.0.0.1]:44432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efPWG-00053B-U5 for submit@debbugs.gnu.org; Sat, 27 Jan 2018 07:23:41 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efPWF-00052x-HS for 30186@debbugs.gnu.org; Sat, 27 Jan 2018 07:23:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efPW6-0000dh-77 for 30186@debbugs.gnu.org; Sat, 27 Jan 2018 07:23:34 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efPW6-0000dd-2n; Sat, 27 Jan 2018 07:23:30 -0500 Received: from [176.228.60.248] (port=2618 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1efPW5-0006ee-D5; Sat, 27 Jan 2018 07:23:29 -0500 Date: Sat, 27 Jan 2018 14:23:31 +0200 Message-Id: <83d11vjxrw.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20180127113713.GB4049@ACM> (message from Alan Mackenzie on Sat, 27 Jan 2018 11:37:13 +0000) Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd References: <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> <20180126183702.GA5056@ACM> <831sicl9p3.fsf@gnu.org> <20180126200027.GB5056@ACM> <83r2qbk5bf.fsf@gnu.org> <20180127113713.GB4049@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sat, 27 Jan 2018 11:37:13 +0000 > Cc: juri@linkov.net, 30186@debbugs.gnu.org > From: Alan Mackenzie > > > I'm not sure it would be possible to provide such a flag. Did you > > look at the internals involved, and if so, can you tell where do we > > know which kind of change caused the hooks to run? > > I envisage adding an extra boolean argument to prepare_to_modify_buffer, > and to signal_after_change. When called from the text property > routines, that argument would be true, otherwise it would be false. What happens when both the text and the properties are changed? > So, I'm changing my mind, after looking into it a bit more. Removing > the with-silent-modifications from remove-yank-excluded-properties would > not slow down undo in CC Mode buffers noticeably. So let's do that now. I think the problem with read-passwd is a security issue, so it should go to emacs-26, do you agree? > It might slow down other modes which make extensive use of > before/after-change-functions. Let's see if any such modes show up. > The extra flag for the change hooks might still be a good idea. It no > longer seems pertinent for solving the current bug, though. If it can be definitive, I might agree with you. Alternatively, we could introduce a mechanism for interested modes to prevent such changes from getting into buffer-undo-list. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 08:46:12 2018 Received: (at 30186) by debbugs.gnu.org; 27 Jan 2018 13:46:12 +0000 Received: from localhost ([127.0.0.1]:44477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efQo8-0002dt-3P for submit@debbugs.gnu.org; Sat, 27 Jan 2018 08:46:12 -0500 Received: from colin.muc.de ([193.149.48.1]:30295 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1efQo6-0002dk-E4 for 30186@debbugs.gnu.org; Sat, 27 Jan 2018 08:46:11 -0500 Received: (qmail 75782 invoked by uid 3782); 27 Jan 2018 13:46:08 -0000 Received: from acm.muc.de (p548C7E39.dip0.t-ipconnect.de [84.140.126.57]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 27 Jan 2018 14:46:07 +0100 Received: (qmail 4642 invoked by uid 1000); 27 Jan 2018 13:38:02 -0000 Date: Sat, 27 Jan 2018 13:38:02 +0000 To: Eli Zaretskii , juri@linkov.net Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Message-ID: <20180127133802.GA4594@ACM> References: <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> <20180126183702.GA5056@ACM> <831sicl9p3.fsf@gnu.org> <20180126200027.GB5056@ACM> <83r2qbk5bf.fsf@gnu.org> <20180127113713.GB4049@ACM> <83d11vjxrw.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83d11vjxrw.fsf@gnu.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Eli and Juri. On Sat, Jan 27, 2018 at 14:23:31 +0200, Eli Zaretskii wrote: > > Date: Sat, 27 Jan 2018 11:37:13 +0000 > > Cc: juri@linkov.net, 30186@debbugs.gnu.org > > From: Alan Mackenzie [ .... ] > > So, I'm changing my mind, after looking into it a bit more. > > Removing the with-silent-modifications from > > remove-yank-excluded-properties would not slow down undo in CC Mode > > buffers noticeably. > So let's do that now. I think the problem with read-passwd is a > security issue, so it should go to emacs-26, do you agree? Yes, i think it should go into emacs-26. Juri, do you see any problem with just removing that with-silent-modifications altogether? I.e. this: Allow read-passwd to hide characters inserted by C-y. (Security fix.) This fixes bug #30186. The with-silent-modifications was there to prevent records of text property manipulations being put into buffer-undo-list. These had been causing a significant slowdown in CC Mode with C-_ after a large C-y. This CC Mode problem has since been solved by a different workaround. * lisp/subr.el (remove-yank-excluded-properties): Remove the invocation of with-silent-modifications around the text property manipulations. diff --git a/lisp/subr.el b/lisp/subr.el index 052d9cd821..64cbbd52ab 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3019,10 +3019,9 @@ remove-yank-excluded-properties run-start prop nil end))) (funcall fun value run-start run-end) (setq run-start run-end))))) - (with-silent-modifications - (if (eq yank-excluded-properties t) - (set-text-properties start end nil) - (remove-list-of-text-properties start end yank-excluded-properties))))) + (if (eq yank-excluded-properties t) + (set-text-properties start end nil) + (remove-list-of-text-properties start end yank-excluded-properties)))) (defvar yank-undo-function) [ .... ] -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 16:46:48 2018 Received: (at 30186) by debbugs.gnu.org; 27 Jan 2018 21:46:48 +0000 Received: from localhost ([127.0.0.1]:45558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efYJE-00014j-9O for submit@debbugs.gnu.org; Sat, 27 Jan 2018 16:46:48 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:43202 helo=homiemail-a18.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efYJB-00014a-N2 for 30186@debbugs.gnu.org; Sat, 27 Jan 2018 16:46:46 -0500 Received: from homiemail-a18.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTP id 3256F258067; Sat, 27 Jan 2018 13:46:45 -0800 (PST) Received: from localhost.linkov.net (m91-129-109-224.cust.tele2.ee [91.129.109.224]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTPSA id 2BE53258066; Sat, 27 Jan 2018 13:46:43 -0800 (PST) From: Juri Linkov To: Alan Mackenzie Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Organization: LINKOV.NET References: <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> <20180126183702.GA5056@ACM> <831sicl9p3.fsf@gnu.org> <20180126200027.GB5056@ACM> <83r2qbk5bf.fsf@gnu.org> <20180127113713.GB4049@ACM> <83d11vjxrw.fsf@gnu.org> <20180127133802.GA4594@ACM> Date: Sat, 27 Jan 2018 23:43:34 +0200 In-Reply-To: <20180127133802.GA4594@ACM> (Alan Mackenzie's message of "Sat, 27 Jan 2018 13:38:02 +0000") Message-ID: <877es3yo3d.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30186 Cc: Eli Zaretskii , 30186@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >> So let's do that now. I think the problem with read-passwd is a >> security issue, so it should go to emacs-26, do you agree? > > Yes, i think it should go into emacs-26. > > Juri, do you see any problem with just removing that > with-silent-modifications altogether? I.e. this: I agree that removing with-silent-modifications would be the best fix. Thanks for taking care of this. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 17:18:17 2018 Received: (at 30186-done) by debbugs.gnu.org; 27 Jan 2018 22:18:17 +0000 Received: from localhost ([127.0.0.1]:45566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efYnf-0001lm-RA for submit@debbugs.gnu.org; Sat, 27 Jan 2018 17:18:16 -0500 Received: from colin.muc.de ([193.149.48.1]:54854 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1efYne-0001le-49 for 30186-done@debbugs.gnu.org; Sat, 27 Jan 2018 17:18:14 -0500 Received: (qmail 53857 invoked by uid 3782); 27 Jan 2018 22:18:12 -0000 Received: from acm.muc.de (p548C7E39.dip0.t-ipconnect.de [84.140.126.57]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 27 Jan 2018 23:18:11 +0100 Received: (qmail 19103 invoked by uid 1000); 27 Jan 2018 22:10:06 -0000 Date: Sat, 27 Jan 2018 22:10:06 +0000 To: Eli Zaretskii , Juri Linkov Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd Message-ID: <20180127221006.GB4594@ACM> References: <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> <20180126183702.GA5056@ACM> <831sicl9p3.fsf@gnu.org> <20180126200027.GB5056@ACM> <83r2qbk5bf.fsf@gnu.org> <20180127113713.GB4049@ACM> <83d11vjxrw.fsf@gnu.org> <20180127133802.GA4594@ACM> <877es3yo3d.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877es3yo3d.fsf@mail.linkov.net> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30186-done Cc: 30186-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Eli and Juri. On Sat, Jan 27, 2018 at 23:43:34 +0200, Juri Linkov wrote: > >> So let's do that now. I think the problem with read-passwd is a > >> security issue, so it should go to emacs-26, do you agree? > > Yes, i think it should go into emacs-26. > > Juri, do you see any problem with just removing that > > with-silent-modifications altogether? I.e. this: > I agree that removing with-silent-modifications would be > the best fix. Thanks for taking care of this. Thanks. I've made this change and committed it to the emacs-26 branch. I'm closing the bug with this post. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 30 03:31:00 2018 Received: (at 30186) by debbugs.gnu.org; 30 Jan 2018 08:31:00 +0000 Received: from localhost ([127.0.0.1]:48521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egRJj-0000Rg-Vw for submit@debbugs.gnu.org; Tue, 30 Jan 2018 03:31:00 -0500 Received: from mout.gmx.net ([212.227.15.15]:65073) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egRJi-0000RL-3l for 30186@debbugs.gnu.org; Tue, 30 Jan 2018 03:30:58 -0500 Received: from [192.168.1.100] ([212.95.5.253]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M2tXS-1eztRJ2bY6-00sffk; Tue, 30 Jan 2018 09:30:47 +0100 Message-ID: <5A702D30.3050808@gmx.at> Date: Tue, 30 Jan 2018 09:30:40 +0100 From: martin rudalics MIME-Version: 1.0 To: Alan Mackenzie Subject: Re: bug#30186: 27.0.50; Password is not hidden in read-passwd References: <83zi57qk2w.fsf@gnu.org> <87bmhm7wbw.fsf@mail.linkov.net> <87y3kp8thj.fsf@mail.linkov.net> <87372w8ddp.fsf@mail.linkov.net> <20180125173937.GA3857@ACM> <87vafp7i82.fsf@mail.linkov.net> <20180126183702.GA5056@ACM> <5A6C3802.1050603@gmx.at> <20180127092124.GA4049@ACM> In-Reply-To: <20180127092124.GA4049@ACM> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:1R4KB6fQSFcNiqkRInzILFrTRVUZC8zyewPYv3rYM2XPG2nHOWk kL4E4nkFInFjws/AMYdkvyfTAaEWi5bTJJc3bGLacstylfNl3v9QNs8dcEVSy9RH6KYcgGm NzqWrgblyB4gnYTp07EZh5eL02FtB+X7zcv45AxNoBOGeJuf9/qK7cYDVEi/pqUxmuNscYC 49igTnia9+UcdtC1+A1Hw== X-UI-Out-Filterresults: notjunk:1;V01:K0:9eaAkRLv6rM=:x60eUu0QiYBry/hkfIIwIB 61ohAg3ByUzVSZdWRTVJ1iv1ED5ClHTCuIdfRhIRMXu/aH6Tl8p6tM6sHemTnnFO1kx+4Nd8w YNdXMeJR2jzXfzPLNrFc5vUxpjjiH1Z2e0A66r1jrJ/fEdTJfZjKH8KXSAstsNBHtWGSe0t+5 PMn2LLdIlRE4/YeYi2fejAHD8puYjDB3OhRPP2m8QhwqcUIdO+1P/59Svp5goZEm4yHqk1ECk QINnTveLwWXJL1ZaJ2CgR5Gtv8N1lqUAWTXGNChkTsRrqyB7iW4Tm+afXZqJHjeILYuzpZwXt jBHTVIzFGukcE7mzmSQGKqJnfnMteW7g6jKLew5bYQStNR73ndAi81qeYk0BGfYiWUvIiWBT3 LoJk1VOtMIlwv+PNLu/l+LEf29rKtfd/uFxcjgrzoxjdf/qTvm9mPGwWsH3+6LXq0zfKhN10q amE0gKnKwCdRULgXRu0XpXAIvhibrAnJLnbqX2dseNWH7AoQkqMwe8c2aQsi2iU13HcsK/GiZ oOCiwG3nSFI4/e6A08+Wwf3Cv7V84+vm7FTApNBc+OdSPsmCayhN3CIslkbBH7Joyq5PPDvu+ Nkbc/UXJUon+6cF8C8Cm4wsrr1ipDvIjWPnpxCZhs/M0blHXjqGO2MBVCmyBVfBLoYO5Mq8Da 1UKsCAz7KfzSaJMCWcsj0+aWHrhHWph99f2UOS2qGVVv5wUF6Lzq5FXjG2xcC+Vngz4KO6O4t yI7Lq8AZsjOv5pTRb2ru8dk/Nv92idenNALwv5NbK+njarxPNRx0jbw1rVOLiOq9ZLxsxUu02 GYdRAvWYHIYyf4ty7aC0qmeC7EZdnsvU3jyH3hT887KQQlkJiM= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 30186 Cc: 30186@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > Text properties are indeed part of the buffer (or string). But I don't > think overlays are - if you have an overlay on part of a buffer, and copy > that part into a string, I don't think the overlay stays on the copy. That's what I meant: The overlay stays with the buffer (unless its 'evaporate' property is non-nil) when you remove the text it covers. A text property OTOH gets removed with the text and does not stay with the buffer. Hence a text property is not part of a buffer (or at most indirectly so) while an overlay is. martin From unknown Sat Aug 16 00:32:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Feb 2018 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator