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

Guenther Brunthaler gb_about_gnu at xxxxx
Thu Jul 29 01:32:31 UTC 2010

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...


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: geany-cleanup-mrulists
URL: <http://lists.geany.org/pipermail/devel/attachments/20100729/77df4671/attachment.ksh>

More information about the Devel mailing list