unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: luangruo@yahoo.com, monnier@iro.umontreal.ca,
	gregory@heytings.org, mattiase@acm.org, philipk@posteo.net,
	silent2600@gmail.com, emacs-devel@gnu.org
Subject: Re: emacs master + org Wrong type argument: number-or-marker-p
Date: Thu, 04 Aug 2022 19:37:42 +0300	[thread overview]
Message-ID: <83edxw2cdl.fsf@gnu.org> (raw)
In-Reply-To: <Yuvu1P9sHgfm1P7h@ACM> (message from Alan Mackenzie on Thu, 4 Aug 2022 16:07:48 +0000)

> Date: Thu, 4 Aug 2022 16:07:48 +0000
> Cc: luangruo@yahoo.com, monnier@iro.umontreal.ca, gregory@heytings.org,
>   mattiase@acm.org, philipk@posteo.net, silent2600@gmail.com,
>   emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
> 
> > Of course.  But the problem is that font-lock was found to examine
> > much larger portions of the buffer than the ones to which we now
> > restrict it in those cases.  And the speedup is evident.  What does
> > that tell you?
> 
> That you can speed things up by omitting part of the work.  Possibly that
> font-lock is insufficiently flexible in what it offers major modes.

And how would you propose to solve that, given that it remains
unsolved for at least two decades?

> I meant doing this in a way which doesn't introduce bugs.  Something like
> amending/replacing font-lock-extend-region-wholelines, for example.

Feel free to work on this.  If the results are better, we will
certainly prefer using it, and will then have to revisit the changes
we are discussing here, and decide whether they are still needed.

But we are not there yet, and it sounds wrong to me to prevent our
users from having a usable Emacs when editing these files just because
our ideal solutions are not yet available, when less ideal solutions
yield satisfactory results.

> > No, the current solution sacrifices some of the font-lock correctness
> > ....
> 
> "Sacrificing correctness" sounds like a euphemism for tolerating bugs.

Minor bugs.  Very minor bugs.

> > .... to give us a usable Emacs.  I say it's a justified tradeoff.
> 
> Better would be to get a usable Emacs without introducing bugs.

Yes, we all love cheap and perfect solutions, don't we?  But there are
no such solutions in this case, so we need to choose among
not-so-cheap and not-so-perfect ones instead.

> Now it's being sacrificed, even if only in an edge case, with barely
> a second thought - along with an unknown number of other packages.

That's unfair, to say the least.  A lot of thought and discussions
went into these changes, even if you didn't notice them.  To say
nothing about the development and testing efforts.

> > > I don't want to be provocative, but having opcodes that only work
> > > most of the time rather than all of the time isn't a mere
> > > semi-philosophical concern.
> 
> > They work all the time when there are no long lines.
> 
> They don't work all the time, since sometimes there are long lines.

That's the same thing.  You just see the empty 1/100th of the glass.

> > When there are long lines, they work slightly less correctly, ....
> 
> Correctness doesn't admit of degrees.  Something is either correct, or
> it's incorrect.

Then CC Mode is incorrect and broken, because it at times produces
wrong fontification and wrong indentation.  Let's throw it out.

