* bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work.
@ 2016-06-17 10:25 Alan Mackenzie
2016-06-18 9:56 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Alan Mackenzie @ 2016-06-17 10:25 UTC (permalink / raw)
To: 23783
Hello, Emacs.
In GNU Emacs 25.0.94.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.7)
of 2016-06-07 built on acm
Repository revision: 9d5ccebeba0506f7280662630f0ee85a52c8a327
Configured using:
'configure --with-tiff=no --with-gif=no --with-gpm'
Do this:
1. emacs -Q
2. M-x customize-variable <CR> font-lock-maximum-decoration <CR>
o - set the level to 1 (minimum decoration) and apply the new
setting.
3. C-x C-f .../src/xdisp.c
4. Note that font locking is indeed at level 1. Note, indeed, how fast
scrolling works. ;-)
5. M-x customize-variable <CR> font-lock-maximum-decoration <CR>
o - set the level to t (maximum decoration) and apply.
6. (In the xdisp.c window) M-x font-lock-mode, twice.
7. Note that the font locking remains at level 1.
This last is surely a bug. Enabling font locking in a buffer should use
the current valid setting of font-lock-maximum-decoration.
Discussion:
-----------
There are no instructions in the Emacs manual which tell you how to
change decoration levels. It merely states on page "Font Lock Mode"
that "You can customize the variable `font-lock-maximum-decoration' to
alter the amount of fontification applied by Font Lock mode, for major
modes that support this feature.". This doesn't then say what is to be
done after doing such customization, for it to take effect.
There is a non-interactive function `font-lock-refresh-defaults' which
works, but this function isn't called from anywhere in Emacs.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work.
2016-06-17 10:25 bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work Alan Mackenzie
@ 2016-06-18 9:56 ` Eli Zaretskii
2016-06-18 17:19 ` Alan Mackenzie
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2016-06-18 9:56 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: 23783-done
> Date: Fri, 17 Jun 2016 10:25:00 +0000
> From: Alan Mackenzie <acm@muc.de>
>
> 1. emacs -Q
> 2. M-x customize-variable <CR> font-lock-maximum-decoration <CR>
> o - set the level to 1 (minimum decoration) and apply the new
> setting.
> 3. C-x C-f .../src/xdisp.c
> 4. Note that font locking is indeed at level 1. Note, indeed, how fast
> scrolling works. ;-)
> 5. M-x customize-variable <CR> font-lock-maximum-decoration <CR>
> o - set the level to t (maximum decoration) and apply.
> 6. (In the xdisp.c window) M-x font-lock-mode, twice.
> 7. Note that the font locking remains at level 1.
>
> This last is surely a bug. Enabling font locking in a buffer should use
> the current valid setting of font-lock-maximum-decoration.
It's quite clear from the code that this is the intended behavior.
The comments for font-lock-set-defaults (the function and the
variable) and for font-lock-refresh-defaults are especially revealing.
> There are no instructions in the Emacs manual which tell you how to
> change decoration levels. It merely states on page "Font Lock Mode"
> that "You can customize the variable `font-lock-maximum-decoration' to
> alter the amount of fontification applied by Font Lock mode, for major
> modes that support this feature.". This doesn't then say what is to be
> done after doing such customization, for it to take effect.
>
> There is a non-interactive function `font-lock-refresh-defaults' which
> works, but this function isn't called from anywhere in Emacs.
I have added to the Emacs manual explanation of how to make the
customization of font-lock-maximum-decoration effective in a file
buffer. In a nutshell, you need to either customize before visiting
the file, or kill the buffer and revisit the file after the
customization.
I think this fixes this bug, so I'm closing it.
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work.
2016-06-18 9:56 ` Eli Zaretskii
@ 2016-06-18 17:19 ` Alan Mackenzie
2016-06-18 17:37 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Alan Mackenzie @ 2016-06-18 17:19 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 23783
Hello, Eli.
On Sat, Jun 18, 2016 at 12:56:10PM +0300, Eli Zaretskii wrote:
> > Date: Fri, 17 Jun 2016 10:25:00 +0000
> > From: Alan Mackenzie <acm@muc.de>
> > 1. emacs -Q
> > 2. M-x customize-variable <CR> font-lock-maximum-decoration <CR>
> > o - set the level to 1 (minimum decoration) and apply the new
> > setting.
> > 3. C-x C-f .../src/xdisp.c
> > 4. Note that font locking is indeed at level 1. Note, indeed, how fast
> > scrolling works. ;-)
> > 5. M-x customize-variable <CR> font-lock-maximum-decoration <CR>
> > o - set the level to t (maximum decoration) and apply.
> > 6. (In the xdisp.c window) M-x font-lock-mode, twice.
> > 7. Note that the font locking remains at level 1.
> > This last is surely a bug. Enabling font locking in a buffer should use
> > the current valid setting of font-lock-maximum-decoration.
> It's quite clear from the code that this is the intended behavior.
> The comments for font-lock-set-defaults (the function and the
> variable) and for font-lock-refresh-defaults are especially revealing.
I haven't read them yet, but I will. It is not user friendly to have to
set an option before visiting a file. In this case, a natural use case
would be to want to reduce the decoration level after finding things
being too slow at the default level.
> > There are no instructions in the Emacs manual which tell you how to
> > change decoration levels. It merely states on page "Font Lock Mode"
> > that "You can customize the variable `font-lock-maximum-decoration' to
> > alter the amount of fontification applied by Font Lock mode, for major
> > modes that support this feature.". This doesn't then say what is to be
> > done after doing such customization, for it to take effect.
> > There is a non-interactive function `font-lock-refresh-defaults' which
> > works, but this function isn't called from anywhere in Emacs.
> I have added to the Emacs manual explanation of how to make the
> customization of font-lock-maximum-decoration effective in a file
> buffer. In a nutshell, you need to either customize before visiting
> the file, or kill the buffer and revisit the file after the
> customization.
Thanks!
> I think this fixes this bug, so I'm closing it.
OK. I'll think about trying to fix the code in the near future.
> Thanks.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work.
2016-06-18 17:19 ` Alan Mackenzie
@ 2016-06-18 17:37 ` Eli Zaretskii
2016-06-18 20:03 ` bug#23783: Minor feature fixes and enhancements [Was: bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work.] Alan Mackenzie
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2016-06-18 17:37 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: 23783
> Date: Sat, 18 Jun 2016 17:19:03 +0000
> Cc: 23783@debbugs.gnu.org
> From: Alan Mackenzie <acm@muc.de>
>
> > I think this fixes this bug, so I'm closing it.
>
> OK. I'll think about trying to fix the code in the near future.
I don't think we should change anything in the code, so maybe you
shouldn't try.
In general, I find that lately we make too frequently the mistake of
messing with low-level infrastructure for some marginal improvement,
and then have to invest/waste lots of time and releases to deal with
the fallout of unintended consequences, broken use cases, etc. I
intend to object to such changes in the future. This seems just such
a case: a minor annoyance whose "fixing" runs a very real risk of
breaking a lot of important functionalities.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23783: Minor feature fixes and enhancements [Was: bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work.]
2016-06-18 17:37 ` Eli Zaretskii
@ 2016-06-18 20:03 ` Alan Mackenzie
2016-06-18 21:21 ` John Wiegley
2016-06-19 2:34 ` Eli Zaretskii
0 siblings, 2 replies; 7+ messages in thread
From: Alan Mackenzie @ 2016-06-18 20:03 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 23783
Hello, Eli.
On Sat, Jun 18, 2016 at 08:37:32PM +0300, Eli Zaretskii wrote:
> > Date: Sat, 18 Jun 2016 17:19:03 +0000
> > Cc: 23783@debbugs.gnu.org
> > From: Alan Mackenzie <acm@muc.de>
[ .... ]
> In general, I find that lately we make too frequently the mistake of
> messing with low-level infrastructure for some marginal improvement,
> and then have to invest/waste lots of time and releases to deal with
> the fallout of unintended consequences, broken use cases, etc. I
> intend to object to such changes in the future. This seems just such
> a case: a minor annoyance whose "fixing" runs a very real risk of
> breaking a lot of important functionalities.
I'd ask you to consider things very carefully indeed before adopting
such a policy. It is minor changes like these, a very great number of
them, that have made Emacs as usable as it is.
Sometime, fire up Emacs-21, and compare with a modern Emacs just how
usable it isn't. Perhaps even more dramatic, fire up XEmacs. I predict
you would find it irritating, and the things that would irritate you
would be just the lack of the little improvements that you are proposing
now to object to.
For example, in XEmacs, the C-x 4 bindings split the screen with the
windows above eachother, which is suboptimal on a modern wide screen.
Yes, it's nothing earth-shatteringly bad, it's just not quite right. If
you do a batch-byte-compile, the error and warning messages are partially
drowned out by low-content messages about "compiling foo.el" and "Writing
foo.elc". Again, nothing you can't get around, but Emacs doesn't do that
any more. These are just two of the many, many, marginal improvements
Emacs has made in the last decade or so.
I don't think we should stop making these small improvements.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23783: Minor feature fixes and enhancements [Was: bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work.]
2016-06-18 20:03 ` bug#23783: Minor feature fixes and enhancements [Was: bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work.] Alan Mackenzie
@ 2016-06-18 21:21 ` John Wiegley
2016-06-19 2:34 ` Eli Zaretskii
1 sibling, 0 replies; 7+ messages in thread
From: John Wiegley @ 2016-06-18 21:21 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: 23783
[-- Attachment #1: Type: text/plain, Size: 1846 bytes --]
>>>>> Alan Mackenzie <acm@muc.de> writes:
>> In general, I find that lately we make too frequently the mistake of
>> messing with low-level infrastructure for some marginal improvement, and
>> then have to invest/waste lots of time and releases to deal with the
>> fallout of unintended consequences, broken use cases, etc. I intend to
>> object to such changes in the future. This seems just such a case: a minor
>> annoyance whose "fixing" runs a very real risk of breaking a lot of
>> important functionalities.
> I'd ask you to consider things very carefully indeed before adopting such a
> policy. It is minor changes like these, a very great number of them, that
> have made Emacs as usable as it is.
While I hear you, Alan, I very much agree with Eli here, and also intend to
increase my objections to such changes. We've accumulated a HUGE amount of
state, that to some extent is validated by the sheer number of users we have.
But there is no human alive who can forsee what the consequences of a core
change will be, however minor -- there're just too many ramifications to
consider.
Thus, we should avoid such changes only to fix annoyances. They really need to
become quite vocal objections for us to be motivated to apply the fix. I think
too many of these "little here, little there" type changes have happened over
the past several years, and it has not been good for the stability of our
foundation. One imagines a bowl of spaghetti.
Also, too often these little fixes are hacks meant to be harmless band-aids,
that only postpone the discussion of how we should really fix the problem,
which in some cases could mean rethinking our design.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 629 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#23783: Minor feature fixes and enhancements [Was: bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work.]
2016-06-18 20:03 ` bug#23783: Minor feature fixes and enhancements [Was: bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work.] Alan Mackenzie
2016-06-18 21:21 ` John Wiegley
@ 2016-06-19 2:34 ` Eli Zaretskii
1 sibling, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2016-06-19 2:34 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: 23783
> Date: Sat, 18 Jun 2016 20:03:05 +0000
> Cc: 23783@debbugs.gnu.org
> From: Alan Mackenzie <acm@muc.de>
>
> > In general, I find that lately we make too frequently the mistake of
> > messing with low-level infrastructure for some marginal improvement,
> > and then have to invest/waste lots of time and releases to deal with
> > the fallout of unintended consequences, broken use cases, etc. I
> > intend to object to such changes in the future. This seems just such
> > a case: a minor annoyance whose "fixing" runs a very real risk of
> > breaking a lot of important functionalities.
>
> I'd ask you to consider things very carefully indeed before adopting
> such a policy.
I did.
> I don't think we should stop making these small improvements.
This is not about small improvements per se. This is about minor
improvements that are implemented by non-trivial changes in basic
functionality. I think we've had enough incidents of this kind to be
able to draw conclusions for future development.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-06-19 2:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-17 10:25 bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work Alan Mackenzie
2016-06-18 9:56 ` Eli Zaretskii
2016-06-18 17:19 ` Alan Mackenzie
2016-06-18 17:37 ` Eli Zaretskii
2016-06-18 20:03 ` bug#23783: Minor feature fixes and enhancements [Was: bug#23783: Emacs 25: Changing font-lock-maximum-decoration doesn't work.] Alan Mackenzie
2016-06-18 21:21 ` John Wiegley
2016-06-19 2:34 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).