ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Taco Hoekwater <taco@elvenkind.com>
Subject: Re: coloring the logfile
Date: Fri, 30 Aug 2019 01:37:00 +0200	[thread overview]
Message-ID: <523389f9-c1b7-cfdb-b4df-7700c329b89b@xs4all.nl> (raw)
In-Reply-To: <CD8AE3D2-9F6C-42B4-8176-4483973E9D34@elvenkind.com>

On 8/29/2019 10:58 AM, Taco Hoekwater wrote:
> Hi,
> 
> FWIW: ConTeXt can already do colours on the terminal:
> 
>     context —ansi myfile.tex
> 
> (but that currently results in an empty log, I think because there is no
> separation)

probably, i forgot the details (in the middle of somethign else so it 
has to wait) and i have disabled ansi in the console so i need to set 
that up

> Since the engine internals know and expose the difference between terminal
> and log file already, it is quite possible to split the lua messaging code
> into separate 'log' and 'term’ cases, if desired. There is no need to patch
> the engine for that, just some extra lua code that Hans has to be willing to
> write/include.
> 
> However, if support for redirect of stdout is needed (because in that case
> the ’term’ in internal TeX speak is not really a terminal), then isatty()
> needs to be exposed to Lua in one way or another.

sure btu the problem is that it adds a some overhead as we then have to 
'generate' two messages, one for the console an done for the log

> If you want color in the actual log, then someone has to rewrite the log
> reporting lua code to generate RTF or HTML. Should technically be doable
> as well...

that was actually one of the first things done (decade old code), i.e. 
context can launch a browser on an error or after a run but i gave up on 
using it because there is no way to update automatically so one ends up 
with numerous tabs

> BTW, it is not safe to assume that all ttys actually support ansi colours
> (remote terminals quite often do not), so a command-line switch would still
> be needed.
i did the ansi as a gimmick and never use it (it is also slower)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2019-08-29 23:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 19:54 Hans van der Meer
2019-08-29  5:35 ` Henning Hraban Ramm
2019-08-29  7:39   ` Henri Menke
2019-08-29  8:25     ` Hans van der Meer
2019-08-29  8:58       ` Taco Hoekwater
2019-08-29 23:37         ` Hans Hagen [this message]
2019-08-30  0:30           ` Hans Hagen
2019-08-29 23:38         ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=523389f9-c1b7-cfdb-b4df-7700c329b89b@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    --cc=taco@elvenkind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).