On Sat, Nov 19, 2022 at 01:16:47PM +1100, Cameron Simpson wrote:
On 19Nov2022 08:32, Cameron Simpson <c...@cskk.id.au> wrote:
The issue is my index colouring, specificly this line:

  color index white default  "((~P|%f polyname ~h '^from:.*cameron simpson')) | (~v 
~((~P|%f polyname ~h '^from:.*cameron simpson')))"


I'm wondering if it is the `~h` pattern. That would search every header, which I presume exceeds the cache?

~h always opens up the message and scans header by header. It doesn't use the header cache.

BTW ~() can also be very expensive.

Is there an efficient way to search the _text_ of the `From:` header? Not match the from address part, but the comment string (which is where the "cameron simpson" resides)?

~f scans the display name part of the address in most cases, including for color commands.

If you mean an actual address comment field, e.g. (text), those are considered the display name if none otherwise exists. But if there is also a display name, the parser discards the comment.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to