Bug 405779 - Customizing file extensions doesn't work for highlighting
Summary: Customizing file extensions doesn't work for highlighting
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: syntax (show other bugs)
Version: 18.04.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-23 10:26 UTC by Aleksey Midenkov
Modified: 2020-12-13 04:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksey Midenkov 2019-03-23 10:26:39 UTC
SUMMARY
Custom file extensions don't turn on appropriate syntax highlighting mode.

STEPS TO REPRODUCE
1. In Configure -> Open/Save -> Modes & Filetypes
Select Database/SQL (MySQL)
Add '*.hhh' to File extensions: *.sql;*.SQL;*.ddl;*.DDL; *.hhh
Click OK
2. Make some file /tmp/x.hhh and open it in Kate

OBSERVED RESULT
Highlighting is set to 'None'

EXPECTED RESULT
Highlighting must be set to 'Database/SQL (MySQL)'

ADDITIONAL INFORMATION
Restarting Kate doesn't help.
Comment 1 Aleksey Midenkov 2019-03-23 10:36:19 UTC
For /tmp/x.hhh this content was used:

https://pastebin.com/raw/jzahxqMf
Comment 2 Ahmad Samir 2019-06-19 18:36:13 UTC
Remove the space after the semicolon, it should be:
;*.hhh
not
; *.hhh

:)
Comment 3 Aleksey Midenkov 2019-07-28 21:19:23 UTC
No, it doesn't work in any case. I have

*.sql;*.SQL;*.ddl;*.DDL;*.test

For Database/SQL (MySQL)

When I open .test files some of them colored, some of them not. Also, not trimming backspaces is user-unfriendly. It is a trivial task and I wonder why it is not done yet. (Well, don't wonder when it comes to KDE overall quality)
Comment 4 Christoph Cullmann 2019-08-24 20:53:43 UTC
For the me test.hhh is opened with the right mode if the *.hhh is added without a space in front.

And we don't trim spaces there as you can actually write

this file only.txt

there and expect that exactly that is used not thisfileonly.txt.

Works for me with *.test, too.

Besides, comments like

"(Well, don't wonder when it comes to KDE overall quality)"

don't really motivate people to help you out.
Comment 5 Aleksey Midenkov 2019-10-03 17:18:35 UTC
Well, in any case it's not user friendly. You could trim all spaces around ; separator and that would cause less problems for people. Did you see someone using files starting from space? I didn't. Even if those exist chances are that they want them in this list are close to zero. Do you still want to handle this hypothetical but unreal case in favor of real case where real users suffer?

Well, until you KDE team don't make user friendly decisions I'm not going to be friendly to you.
Comment 6 Dominik Haumann 2019-10-03 17:37:54 UTC
Aleksey, a software that is not user friendly is quite a different matter than being unfriendly to other people.

On a technical level I believe you are probably right. But I wonder how you expect others to work for you in their free time when you choose a communication style like this. This is not how free/open source software works. Thanks.
Comment 7 Justin Zobel 2020-11-13 05:01:49 UTC
I've just tested this and the formatting is applied to the .hhh file.

Can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I'm setting status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
Comment 8 Bug Janitor Service 2020-11-28 04:33:47 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2020-12-13 04:33:59 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!