bugGNU Enscript - Bugs: bug #31844, line numbers are colored when...


bug #31844: line numbers are colored when previous line has a comment

Submitted by:  Felix <flyx>
Submitted on:  Fri Dec 10 11:10:32 2010  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Mon Nov 25 17:39:16 2013, comment #2:

I concur that the issue is with eat_one_line ...
this change to c.st fixes the // comment

--- /usr/share/enscript/hl/c.st 2010-02-09 08:05:55.000000000 -0700
+++ .enscript/hl/c.st 2013-11-25 10:36:15.405568808 -0700
@@ -86,11 +86,11 @@
call (c_comment);
comment_face (false);
- /\/\// {
+ /(\/\/.*)(\n)/ {
comment_face (true);
- language_print ($0);
- call (eat_one_line);
+ language_print ($1);
comment_face (false);
+ language_print ($2);

dave kerns <dtkerns>
Sat Apr 13 12:57:23 2013, comment #1:

Please see attached a rather hacky attempt at fixing this: just set the color back to grayscale for every line number (even if it's in a comment block, etc. that should remain highlighted; though I personally prefer no line numbers get highlighted).

This issue isn't only for comments, it happens for anything that uses eat_one_line.

(file #27859)

Ivan Lazar Miljenovic <ivan_l_m>
Fri Dec 10 11:10:32 2010, original submission:

If enscript is used with -C, --color and syntax highlighting, line numbers will have comment color if the preceding line ends with a comment. Tested with ada and tex highlighters on enscript 1.6.4.

example command:

enscript -Eada -C --color -o output.ps file.adb

Felix <flyx>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #27859:  enscript_dont_highlight_line_numbers.patch added by ivan_l_m (652B - text/x-patch - A hacky patch to un-color line numbers)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by dtkerns (Posted a comment)
  • -unavailable- added by ivan_l_m (Updated the item)
  • -unavailable- added by flyx (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Apr 13 12:57:23 2013ivan_l_mAttached File-=>Added enscript_dont_highlight_line_numbers.patch, #27859

    Back to the top

    Powered by Savane 3.1-cleanup1