[Geany-Devel] Lua script vs the plugin wishlist

Lex Trotman elextr at xxxxx
Sat Jun 8 05:42:47 UTC 2013


Hi ya,


On 8 June 2013 14:54, Thrawn <shell_layer-geany at yahoo.com.au> wrote:

> Hi, folks. Thanks for your feedback.
>
> I'm only a novice with C, but I'll take a look sometime at the GeanyLua
> source and see whether I think I could fix something broken. Will let the
> list know what I decide.
>
> @Steven: Interesting to hear about your External Tools project, because
> several of my Lua scripts are basically to give easy integration with
> external tools. What are its specific advantages compared to GeanyLua and
> GeanyPy?
>

Putting words in Steven's mouth, but I would say a major advantage is it
doesn't need Lua or Python.


>
> > I think that[1] wishlist is pretty out of date, FWIW. Maybe
> > we should start one on the main wiki[2] again?
>
> Yeah, it is out of date, but still, these are things that someone wanted
> at some point. Seems to me like a good starting point. Feel free to update
> it, though. I believe a bunch of the items already exist in Geany core or a
> plugin, so they could be cleaned up.
>
> > > Advanced interaction with Geany's chrome is out,
> >
> > Assuming chrome means the GUI, I think there's Lua bindings
> > for GTK+ and from what I've read, it's pretty
> > straightforward binding C structures in Lua. If you can get
> > a hold of the GeanyMainWidgets structure and/or the
> > ui_lookup_object function from Lua, you should be golden.
>
> Sadly, I can't see anything in the GeanyLua API that would give me either
> of those :/ Maybe that's something I can look for in the GeanyLua code.
>

You will have to add those to the lua interface, they are available in the
geany plugin interface so it shouldn't be too hard.  Just a little C
programming.  And documenting!!!!


>
> > Oliver has GeanyPy packages on his PPA[3] for Ubuntu,
> > presumably the .debs would work for other Debian-based
> > distros as well.
>
> Good to know. I might give that another look at some point.
>
> I do still like the simplicity of the GeanyLua API, but of course, the
> complexity of the GeanyPy API is the price of the power.
>

Well the Geanypy interface tries to wrap the whole Geany plugin interface,
Geany lua has its own very restricted interface, simple, but limited.



>
> > For the build process, I'm pretty sure it
> > shouldn't require 100MB of dependencies to compile (unless
> > you've never installed any build tools yet, like compiler,
> > autotools, etc).
>
> OK, tried 'sudo apt-get install python python-dev python-gtk2
> python-gtk2-dev' on another machine, and this time it wanted to download
> 57MB, or 41MB without installing recommendations. Better, but still quite a
> bit, when you consider the size of the main Geany package. And then you
> still need to download the actual plugin source, compile and install it,
> and you won't be able to manage it via your package manager.
>

Well, if you have to install all of Python, yeah, but then many (most)
systems include it now anyway.  And the -dev packages are only needed to
compile geanypy, using the packages noted above shouldn't need them.


> I work as a programmer, so none of that is a big deal for me. But it's
> enough for me to prefer GeanyLua for jobs that it can handle. And there are
> enough of those to keep me busy for a while.
>

But still with no maintainer you are running the risk of the plugin being
removed and all your work being useless.  Especially if you are going to
add to Geanylua itself (eg GUI access), find a maintainer, or become it
yourself.  (you may need to do that anyway to add stuff, with no maintainer
there is no committer, unless you impose on someone else)



>
> > Anyway, cool that you gave GeanyPy a look, sad that it got
> > overlooked for another alternative :) It's a weird
> > situation, no uses it because no uses it[4] :)
>
> Well, if it were available from the default repositories, I'd probably use
> it. Does it actually have to be part of geany-plugins for that?
>

> You could try porting some of my scripts to GeanyPy if you want. They're
> GPL and all quite short. Have you tried them out?
>
> > [4] Lex, before you say "because it's not in Geany-Plugins",
> > patches welcome on integrating GeanyPy's complex build
> > systems into both of Geany-Plugin's even more complex build
> > systems, oh and (non-trivial) upgrading to GTK3 and
> > Gobject-Introspection-based PyGTK for GTK3 :)
>
> :s No wonder GeanyLua is in peril. Sounds like you have a hard road ahead
> for GeanyPy, but I do sincerely wish it well, and will keep my eye on news
> of it.
>

Methinks he exagerateth for effect ;)

Geanypy could be made part of geany-plugins, there are some issues to
solve, but it works well enough for many uses that they don't need to be
solved first.  But Matthew is a perfectionist.

I'm sure help would be given on the build system issues if geanypy was to
be included in g-p (but don't look at me, I'm autotools ignorant :).


>
> And I have taken note of the fact that GeanyPy crumbles yet another of the
> few advantages of Gedit, the ability to integrate a Python console.
>
> Will email the list again soon. I'm working on a Lua script to give Vim
> keybindings. It's actually quite simple! There are a lot of keys to do,
> that's all.


How do you handle modality?

Cheers
Lex



>
> Thrawn
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20130608/beed081a/attachment-0001.html>


More information about the Devel mailing list