Goofy font-locking in ledger.el? (long-standing bug?)

21 views
Skip to first unread message

Christopher Allan Webber

unread,
Jan 30, 2013, 4:53:58 PM1/30/13
to ledge...@googlegroups.com
Heya,

I don't know if there's something really goofy about my situation, but
on all computers I have this problem with font locking in ledger.
Things seem to behave right generally, but are highilighted incorrectly.

(Never mind the nonsense "another expense" when I'm getting income in
the transactions, this is just a made-up file put together quickly)

I've attached a screenshot. I've had this issue ever since the
ledger-mode rewrite a long while ago. My files run fine through ledger,
but the highlighting is always goofy, even if I load emacs with
"emacs -q"

Is the highlighting just fine for everyone else somehow?

Even goofier: If I hit enter a few times before a transaction, usuallly
it fixes itself.

I have no idea why this happens. But it happens in all my files, and it
makes editing them kind of annoying on the eyes! Is it just me, or is
buggy syntax highlighting a known issue?

ledger-borked.png

Craig Earls

unread,
Jan 31, 2013, 8:33:26 AM1/31/13
to ledge...@googlegroups.com
That is the current design for highlighting.  It highlight transactions that haven't cleared.  I am starting on a project to improve the font lock capabilities that will allow everyone to have what they like.  It will take a bit of time.



--

---
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 ledger-cli+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
Craig, Corona De Tucson, AZ
enderw88.wordpress.com

Christopher Allan Webber

unread,
Jan 31, 2013, 2:52:27 PM1/31/13
to ledge...@googlegroups.com
Okay, Glad to hear about the improved highlighting work. However I'm
not sure what you said is true...

If you look at the PNG I sent, it's inconsistent: the first and second
transactions are *both* cleared, but they are not highlighted in the
same way. It seems to me that entry #2 shouldn't be blue on the line
that says "Another expense". But maybe I don't understand!

I've noticed several things that affect the way highlighting work:
- whether there's a comment immediately before the entry
- whether or not I just typed the entry in or it was already there
- magical incantations from wizards

Anyway... thanks for working on ledger's emacs mode! I do really
appreciate it. :)

- Chris

Craig Earls

unread,
Jan 31, 2013, 3:24:39 PM1/31/13
to ledge...@googlegroups.com
OK, I see what you are talking about.  It is actually different from what I see on mine.  But the font handling is going to get a thorough thrashing here soon (as soon as I can figure it out!).  So that bug will probably gut replaced with a different one or five...

Christopher Allan Webber

unread,
Jan 31, 2013, 5:50:39 PM1/31/13
to ledge...@googlegroups.com
Gotcha. Looking forward to it! :)
Reply all
Reply to author
Forward
0 new messages