#68 No auto-upgrade for 5.2 preferences

development
closed-fixed
Program (402)
7
2001-11-12
2001-09-05
No

From Mark Lawrence <lawrence@unified-eng.com>:

I just downloaded, compiled, and installed 5.2RC1, and
my Perl programs are not being highlighted. As a Perl
file opens, a dialog box appears with the words

Style "Regex" named in pattern "re match class delims"
does not match any existing style

The file opens and is recognized as Perl (the Perl item
is checked in the Preferences>Language Mode submenu)
but there is no syntax highlighting.

According to the Preferences>Default Settings>Syntax
Highlighting>Text Drawing Styles dialog box, there is
no "Regex" style (just as the error message suggests).
According to the Preferences>Default Settings>Syntax
Highlighting>Recognition Patterns dialog box, the "re
match class delims" pattern should have a highlight
style of "Plain" (of course, it can't say "Regex,"
because
there is no such style, so maybe this is some sort of
default).

Information that may or may not be useful:

I'm using the same .nedit that I used with 5.1 and with
an earlier prerelease of 5.2. Syntax highlighting
worked fine with both of those.

Syntax highlighting seems to work fine with C files,
HTML/SGML files, X resource files, and shell files.

What is the fix? An updated Perl pattern, perhaps?

Discussion

  • Scott Tringali

    Scott Tringali - 2001-09-05

    Logged In: YES
    user_id=11321

    Thanks, this is indeed a problem in 5.2. Folks who have
    customized their text drawing styles will see this. (My
    guess is that's most people.)

    As a workaround, you can simply add two more new text
    drawing styles caused "Regex" and "Warning".

    NEdit needs to bump the preferences file version to 5.2,
    detect a pre-5.2 version, and automatically splice in these
    two new text drawing styles.

    I think a fix for this is definitely needed for final 5.2.

     
  • Joor Loohuis

    Joor Loohuis - 2001-09-06

    Logged In: YES
    user_id=197101

    The problem comes from the fact that NEdit stores its
    patterns (if unchanged) in the binary, but styles are always
    stored in the $HOME/.nedit file. Some of the new or improved
    patterns rely on styles that are not present in the
    configuration for 5.1.1, and that is where the warning comes
    from.

    The solution is simple, import the file attached to this bug
    report, and all configuration incompatibilities should be
    resolved. Please read the instructions at the top of the file.

     
  • Joor Loohuis

    Joor Loohuis - 2001-09-06

    Logged In: YES
    user_id=197101

    I appologize. In my previous post I stated that I would
    attach the import file to this report, but I can't seem to
    figure out how to do that. I'll try and find another way of
    getting the file out there.

     
  • Alexander Mai

    Alexander Mai - 2001-09-06

    Logged In: YES
    user_id=15180

    Just for the records:
    Search for
    Check to Upload & Attach File:
    at the bottom of this screen. Then "Browse" ...

     
  • Scott Tringali

    Scott Tringali - 2001-09-06

    Logged In: YES
    user_id=11321

    I've got a bare-bones fix that should avoid the problem,
    without requiring the user to locate and apply a script.
    Please give it a try and let me know how it works so we can
    put this in 5.2. Patch is attached to the bug report.

     
  • Scott Tringali

    Scott Tringali - 2001-09-06
     
  • Scott Tringali

    Scott Tringali - 2001-09-06
    • status: open --> open-fixed
     
  • Eddy De Greef

    Eddy De Greef - 2001-09-11

    Logged In: YES
    user_id=73597

    It seems to work fine.

    It would be nicer, though, if highlight styles
    were silently taken from the default set when
    missing in the user's customized set (as suggested
    by Joachim), only when needed (to prevent cluttering
    menus). This would prevent future surprises.

    But I guess that this patch is ok for the 5.2 release.
    We can add a more a more generic upgrading mechanism
    after the release.

     
  • Scott Tringali

    Scott Tringali - 2001-09-13

    Logged In: YES
    user_id=11321

    Committed to the 5.2 release branch.

    Checking in preferences.c;
    /cvsroot/nedit/nedit/source/preferences.c,v <--
    preferences.c
    new revision: 1.30.2.2; previous revision: 1.30.2.1
    done

     
  • Scott Tringali

    Scott Tringali - 2001-09-13
    • assigned_to: nobody --> tringali
     
  • Eddy De Greef

    Eddy De Greef - 2001-10-04

    Logged In: YES
    user_id=73597

    I've extended the upgrade code: Regex, CSS, and
    XML language modes are added too (if not present
    already), and the Perl, PostScript, C++, Sh, and
    Tcl language modes are upgraded too (if not
    customized by the user).
    Joor has confirmed that it works, so I suggest
    that we close this.

     
  • Scott Tringali

    Scott Tringali - 2001-10-09

    Logged In: YES
    user_id=11321

    Ed has fixed it better than I did. I haven't been able to
    get this to work yet for me, but I'm working on it.

     
  • Scott Tringali

    Scott Tringali - 2001-10-09
    • assigned_to: tringali --> edg
     
  • Eddy De Greef

    Eddy De Greef - 2001-11-02

    Logged In: YES
    user_id=73597

    Despite a few hickups, it should be fine now.

     
  • Scott Tringali

    Scott Tringali - 2001-11-12
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.