unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 57009@debbugs.gnu.org
Subject: bug#57009: Obscure doc string of new variable syntax-wholeline-max
Date: Sat, 6 Aug 2022 14:32:11 +0000	[thread overview]
Message-ID: <Yu57a6SH8qAuCz48@ACM> (raw)
In-Reply-To: <877d3l5y4n.fsf@gnus.org>

Hello, Lars.

On Sat, Aug 06, 2022 at 14:56:24 +0200, Lars Ingebrigtsen wrote:
> Alan Mackenzie <acm@muc.de> writes:

> >     Maximum line length for syntax operations.
> >     If lines are longer than that, syntax operations will treat them as chunks
> >     of this size.  Misfontification may then occur.
> >     This is a tradeoff between correctly applying the syntax rules,
> >     and avoiding major slowdown on pathologically long lines.

> >       Probably introduced at or before Emacs version 29.1.

> > ..  There are several bugs here:
> > (i) It is not clear what is meant by "syntax operations".  These should
> >   be listed and if necessary, explained.

> You mean mention syntax-ppss?

Yes, if that is one of the operations involved.  Also, if pertinent,
parse-partial-sexp, forward-list and friends, syntax-propertize, ....

> > (ii) It is not clear what it means for a "syntax operation" to treat a
> >   line "as a chunk".  This should be explained.

> It's saying that it's processing the line chunk-wise.  I think that's
> pretty clear?

If it's clear to you, please explain in a way that's clear to me.  :-)

Say the chunk is 64 characters long.  Doesn't parse-partial-sexp process
that "as a chunk" anyway?  How does one determine where a "chunk" starts
and where it ends?  What does "treating a line as a chunk" do that is new
that we didn't do before?

> > (iii) "Misfontification" may well occur, but what about other bad effects
> >   of ignoring correct syntax?  Don't they deserve a mention?

> Do they?

They might, it depends how clear the rest of an amended text makes
things.  For example, will C-M-n still work?

> > (iv) There is no mention of a mechanism to disable this "chunking"
> >   effect, whatever it might be.  If there is one, it should be
> >   documented, if there's not, this should be stated.

> That seems self-evident -- you increase the size?

It is anything but self-evident.  It might be by setting the variable to
0, it might be by setting it to nil, it might be, as you suggest by
setting it to a larger size than you think will occur in practice (i.e.
there's no way to disable it).  All these ways are in use in Emacs.

> There doesn't really seem to be much to alter here to me, but perhaps
> others have other opinions; adding Stefan to the CCs.

As matters stand, I'd have to read the source code to work out what this
variable is for.  I don't think I should have to.

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2022-08-06 14:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 21:35 bug#57009: Obscure doc string of new variable syntax-wholeline-max Alan Mackenzie
2022-08-06 12:56 ` Lars Ingebrigtsen
2022-08-06 14:32   ` Alan Mackenzie [this message]
2022-08-07 12:46     ` 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=Yu57a6SH8qAuCz48@ACM \
    --to=acm@muc.de \
    --cc=57009@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /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).