Karim BELABAS on Sat, 26 Oct 2002 12:27:15 +0200 (MEST)

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PATCH CVS] log and colors and prettyprint

On Fri, 25 Oct 2002, Ilya Zakharevich wrote:
> On Fri, Oct 25, 2002 at 10:32:48PM +0200, Karim BELABAS wrote:
>> On Wed, 16 Oct 2002, Ilya Zakharevich wrote:
>>> I suspect that most of the people do not want to see meaningless
>>> escapes and tex-formatting in the log file, right?
>>> The following patch disables escape sequences and the-line-noise-which-
>>> is-the-input-for-prettyprinter when writing to the log file.
>>> The "proper" solution may be to have two extra flags (or bits of
>>> default(log)) to enable/disable these "features"; but I hope that most
>>> people do not want to go back.
>> I've only partially applied this patch. As Bill pointed out, escape sequences
>> in logfile work nicely:
>> * you can display them with cat, more, or less -r.
> No.  Only if your TERM is the same, your background is the same etc.

Which is usually true.

> This behavior is acceptable only if governed by some switch [but this
> is easy to set up with the other patches of mine - hmm, not exactly;
> only if one uses readline_flag & ~0x10 to enable readline, instead of
> the current if (readline)...].

This is mostly independant from readline. If it needs to be governed by a
flag, let it be 'log'.

It is true that misc/gpflog could profitably be built in the logging
mechanism, e.g

  log = 0: no log
  log = 1: current behaviour
  log & FILTER: strip all ANSI escapes + readline's <C-A>/<C-B> while logging
[ your patch only cancelled the ANSI escapes ]

This leaves all options open.

Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathematiques, Bat. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas/
PARI/GP Home Page: http://www.parigp-home.de/