Craig Earls <[email protected]> writes:

> As I said, the fontification works very well for me.  By way of
> history, there have been complaints about ledger fontification for
> longer than I have been using ledger.  emacs font-lock-mode is very
> good at highlighting languages that do not have lots of context, and
> very poor at highlighting text when the format of the text depends on
> what is in other portions of the surrounding text.  The new
> fontification scheme is attempting to address the many complaints from
> before, but is still a work in progress.  The mechanism emacs uses to
> call font-locking routines is very difficult to debug and causes all
> sorts of interesting problems when it asks to fontify a region that
> starts in the middle of a transaction.  I have mostly sorted these
> things out.
>
> It would help greatly if those have problems could send me a ledger
> file that cases the misbehavior.  The verbal descriptions of what is
> happening don't really help find the problem.

This is the scenario I wished to avoid. The problems are so myriad that
it's quite unlikely it will be a trivial fix. I recognise that the
switch away from font-lock-mode is a work in progress, my intention in
giving a vague list of presenting issues, rather than a detailed report
on selected bugs, was to highlight the distance yet to be progressed
before a stable release. I don't doubt that fontification works very
well on your individual system, but this does not prove much, and I see
the plethora of subsequent reports to the contrary should be enough to
dissuade you ;)

I did see Christopher's report a while back, apologies for not chiming
in then.

My system:

GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, NS apple-appkit-1343.14)
 of 2014-10-21 on Paul-Rankins-MacBook-Pro.local

Although I keep things pretty stock, the fontification issues occur
starting with `emacs -q` and with
`/usr/local/Cellar/emacs/24.4/Emacs.app/Contents/MacOS/Emacs -q`

The fontification issues occur with my existing finances.ledger and with
a new file.

While I would be happy to send a `print --anon` version of my finances,
such output strips many of the syntax types in question and so would not
be useful.

But this is irrelevant in my view, which is that the new fontification
system is just not ready for a stable release and really ought to be
reverted for the time being. I recognise the enthusiasm for pushing out
new work, but there's no shame in recognising that such work was perhaps
not fully baked.

As an aside, considering the relative simplicity of the ledger syntax, I
am curious about the alleged limitations of font-lock-mode that cannot
be overcome with an addition of a function added to the
font-lock-extend-region-functions hook...? I've found that this reliably
alleviates the aforementioned problems even dealing with a much looser
multi-line syntax than ledger's (although my perusal of the ledger-*.el
code has been cursory at best).

Peace.

-- 
Paul W. Rankin
http://www.paulwrankin.com

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to