Bug 314379

Summary: Setting different highlight mode than the default for a file type: kate falls back to default when saving
Product: [Applications] kate Reporter: SB <simonbachmann>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: cullmann
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description SB 2013-02-03 20:31:14 UTC
When opening a document or creating a new one, Kate selects the syntax highlighting based on the extension of the file. This is certainly a good thing. 
Sometimes, though, one wishes to use a different highlighting than the one selected by default.
Example: imagine you're editing a manpage in the section 'n'. The extension of that file will be *.n. Now, by default, kate associates *.n files with 'Sources/Nemerle', in this case, though, the correct highlighting would be 'Markup/Troff mandoc'.
Manually selecting a 'non-standard' highlighting from the 'Tools' menu does work. Thing is, _sometimes_, when saving, kate changes highlighting back to the default. This only happens roughly one time out of two, could not figure out on what it depends...

Reproducible: Sometimes

Steps to Reproduce:
1. Create new file, put in some lines of troff and save with extension *.n
2. Select 'Troff mandoc' highlighting (Tools/Mode/Markup/ or Tools/Highlighting/Markup)
3. Make some changes
4. Save file
Actual Results:  
Syntax highlighting is changed back to 'Source/Nemerle' - Does not happen every time, though.

Expected Results:  
The selected highligting sould be kept, even if it's not the 'standard' one.

The combination Nemerle/Troff mandoc above is just a real life example. Problem is reproducible with other filetypes/highlightings as well.
Comment 1 SB 2013-02-03 20:32:05 UTC
Forgot:
Kate
Version 3.9.5
Using KDE Development Platform 4.9.5
Comment 2 Christoph Cullmann 2014-09-23 18:42:26 UTC

*** This bug has been marked as a duplicate of bug 332605 ***