Indentation script for R
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Wed Dec 13 06:32:11 UTC 2017
Hi Pierre, hi kate-folks,
I'm crossposting this to kwrite-devel, as I'm a bit overquizzed at the
moment, and besides. Short summary:
Pierre has written an indentation file for "R Script"
https://github.com/devillemereuil/rindent . He originally
developped it for KDE 4, and thought about contributing it for inclusion
in RKWard, but I said KF5 and ktexteditor will be the more appropriate
place.
Before opening a review request, he'd like to make sure everything
works as expected, but now we are confused about how to install the
indentation script properly, and whether it depends on any other
external files.
I just tried, on my machine, and simply copying the script
to /usr/share/katepart5/script/indentation does not appear to be enough
(does not show up in the menu). So what is the proper procedure to
install a new indentation script?
Read on below for more context, if needed.
Thanks!
Thomas
On Mon, 11 Dec 2017 21:46:00 +1300
Pierre de Villemereuil <pierre.de.villemereuil at mailoo.org> wrote:
> > The file is packaged with RKWard, but also with KatePart. Or, more
> > precisely, the syntax highlighting has been split out into a
> > separate module, around a year(?) ago. You can find the r.xml-file,
> > here:
> > https://cgit.kde.org/syntax-highlighting.git/tree/data/syntax . It
> > also does not get installed _as that file_ any more, but rather
> > what gets installed is a pre-compiled collection of all the syntax
> > highlighting definitions in that directory.
> >
> > So that should not be a problem. Or did you actually test and find
> > "R Script" missing in kate?
>
> Interesting... Maybe I was mislead in my conclusion then. I'll tell
> you what happened, you let me know if it makes sense to you then.
>
> I've been struggling for a while to make the script work with Kate5.
> I prepared a new indenting script with the new header according to
> the KF5 guidelines here:
> https://docs.kde.org/trunk5/en/applications/katepart/dev-scripting.html
>
> I placed the script in the correct folder for it to be loaded by
> Kate5, which is: /usr/share/katepart5/script/indentation
> but I never managed to get it working (as is, it never appeared in
> Kate among the "indentation" options).
>
> A few days ago, the R project in openSUSE's OBS switched to the
> KF5-based (development) version of RKWard because the kdelibs4 were
> ditched out of Tumbleweed. I thus made the update and realised that
> now, I was able to see "R" as an option in Kate (and in RKWard as
> well).
>
> I thus looked into the RKWard package and realised it was installing
> the r.xml file and thus concluded this was missing in my install for
> Kate to load the indent script.
>
> So, indeed, the "R script" mode is available without RKWard (as part
> of the pre-compiled collection you're mentioning), so what do you
> expect could have made the script suddenly working with the RKWard
> update?
>
> > I continue to be open for including this in RKWard, but submitting
> > to ktexteditor is still the best option, IMO. (This is the place
> > where it would go to:
> > https://cgit.kde.org/ktexteditor.git/tree/src/script/data/indentation)
>
> I am also open to including this in ktexteditor, I just want to make
> sure I understand what is going on, or at least that "it works".
> Maybe this is just a bug due to pre-compiled/script file versions of
> the same thing and including the indentation script directly in the
> source will be OK anyway. I don't know.
>
> Cheers,
> Pierre.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20171213/216cbfbb/attachment.sig>
More information about the KWrite-Devel
mailing list