[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30186: 27.0.50; Password is not hidden in read-passwd
From: |
Alan Mackenzie |
Subject: |
bug#30186: 27.0.50; Password is not hidden in read-passwd |
Date: |
Fri, 26 Jan 2018 18:37:02 +0000 |
User-agent: |
Mutt/1.7.2 (2016-11-26) |
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).
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Juri Linkov, 2018/01/20
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Eli Zaretskii, 2018/01/21
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Juri Linkov, 2018/01/21
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Glenn Morris, 2018/01/22
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Glenn Morris, 2018/01/22
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Juri Linkov, 2018/01/22
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Juri Linkov, 2018/01/23
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Alan Mackenzie, 2018/01/25
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Juri Linkov, 2018/01/25
- bug#30186: 27.0.50; Password is not hidden in read-passwd,
Alan Mackenzie <=
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Eli Zaretskii, 2018/01/26
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Alan Mackenzie, 2018/01/26
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Eli Zaretskii, 2018/01/27
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Alan Mackenzie, 2018/01/27
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Eli Zaretskii, 2018/01/27
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Alan Mackenzie, 2018/01/27
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Juri Linkov, 2018/01/27
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Alan Mackenzie, 2018/01/27
- bug#30186: 27.0.50; Password is not hidden in read-passwd, martin rudalics, 2018/01/27
- bug#30186: 27.0.50; Password is not hidden in read-passwd, Alan Mackenzie, 2018/01/27