Bug 410614 - Emmet scripts are broken in Kate and KWrite
Summary: Emmet scripts are broken in Kate and KWrite
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.60.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-05 15:43 UTC by animtim
Modified: 2023-04-16 16:29 UTC (History)
4 users (show)

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


Attachments
test file for Emmet script "Expand abbreviation" in Kate (127 bytes, text/html)
2019-08-05 15:43 UTC, animtim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description animtim 2019-08-05 15:43:57 UTC
Created attachment 121945 [details]
test file for Emmet script "Expand abbreviation" in Kate

SUMMARY

It looks like all the Emmet scripts are broken/not working, except the ones to increment/decrement numbers.

STEPS TO REPRODUCE
1. Open the attached file "testEmmetKate"
2. Go on line 7, at the end of the abbreviation, and try to run the menu item Tools->Scrpts->Emmet->Expand abbreviation

OBSERVED RESULT

Nothing happens

EXPECTED RESULT

The abbreviation ul#nav>li.item$*4>a{Item $} should expand to:

    <ul id="nav">
    	<li class="item1"><a href="">Item 1</a></li>
    	<li class="item2"><a href="">Item 2</a></li>
    	<li class="item3"><a href="">Item 3</a></li>
    	<li class="item4"><a href="">Item 4</a></li>
    </ul>

This is exactly the base example from Emmet documentation at https://docs.emmet.io/



SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Mageia 7
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.2

and also:

Linux/KDE Plasma: Manjaro
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.60.0
Qt Version: 5.13.0

ADDITIONAL INFORMATION

I tested all the scripts from the Emmet list, and only those to increment/decrement numbers work as expected.


SIDE NOTE:

Is there any way to use shortcuts to activate those scripts? If yes I couldn't find it, if no that would be very much needed for users who rely on those scripts for productivity.
Comment 1 Christoph Cullmann 2019-08-11 13:21:49 UTC
Hmm, too bad that this did break down :/
Guess the migration to QJSEngine did cause that.
Comment 2 Lothar 2019-09-01 07:42:20 UTC
These Emmet stuff was broken a long time, and then fixed.
https://phabricator.kde.org/R39:120e8400cad69fb21cab3c7b05dca77904c40fbf

Not tested now, sorry.
Comment 3 Dominik Haumann 2019-09-12 15:12:40 UTC
Indeed does not work with KTextEditor 5.62. But we don't get a JavaScript error as well, so currently finding the issue is not trivial. Likely some V4 bug in the Qt JS implementation.
Comment 4 healperci 2019-11-17 21:36:15 UTC
Is not working on:

Fedora 31
Ubuntu 19.10
Ubuntu 18.04

The only thing I found is 

https://cgit.kde.org/ktexteditor.git/commit/src/script/data/CMakeLists.txt?id=f3f4319f5ee15e0447e37ac5e85b3841c9671133

Don't know what to do.

Thanks.
Comment 5 Eric Armbruster 2022-11-06 19:18:16 UTC
I cannot reproduce anymore with Kate 22.08 and Frameworks 5.99. Is this still an issue?
Comment 6 Christoph Cullmann 2023-04-16 16:19:37 UTC
Let's assumed that is fixed.
Comment 7 animtim 2023-04-16 16:29:10 UTC
Yes, just tested in Kate 22.12.3, and I confirm the given example works properly.