all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Alan Mackenzie <acm@muc.de>
Cc: "Simen Heggestøyl" <simenheg@runbox.com>, 41897@debbugs.gnu.org
Subject: bug#41897: 28.0.50; JavaScript comment filling with mhtml-mode
Date: Fri, 26 Jun 2020 00:20:07 +0300	[thread overview]
Message-ID: <a8da5e50-c151-3953-c89a-ff43f45c872a@yandex.ru> (raw)
In-Reply-To: <20200625201100.GE10342@ACM>

On 25.06.2020 23:11, Alan Mackenzie wrote:

> Sluggish performance isn't about "usually" and 98% of the time; it's
> about unusual constellations and the other 2%.

Still, a slow-ish fill-paragraph is nowhere near as bad as, say, 
slowdown during typing.

>>> Then why not do in mmm-mode what I'm doing in CC Mode, mhtml-mode and
>>> js-mode, i.e. add ad hoc code to handle precisely the case of js-mode?
> 
>> That would be something every user that configures a submode class using
>> js-mode have to be aware of. That's not easy to document, or even if we
>> made sure it's documented, to be sure that users read it.
> 
> Are you telling me that mmm-mode couldn't keep a watch out for js-mode,
> leaving other libraries untroubled?  Again, the trouble here appears to
> arise from using something (a mode) without first initialising it.

Sounds like special-casing js-mode, before-change-functions and this 
particular function all together. Basically, like a magic constant in 
the code.

This is ultimately doable, but I'm not sure how to write a patch for it 
which wouldn't leave me feeling dirty after.

>> These do seem to be the options: some C core support (though I'm not
>> clear on the particulars of the proposed design), or switching from
>> ad-hoc caches to syntax-propertize-function and and associated
>> syntax-ppss cache.
> 
> The syntax-propertize-function approach is poor design.  It restricts the
> use of the syntax-table text property too much.  syntax-ppss has had a
> troubled history and doesn't do the right thing in narrowed buffers.  It
> advertises itself as a magic wand which does everything, but when you've
> been enticed into committing your SW to it, you then find out it's less
> than magic, and you've got to call ugly functions by hand at strange
> times, and are restricted in how and when you can use it.

Despite certain edge cases, I've had a lot of success with it. Both in 
major modes, and in mmm-mode thanks to it.





  reply	other threads:[~2020-06-25 21:20 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <874krbaqg3.fsf@simenheg@gmail.com>
     [not found] ` <mailman.1991.1592327403.2541.bug-gnu-emacs@gnu.org>
2020-06-20 17:18   ` bug#41897: 28.0.50; JavaScript comment filling with mhtml-mode Alan Mackenzie
2020-06-20 18:27     ` Simen Heggestøyl
     [not found]     ` <87d05ta8z9.fsf@simenheg@gmail.com>
2020-06-21 16:55       ` Alan Mackenzie
2020-06-22 19:17       ` Alan Mackenzie
2020-06-23  0:02         ` Dmitry Gutov
2020-06-23  8:36           ` Alan Mackenzie
2020-06-23 14:23             ` Dmitry Gutov
2020-06-23 16:28               ` Alan Mackenzie
2020-06-23 17:59                 ` Dmitry Gutov
2020-06-23 19:17                   ` Alan Mackenzie
2020-06-23 23:11                     ` Dmitry Gutov
2020-06-24 17:43                       ` Alan Mackenzie
2020-06-24 18:28                         ` Dmitry Gutov
2020-06-25 16:33                           ` Alan Mackenzie
2020-06-25 16:48                             ` Dmitry Gutov
2020-06-25 18:07                               ` Alan Mackenzie
2020-06-25 18:19                                 ` Dmitry Gutov
2020-06-25 19:13                                   ` Alan Mackenzie
2020-06-25 19:28                                     ` Dmitry Gutov
2020-06-25 20:11                                       ` Alan Mackenzie
2020-06-25 21:20                                         ` Dmitry Gutov [this message]
2020-06-27 11:06                                           ` Alan Mackenzie
2020-06-28  0:18                                             ` Dmitry Gutov
2020-06-25 20:53                     ` Tom Tromey
2020-06-25 21:14                       ` Dmitry Gutov
2020-06-26 16:31                       ` Alan Mackenzie
2020-06-25 20:49         ` Tom Tromey
2020-06-26 16:46           ` Alan Mackenzie
2020-07-04 13:13         ` Alan Mackenzie
2020-06-16 17:08 Simen Heggestøyl

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

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

  git send-email \
    --in-reply-to=a8da5e50-c151-3953-c89a-ff43f45c872a@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=41897@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=simenheg@runbox.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.