[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Highlight ANSI sequences in the whole buffer (was [PATCH] A
From: |
Nathaniel Nicandro |
Subject: |
Re: [PATCH] Highlight ANSI sequences in the whole buffer (was [PATCH] ANSI color on example blocks and fixed width elements) |
Date: |
Wed, 08 Nov 2023 09:35:25 -0600 |
User-agent: |
mu4e 1.8.13; emacs 30.0.50 |
Ihor Radchenko <yantar92@posteo.net> writes:
> Hi,
Hi Ihor,
> A few months have passed since the last activity in this thread.
> May I know if you are still interested in the idea?
I apologize for being unresponsive all these months. Yes I'm still
interested in this idea, although I have not had time to work on it
recently. Life events caused me to have to stop working on it
completely a few months back, I'm hoping to be able to put in more time
now.
I haven't even been able to put that much time into my more popular
personal projects recently either!
> Should you need any help, feel free to ask.
I have been working on some code to satisfy the set of rules you
provided in a previous email of this thread. I've made some progress,
but the code is a little messy and buggy. I would like to clean it up
first before I present it.
Where I'm having some trouble is processing the contents of greater
elements. My approach for them is basically to define an ansi-context
(see `ansi-color-context-region`) for each greater element and process
the inner elements using that context. This seems to work except for
plain-list elements which can have other plain-list elements within
them, e.g.
#+RESULTS:
- <ANSI1>List item 1
- Sub-list <ANSI2>item 1
- List item 2
- List item 3
Should the sub-list's sequence affect the rest of list elements in the
parent list? If that's the case, then I think I can keep with my
approach and define an ansi-context for the outermost plain-list which
is used by all the other plain-list elements contained within
it. Otherwise I think I would have to do something like copy the
ansi-context for each inner plain-list and use the copy to process the
sequences in the inner-list so that the context of the outer-list is
unaffected. WDYT?
--
Nathaniel