Bug 310302 - JJ: tcsh context Cmd@ and CmdSet do not exist
Summary: JJ: tcsh context Cmd@ and CmdSet do not exist
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: junior-jobs
: 310198 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-18 20:34 UTC by Mark Greenwood
Modified: 2013-09-13 17:38 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Greenwood 2012-11-18 20:34:19 UTC
Kate 3.9.3 on KDE 4.9.3

When I alter the color scheme and then Export it, I get a dialog with the following error:

/usr/share/kde4/apps/katepart/syntax/tcsh.xml:Deprecated syntax. Context Cmd@ not addressed by a symbolic name/usr/share/kde4/apps/katepart/syntax/tcsh.xml:Deprecated syntax. Context CmdSet not addressed by a symbolic name

Reproducible: Always

Steps to Reproduce:
1. From Kate Settings dialog->Fonts and Colors, click Export

Actual Results:  
The error described is displayed.
A schema file is created but I haven't tested if it works because I'm nervous :)


KDE 4.9.3 on Kubuntu 12.04.1
Comment 1 Dominik Haumann 2012-11-19 09:00:15 UTC
Matthew, Wilbert: Can you please take care of this?
It seems the tcsh.xml file was never correct.
Comment 2 Dominik Haumann 2013-02-17 22:25:54 UTC
*** Bug 310198 has been marked as a duplicate of this bug. ***
Comment 3 Dominik Haumann 2013-02-17 22:29:07 UTC
And again.

Matthew, Wilbert: Can you please take care of this?
It seems the tcsh.xml file was never correct.
Comment 4 Alex Turbov 2013-06-21 02:07:28 UTC
(In reply to comment #3)
> And again.
> 
> Matthew, Wilbert: Can you please take care of this?
> It seems the tcsh.xml file was never correct.

I suppose tcsh highlighter became orphaned a long time ago... and looking into date of the bug report, nobody uses it... it is only a cause of annoyance when exporting colors (at least for me).

I see 2 ways to deal w/ this case:
0) replace refs to undefined contexts (which are 'Cmd@' and 'CmdSet') w/ '#stay' -- making XML valid, but possible incorrect highlighter
1) just remove this file ... cuz it seems nobody care about it (cuz nobody use it)...
Comment 5 Alex Turbov 2013-06-21 02:18:25 UTC
also I suppose DTD should be fixed, so such type of errors will not appear in future.
particularly 'name' of a 'context' element must be unique ID, not a CDATA.
and attribute 'context' on other tags (common attributes) must be IDREF, not a CDATA.
Comment 6 Alex Turbov 2013-06-21 02:36:26 UTC
(In reply to comment #5)
> also I suppose DTD should be fixed, so such type of errors will not appear
> in future.
> particularly 'name' of a 'context' element must be unique ID, not a CDATA.

... and must be #REQUIRED (I suppose contexts w/o name have no sense)

> and attribute 'context' on other tags (common attributes) must be IDREF, not
> a CDATA.

oops. unfortunately this is impossible :( because of #stay and #pop[...] names which are not IDs :(
Comment 7 Matthew Woehlke 2013-06-21 16:01:23 UTC
(In reply to comment #4)
> I suppose tcsh highlighter became orphaned a long time ago... and looking
> into date of the bug report, nobody uses it... it is only a cause of
> annoyance when exporting colors (at least for me).

Well... yeah. I haven't looked at a .csh file in years. It's in VCS, so recoverable, so no objection by me to orphan and remove it. If anyone wants it again they can bring it back or ask someone to do so.

(Not sure tweaking the DTD would help all that much; the real reason these errors exist is because the rules are only half-written :-).)
Comment 8 Dominik Haumann 2013-08-09 13:30:35 UTC
Matthew, I'd prefer a fix over removing it. Care to spend some minutes? ;)
Comment 9 r.joosten 2013-09-13 08:16:15 UTC
I just updated my Linux box and sateted using the latest Kate to edit (among others) tcsh scripts. So you have a user. Well, one at least.

Option 0: "replace refs to undefined contexts (which are 'Cmd@' and 'CmdSet') w/ '#stay' -- making XML valid, but possible incorrect highlighter" Did the trick for me. The highlighting remained sensible as well.
Comment 10 Dominik Haumann 2013-09-13 12:02:08 UTC
Git commit 91dca1220b7f525be58d57413905457151fe8afb by Dominik Haumann.
Committed on 13/09/2013 at 12:01.
Pushed by dhaumann into branch 'master'.

fix tcsh syntax highlighting

FIXED-IN: 4.11.2

M  +3    -3    part/syntax/data/tcsh.xml

http://commits.kde.org/kate/91dca1220b7f525be58d57413905457151fe8afb
Comment 11 Dominik Haumann 2013-09-13 12:02:48 UTC
Git commit cb94bbd610b7ed7f3421ee668fd348523b6d3229 by Dominik Haumann.
Committed on 13/09/2013 at 12:01.
Pushed by dhaumann into branch 'KDE/4.11'.

fix tcsh syntax highlighting

FIXED-IN: 4.11.2

M  +3    -3    part/syntax/data/tcsh.xml

http://commits.kde.org/kate/cb94bbd610b7ed7f3421ee668fd348523b6d3229
Comment 12 Matthew Woehlke 2013-09-13 15:59:39 UTC
Thanks. Sorry, but I just have not had time to re-learn csh.
Comment 13 r.joosten 2013-09-13 17:38:46 UTC
Thanks for the fix.