[Geany-devel] Lua Script: Removing stale MRU entries form Geany's config file

Lex Trotman elextr at xxxxx
Thu Jul 29 02:36:25 UTC 2010

On 29 July 2010 11:32, Guenther Brunthaler <gb_about_gnu at gmx.net> wrote:
> Hi all,
> First of all a big "thank you" to all you guys for developing Geany!
> I use it for most of my source code editing nowadays, and was really
> glad to find it after trying out (and rejecting) fat monsters like
> kdevelop, kate or even Eclipse *horrors*.
> Geany provides just the right amount of project integration for my
> needs; that is to run "make" (cmake, automake). :-)
> There are of course a few things which could be improved, but as a whole
> it's a very fine little IDE. Thank you!
> That said, I'm not a GUI-type of guy but more down to the command line,
> so I would certainly not qualify as a Geany (that is: GTK+) developer.
> On the other hand, I would still like to contribute somehow to the
> project; at least a little bit.
> And as I write a lot of scripts for various tasks (who doesn't), I
> thought it might be a good idea to post some of them (which are
> Geany-related) to this list.
> Perhaps someone here also finds them useful!
> On the other hand I do not want to flood this list with unwanted
> contribitions. But I could not find a better place where to send them,
> so I'll give it a try.
> This is my first one - it does a very simple thing: It scans Geany's
> configuration file and removes all MRU entries which refer to files
> which don't exist any more.
> I presume Geany should not run while this script is executed, or it
> might write back the old MRU entries when it exits.
> The reason for writing this script was that I frequently edit projects
> which are then moved around in the directory tree. This creates "dead"
> entries with the same basename as the new entries in the MRU lists,
> because the old locations are still listed there. This can quickly get
> confusing if there are like 3 entries for a single project, but only one
> of them functional. This little script gets rid of the dead ones.
> I have to apologize that the script is written in Lua rather than just a
> shell script, but I'm just learning how to master this language and
> therefore write as much as I can in it. ;-)
> Anyway, Lua is one of the script language implementations with the
> lowest disk space footprint; my total installation size here is only 1.6
> megs! Compare this to Perl oder Python...
> Greetings,
> Guenther
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Hi Geunther,

I presume you've found the Geany Lua plugin then :-)

The problem with scripts is that they are not portable (Geany runs on
*x and *dows) or they create a dependency, in your case on Lua.

Since Geany itself is trying to avoid all such dependencies for end
users, useful scripts like this (I too have been confused by "dead"
entries in the MRU list) are unlikely to be included in Geany itself,
but could probably be put on the extras section of Geany web site for
people who are willing to install Lua.

Thats up to the main developers who maintain the web site.


More information about the Devel mailing list