Opened 7 years ago

Last modified 7 years ago

#808 new proposed feature

Highlighting in prot's output the degree of the currently leading terms

Reported by: gorzel Owned by: somebody
Priority: minor Milestone: 4-2-0 and higher
Component: singular-kernel Version: 4-1-0
Keywords: highlight, current degree Cc:

Description

When one is watching within a std-computation the output from prot It would be quite useful to see the current degree of the leading terms displayed in bold font. (Compare the highlighted output from UNIX' top command)

The current degree here is 22, but in longer output it is much harder to find.

----s(1148)----------------------s(1133)---------------------s(1120)-----s(1123)
-----------------------(1100)--------------s(1092)s(1098)-s(1103)-s(1108)-s(1113
)-----s(1114)--------------(1100)------------------------s(1084)s(1092)-s(1099)-
s(1106)-s(1112)--------s(1110)----------(1100)--s(1105)-s(1112)-----s(1114)----s
(1146)--s(1154)-s(1160)s(1167)s(1173)s(1183)----s(1187)s22(1195)----------------
-------------------------------------------------------------------------------(
1100)---------------------------------------------------------------------------
-------------------------(1000)-------------s(994)----s(998)-s(1004)----(1000)--
s(1006)s(1013)-------s(1012)s(1019)-----s(1020)--------------------(1000)---s(10
03)s(1010)----------(1000)--s(1006)s(1013)-s(1017)-s(1023)s(1029)--------------s
(1021)-s(1027)--s(1032)--s(1037)-------s(1036)s(1043)----------------s(1036)----
-------s(1031)s(1038)------------------s(1025)---------s(1022)------s(1024)-----
-------s(1020)------s-----------s(1014)--

I tried to implement it /modify the source code myself, but finally I got stuck, hints are welcomed how to do it.

Some pointers:

man xterm

/usr/lib/X11/fonts/misc/

man Term::ANSIColor

The 256-color control sequences are documented at

<http://www.xfree86.org/current/ctlseqs.html> (search for 256-color).

Change History (2)

comment:1 Changed 7 years ago by hannes

No, it is not that easy: not everything is an 256 colour xterm. One has:

  • test the terminal type
  • find the properties of it
  • find the control sequences for it

and each of these tests may fail and need a backup strategy. Also the tests may be based on termcap or terminfo (which adds an additional dependency which we want to avoid) different systems may have only one of it or even none.

Version 0, edited 7 years ago by hannes (next)

comment:2 Changed 7 years ago by gorzel

As the ticket is not closed yet, let me modify the proposal:

Instead of color highlighting it would be more useful to prefix the output of the actual degree by the letter 'd' so that it possible to find it in a log file (redirected stdout) by using grep.

Note: See TracTickets for help on using tickets.