Syntax Highlighting Went Away

Help
2004-05-18
2004-05-27
  • James T. Richardson, Jr.

    I upgraded from Screem 9.6 to 10.2 and all of a sudden no code gets highlighted in the editor view. [and yes, i've toggled the button in preferences several times ;p]. I've even rm -rf'd $HOM/.screem/ and still it doesn't seem to highlight anycode. I also tried to downgrade back to 9.6, but now even with the previous version, the synatax highlighting is gone.

    I've not changed gtksourceview or anything....

    Any ideas on where to start looking to get my synatx highlightin gback?

    James

     
    • David A Knight

      David A Knight - 2004-05-19

      The only way I can think of that this could have happened in that gnome-vfs from gnome 2.6 has been installed without the shared-mime-info package being installed as well. 

      0.9.6 and 0.10.2 are practically identical apart from a few bug fixes so nothing changed to to with highlighting at all.

       
    • James T. Richardson, Jr.

      well, I just upgraded to 0.11.0 on a completly different machine and got the same results.

      What sort of debugging output would be useful to track this problem down?

      James

       
    • James T. Richardson, Jr.

      FWIW...

      I've installed the latest gnome-mime-data from GNOME's anoncvs, and I've (re)installed shared-mime-info 0.14 from freedesktop.org, and I've still got the same issue.

      I'm about to recompile gnome-vfs to see if that makes a difference.

       
    • James T. Richardson, Jr.

      Downgrading my Gnome-VFS to 2.6.0 fixed the problem, so I'm not sure where the problem lies.

       
    • David A Knight

      David A Knight - 2004-05-25

      I'm using gnome-vfs 2.6.1, along with shared-mime-info 0.14 and have no problem.

      Try changing the document type with the button in the statusbar, try XML, HTML etc.  If this works the problem is screem not setting the correct mime type for a file for some reason.

      If this doesn't work then gtksourceview is failing to load the language files.

      you could add

      g_print( "TYPE: %s\n", page->private->mime_type );

      to screem-page.c at line 315 (0.11.0) to see if the mime type is being set correctly. or

      g_print( "LANG: %p\n", lang );

      after line 316 to see if the language file has been loaded for the mime type

       
    • James T. Richardson, Jr.

      I re-re-re-compiled gnome-vfs-2.6.1 and installed it, and the issue went away. I've got one machine that is still having the same effect and i'll add those debugging statements to it when I get a chance. Very odd though.

       
    • James T. Richardson, Jr.

      well, humfp... problem resurfaced today, and the problem is screem not setting the correct mime type for some reason, it loads a .php file as a text document [i can change it from the status bar].

      How does screem determine the mime type of a document?

       
    • David A Knight

      David A Knight - 2004-05-27

      It just asks gnome-vfs what the mime type.  PHP files can be problematic and give back text/html if there is no <?php in the first few lines.

      There are some case where screem will ignore what gnome-vfs says and use the extension.  At the moment this is just limited to files which gnome-vfs says are text/xml.  See screem_get_mime_type() in support.c.

      It is possible that php files might be added here due to the miss identification that sometimes occurs.

      However if they are being reported as plain text rather than html or php it suggests a problem with gnome-vfs / shared-mime-info.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks