bugGNU nano - Bugs: bug #49569, gentoo.nanorc does not always...

 
 

bug #49569: gentoo.nanorc does not always color use flags correctly

Submitted by:  Konstantin Shakhnov <kstn>
Submitted on:  Wed 09 Nov 2016 04:21:19 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Mike Frysinger <vapier>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 14 Nov 2016 07:07:22 PM UTC, comment #3:

i've made a number of updates to the file to match Gentoo standards:
http://git.savannah.gnu.org/cgit/nano.git/commit/?h=e472b725654cbabbce3f532f039afc61c504edec

i believe it should also fix this bug.

Mike Frysinger <vapier>
Project MemberIn charge of this item.
Wed 09 Nov 2016 07:28:53 PM UTC, comment #2:

Yes, your variant works well too.

About - '?' - seems just a question of taste. Or colorise all beetveen '-[[:digit:]]' and '([[:space:]]|$)' (it seems to me that the last will be always '$' because '' is greed) and then colorise flags (with '-[[:digit:]].*([[:space:]]|$)'), or colorise
onlu version until the first space or end of line with ('-[[:digit:]].*?([[:space:]]|$)').

BTW may be there is a reason add file '/var/lib/portage/world' to this syntax - it use the same format - for instance:

sys-kernel/gentoo-sources
sys-process/anacron

Diff -u with your variant attaced.

(file #38918)

Konstantin Shakhnov <kstn>
Wed 09 Nov 2016 06:26:51 PM UTC, comment #1:

Hmmm... Maybe the two lines that color use flags should simply be moved after the two lines that color slot and version numbers? Could you try that, Konstantin? Because adding the ? where you do doesn't seem right to me.

(Also, when sending a diff, always use --unified or -u.)

Benno Schulenberg <bens>
Project Administrator
Wed 09 Nov 2016 04:21:19 PM UTC, original submission:

Let's assume we have a line

>=media-libs/imlib2-1.4.9 X


'-1.4.9' (version) should be magenta, and 'X' (use flag) should be red. But they all are magenta.

It seems that trouble is with greedy '*' in a line
color magenta "-[[:digit:]].*([[:space:]]|$)".

After replacing it to '*?' all works well.

Diff included.

Konstantin Shakhnov <kstn>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #38918:  gentoo.nanorc.new.diff added by kstn (777B - application/octet-stream)
file #38914:  gentoo.nanorc.diff added by kstn (107B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by vapier (Posted a comment)
  • -unavailable- added by bens (Posted a comment)
  • -unavailable- added by kstn (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):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 14 Nov 2016 07:07:22 PM UTCvapierStatusNone=>Fixed
      Assigned toNone=>vapier
      Open/ClosedOpen=>Closed
    Wed 09 Nov 2016 07:28:53 PM UTCkstnAttached File-=>Added gentoo.nanorc.new.diff, #38918
    Wed 09 Nov 2016 06:26:51 PM UTCbensSummarygentoo.nanorc regexp bug=>gentoo.nanorc does not always color use flags correctly
    Wed 09 Nov 2016 04:21:20 PM UTCkstnAttached File-=>Added gentoo.nanorc.diff, #38914

    Back to the top


    Powered by Savane 3.1-cleanup1