GNU bug report logs -
#41897
28.0.50; JavaScript comment filling with mhtml-mode
Previous Next
Reported by: Simen Heggestøyl <simenheg <at> runbox.com>
Date: Tue, 16 Jun 2020 17:10:01 UTC
Severity: normal
Found in version 28.0.50
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #47 received at 41897 <at> debbugs.gnu.org (full text, mbox):
Hello, Dmitry.
On Wed, Jun 24, 2020 at 21:28:09 +0300, Dmitry Gutov wrote:
> Hi Alan,
> On 24.06.2020 20:43, Alan Mackenzie wrote:
[ .... ]
> > But a substantial delay, involving (I think) analysing the code from
> > BOB each time. The current working setup has a negligible delay at
> > each buffer change (and, of course, recalculation of cache entries
> > only when required).
> I imagine that would not be a significant problem for the rare cases
> that fill-paragraph is called in a JS region. Considering most of the
> contents in mhtml-mode buffers are not JS code, on average, that should
> tilt the scales in favor of parsing lazily, rather than affecting every
> character insertion.
The current patch does parse lazily. You want to remove the benefit of
using this cache, no matter how small, for reasons I still can't grasp.
This removal will hurt performance, and possibly cause new bugs to solve.
[ .... ]
> > It sounds like you want to use a facility without initialising it.
> > This feels a bit unreasonable.
> That cache reset at the beginning of js-fill-paragraph could as well
> re-initialize the cache.
You're misusing the work "initialize" here. If you initialise a variable
every time you read it, you might as well not have that variable.
[ .... ]
> >>>> js-mode mostly works, aside from features like this one.
> >>> With the current patch, comment filling should work fine in js-mode.
> >> Above, I meant that js-mode mostly works fine with mmm-mode. And my
> >> suggestion might make comment filling work there, too. Automatically.
> > It works automatically at the moment (with the current patch applied). I
> > think you're saying again you don't want to be troubled by initialising
> > it.
> It doesn't automatically work in mmm-mode. With my suggestion, it very
> likely would.
It would work fine with the current patch, together with calls to
initialise the mechanism. What precisely is the problem in mmm-mode?
[ .... ]
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 5 years and 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.