I've repeatedly experienced somewhat weird and inconsistent behavior when implicitly using ~/.kde/share/apps/kate/metainfos. The problem I keep seeing is that when using Tools->Highlighting to switch to a different highlighting kate falls back on the original highlighting for the file's mode. This original mode is then written to ~/.kde/share/apps/kate/metainfos and even overrides modes set in a local .kateconfig file. - reproduce 1. open a file of type .xml or .xhtml 2. select Tools->Highlighting->Markup->Django HTML Template 3. edit the file and click save - expected 1. after selecting Tools->Highlighting->Markup->Django HTML Template the highlighting mode is changed and updated in ~/.kde/share/apps/kate/metainfos 2. the highlighting mode doesn't change when clicking the save button - actual 1. ok 2. when clicking save, the highlighting revert's to the file mode's default and this default is also written to ~/.kde/share/apps/kate/metainfos - note: I tried to circumvent the issue using a .kateconfig file. However, in this case files that have not been opened with kate before are shown correctly. Unfortunately, when saving the file it falls back to the incorrect highlighting as well which is then also stored in the metainfos and overriding .kateconfig.
This also reproduces on a version of Kate I just pulled from git and compiled.
*** This bug has been marked as a duplicate of bug 253193 ***