bugGNU nano - Bugs: bug #37339, gentoo.nanorc contains empty...


bug #37339: gentoo.nanorc contains empty subexpression, which makes some parsers fail

Submitted by:  Anthony Scopatz <scopatz>
Submitted on:  Thu 13 Sep 2012 03:52:34 AM UTC  
Severity:  3 - Normal Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

Add a New Comment(Rich Markup)

You are not logged in

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


Sat 22 Feb 2014 07:46:22 PM UTC, comment #2:

The gentoo.nanorc in SVN has been fixed some time ago. Do you know of any other failing REs in the sample nanorcs?

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sun 24 Mar 2013 03:14:34 PM UTC, comment #1:

I think this is more an (unavoidable) issue with linking against many different platoform's regex libraries. I've had similar reports here:


The only solution seems to be to make your expressions POSIX ERE compliant and free from edge cases -- as I ended up doing on the above project.

The expression in question here does have an error. As indicated by the error message, the pipe at the beginning of the sub-expresion is redundant (and seemingly not permitted by some regex implementations).

Craig Barnes <craigbarnes>
Thu 13 Sep 2012 03:52:34 AM UTC, original submission:

As per the discussion at [1] it seems as if compile time options affect whether certain regexs in nanorc files are loaded properly. A sample error is:

Error in /Users/whoami/.nano/gentoo.nanorc on line 21: Bad regex "prepall(|docs|info|man|strip)": empty (sub)expression

This fails on a Mac OSX with nano v2.2.6 and the following configure options: --disable-browser --disable-help --disable-justify --disable-mouse --disable-nls --disable-operatingdir --disable-speller --disable-tabcomp --disable-wrapping --enable-color --enable-extra --enable-multibuffer --enable-nanorc --enable-tiny --enable-utf8 --with-slang

This succeeds (and does not throw an error) on Linux with the following options: --disable-wrapping-as-root --enable-color --enable-extra --enable-multibuffer --enable-nanorc --enable-utf8

1. https://github.com/scopatz/nanorc/issues/3

Anthony Scopatz <scopatz>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by craigbarnes (Posted a comment)
  • -email is unavailable- added by scopatz (Submitted the item)

    Do you think this task is very important?
    If so, you can 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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Wed 26 Mar 2014 01:32:07 PM UTC bens StatusNeed Info => Fixed
        Open/ClosedOpen => Closed
    Sat 22 Feb 2014 07:46:22 PM UTC bens StatusNone => Need Info
        Assigned toNone => bens
        Summarynano coloring regexes succeed/fail depending on compile-time options => gentoo.nanorc contains empty subexpression, which makes some parsers fail

    Back to the top

    Powered by Savane 3.3