nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] colorized/highlighted scan output?

2012-11-02 12:53:43
Ken wrote:

- Can we just stick with the original idea of outputting escape characters?

  Well ... maybe.  The problem is the limitation of the format language.
  For example, you can't have an argument to a function which contains
  a ')' character.  Maybe that isn't a concern.  We might need two new
  format functions, ones that turn "zero width" mode on and off (and
  thus two new format instructions).

While terminfo or something higher level, more generic,
etc., would be nice, we're so close now to supporting ANSI
escapes that I'd like to (and am going to :-) get them to
work.  It doesn't preclude adding something else, of course.

Here's a nasty way to feed a ')' to a format literal:

    1) in profile:
    closeparen: )

    2) in format:
    %(void(profile closeparen))%(zputlit)

Fortunately, I don't expect to need that.  I just tripped
over it before I realized that I could just put an ASCII ESC
directly in a format.  But, it might suggest adding support for
something like this:

    %(display cyan)%(zputlit)

There could be a set of predefined values for common ANSI
escapes.  Users could override each value or supply anything
else they wanted in their profile.  (Or some additional file
that gets appended to the profile.)

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>