AW: Indent script for Katepart5?

Pierre de Villemereuil pierre.de.villemereuil at mailoo.org
Sun Dec 10 23:20:43 UTC 2017


Hi all,

Sorry, but I'd really like to have this sorted, as RKWard seems to be transitioning to KF5 now. Any idea why putting the code in "~/.local/share/katepart5/script/indentation" is not working? 

Could someone test R-KF5.js here:
https://github.com/devillemereuil/rindent
and let me know whether this is working or not for them? (in case the issue is an openSUSE related one)

Thank you very much for any help you could provide!

Cheers,
Pierre

On Wednesday, 15 November 2017 07:39:28 NZDT dhaumann at gmail.com wrote:
> Ah sorry, I messed this up.
> 
> Which version of KTextEditor Framework are you using exactly? It could be, that we changed something over the years in the header or so.
> 
> Best regards 
> Dominik
> 
>   Originalnachricht  
> Von: Pierre de Villemereuil
> Gesendet: Mittwoch, 15. November 2017 00:21
> An: Dominik Haumann
> Betreff: Re: Indent script for Katepart5?
> 
> (For reasons unknown, the mailing list consider that I did not subscribed to it while I did... So while my response is still waiting for moderation, I'm sending it to you personally.)
> 
> Hi,
> 
> Thanks for your help. 
> 
> I think your comforting me that something is not right here actually. The script I sent is an indentation script (yours is a more general "commands" script) and thus should go into an "indentation" folder (like the page you linked is stating). So according to what you're saying the path should be:
> /home/login/.local/share/katepart5/script/indendation/bla.js
> 
> Yet, as I said in my previous e-mail, this doesn't work...
> 
> The header of my script (see R-KF5.js in the Github repo) is right as far as I can see and according to the current documentation.
> 
> I still fail to see why the script is not loading by Kate...
> 
> Cheers,
> Pierre
> 
> On Monday, 13 November 2017 21:44:40 NZDT Dominik Haumann wrote:
> > Hi Pierre,
> > 
> > just tested, my location was:
> > /home/dh/.local/share/katepart5/script/commands/bla.js
> > 
> > bla.js contains the following:
> > //-----------------
> > katescript = {
> > "author": "Example Name <example.name at some.address.org>",
> > "license": "LGPLv2+",
> > "revision": 1,
> > "kate-version": "5.1",
> > "functions": ["bla"],
> > "actions": [
> > { "function": "bla",
> > "name": "Insert bla",
> > "category": "Editing",
> > "interactive": "false"
> > }
> > ]
> > }; // kate-script-header, must be at the start of the file without comments
> > 
> > require("range.js");
> > 
> > function bla()
> > {
> > document.insertText(0, 0, "bla");
> > }
> > //-----------------
> > 
> > I think you are missing the functions in your examples.
> > Please refer to
> > https://docs.kde.org/trunk5/en/applications/katepart/dev-scripting.html
> > for further details.
> > 
> > Does that already help?
> > 
> > Best regards,
> > Dominik
> > 
> > 
> > On Mon, Nov 13, 2017 at 9:46 AM, Pierre de Villemereuil
> > <pierre.de.villemereuil at mailoo.org> wrote:
> > > Dear all,
> > >
> > > I've been working on an indentation script for R (with esp. RKward in mind). It's working great on Katepart4/RKward (last release still depends on the KDE 4 stack), but I can't manage to test a KF5 version on Kate.
> > >
> > > I have prepared a KF5 script using the new header (var katescript = { ... }) and placed it in:
> > > - /usr/share/katepart5/script/indentation/
> > > - ~/.local/share/katepart5/script/indentation
> > > - ~/.local/share/katepart/script/indentation
> > >
> > > In none of the above case I obtain the R option in the indentation menu in Kate (I restarted Kate each time). What is the correct path to place the indentation script for Katepart5?
> > >
> > > The script is here:
> > > https://github.com/devillemereuil/rindent
> > >
> > > Any help is welcome.
> > >
> > > Thanks,
> > > Pierre.
> > 
> 



More information about the KWrite-Devel mailing list