> `widen' doesn't work at all in the pertinent circumstances.

Then make your mode avoid widening in those circumstances.

> > .... and the lack of correctness is only visible in the fontifications.
> 
> That hasn't been shown.

Show us any other problems, and then let's talk.

> Arbitrary Lisp can be executed through fontification-functions and
> all the hooks in font-lock.el and jit-lock.el.

Arbitrary Lisp can still be executed, it should just avoid going far
away from the window's display area when the buffer has very long
lines.  In particular, it should not begin from the beginning of a
line, nor insist on examining the entire line from BOL to EOL.

> > Hardly a disaster, if you keep in mind that one of the previously
> > recommended solutions was to turn on so-long-mode, which turns off
> > font-lock (to tell nothing of the not-so-distant past, when Emacs
> > didn't have font-lock at all).
> 
> Do these long lines occur in modes where fontification is important?  I
> don't know as I haven't seen any test files.

The Emacs project decided long ago that fontifications are important
in all modes.  That's why we have font-lock turned on by default; it
wasn't like that once upon a time.  But if you or someone prefers no
fontifications to fontifications that are sometimes, rarely,
incorrect, you can always turn off font-lock; the changes we are
discussing didn't take away that possibility.



  reply	other threads:[~2022-08-04 16:37 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01 13:13 emacs master + org Wrong type argument: number-or-marker-p hx
2022-08-01 13:37 ` Eli Zaretskii
2022-08-01 15:11   ` Philip Kaludercic
2022-08-01 15:52     ` Eli Zaretskii
2022-08-01 16:07       ` Philip Kaludercic
2022-08-01 16:34         ` Visuwesh
2022-08-01 16:11       ` Gregory Heytings
2022-08-01 16:25         ` Eli Zaretskii
2022-08-01 16:34           ` Philip Kaludercic
2022-08-01 16:39             ` Eli Zaretskii
2022-08-01 17:15               ` Mattias Engdegård
2022-08-01 17:24                 ` Eli Zaretskii
2022-08-01 17:36                   ` Mattias Engdegård
2022-08-01 17:59                     ` Eli Zaretskii
2022-08-01 18:06                       ` Gregory Heytings
2022-08-01 18:25                         ` Eli Zaretskii
2022-08-01 19:14                           ` Gregory Heytings
2022-08-01 18:47                         ` Mattias Engdegård
2022-08-01 19:16                           ` Gregory Heytings
2022-08-01 20:05                             ` Alan Mackenzie
2022-08-02 13:46                               ` Eli Zaretskii
2022-08-02 18:59                                 ` Alan Mackenzie
2022-08-02 19:15                                   ` Eli Zaretskii
2022-08-02 20:28                                     ` Alan Mackenzie
2022-08-03  1:21                                       ` Po Lu
2022-08-03  2:38                                         ` Eli Zaretskii
2022-08-03  4:34                                           ` Po Lu
2022-08-03 12:02                                             ` Eli Zaretskii
2022-08-03 12:07                                               ` Po Lu
2022-08-03 12:34                                                 ` Eli Zaretskii
2022-08-03 13:10                                                   ` Po Lu
2022-08-03 13:36                                                     ` Eli Zaretskii
2022-08-04  1:04                                                       ` Po Lu
2022-08-04  1:09                                                         ` Gregory Heytings
2022-08-04  1:27                                                           ` Po Lu
2022-08-04  6:45                                                           ` Eli Zaretskii
2022-08-03 20:47                                               ` Stefan Monnier
2022-08-04  5:51                                                 ` Eli Zaretskii
2022-08-04  6:19                                                   ` Po Lu
2022-08-04  7:10                                                     ` Eli Zaretskii
2022-08-04  7:31                                                       ` Po Lu
2022-08-04  7:58                                                         ` Eli Zaretskii
2022-08-04  8:42                                                           ` Po Lu
2022-08-04  9:06                                                             ` Eli Zaretskii
2022-08-04 10:18                                                               ` Alan Mackenzie
2022-08-04 13:18                                                                 ` Eli Zaretskii
2022-08-04 16:07                                                                   ` Alan Mackenzie
2022-08-04 16:37                                                                     ` Eli Zaretskii [this message]
2022-08-04 10:26                                                               ` Po Lu
2022-08-04 11:33                                                                 ` Werner LEMBERG
2022-08-04 13:10                                                                 ` Eli Zaretskii
2022-08-04 21:56                                                           ` Stefan Monnier
2022-08-03  7:21                                         ` Gregory Heytings
2022-08-03 11:07                                           ` Po Lu
2022-08-03 12:25                                             ` Eli Zaretskii
2022-08-03 15:25                                             ` Gregory Heytings
2022-08-04  1:02                                               ` Po Lu
2022-08-04  1:08                                                 ` Gregory Heytings
2022-08-04  9:14                                                 ` Stefan Monnier
2022-08-05  3:19                                               ` Richard Stallman
2022-08-03  8:57                                         ` Stefan Monnier
2022-08-03 11:05                                           ` Po Lu
2022-08-03 11:50                                       ` Eli Zaretskii
2022-08-02  8:25                             ` Mattias Engdegård
2022-08-02  8:43                               ` Gregory Heytings
2022-08-02  8:28                           ` Stefan Monnier
2022-08-02  8:40                             ` Mattias Engdegård
2022-08-01 16:36           ` Gregory Heytings
2022-08-01 16:49           ` Lars Ingebrigtsen
2022-08-01 17:23             ` Andreas Schwab
2022-08-07 15:22           ` Julien Cubizolles
2022-08-01 16:39         ` Andreas Schwab
2022-08-02 16:37         ` Opcode Versioning Was: " Sam Steingold
2022-08-02 22:10           ` Stefan Monnier
2022-08-04 14:59             ` Sam Steingold
2022-08-04 22:11               ` Stefan Monnier
2022-08-02  8:59       ` Po Lu
  -- strict thread matches above, loose matches on Subject: below --
2022-08-01 13:45 Gerd Möllmann
2022-08-01 17:36 Gerd Möllmann
2022-08-01 17:58 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83edxw2cdl.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=gregory@heytings.org \
    --cc=luangruo@yahoo.com \
    --cc=mattiase@acm.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=philipk@posteo.net \
    --cc=silent2600@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).