[Geany-devel] patch: separated session/local config

Colomban Wendling lists.ban at xxxxx
Mon Jul 30 16:12:29 UTC 2012


Le 28/07/2012 17:16, Vladi Belperchinov-Shabanski a écrit :
> hello,

Hi!

> this is my first post so I'd like to thank all programmers
> working on geany. it is so close to perfect :) thanks!

Welcome here then, and thanks a lot :)

> I keep my ~/.config/geany dir under git so I can
> distribute my environment prefs on all machines 
> I use. unfortunately there are some config entries
> which always collide since they are "local" to the 
> current machine. those are:
> 
> [geany]
> geometry
> 
> [files]
> all-of-them-...
> 
> I modified keyfile.c to keep all those in separated
> (session/local) file so it can be excluded from git.

I understand your concern, but do splitting this into two files have any
other benefit than making it simpler to keep it in Git?  Moreover, one
could imagine to commit to git only the relevant parts of the file (git
add -p & friends).  OK, it's a bit tedious but shouldn't be required
that often, is it?

My concern is that this adds a new config file, and particularly *moves*
some settings around.  This leads to the need to maintain compatibility
code to load from one file or the other, which is always boring an ugly.

So, I'm not sure such a change is really wanted if it only addresses
configuration spreading, that could even arguably be done with a fresh
config file/by stripping uninteresting parts.

However, maybe splitting "session" things out might help towards a
better support for saving multiple instance configurations, and if we
see that such changes would help on that subject too, the noise might be
worth.  Dimitar, Eugene, Nick, Matthew, Lex..., thoughts?

> diff/patch is against 
> commit 1ce4b1fac516f89dadb639cb773c76b68cfa286b
> 
> I'd like to ask for a review of the patch?

Apart what I said above, the patch looks very clean but:

 * we use tabs for indent (width set to 4), not 2 spaces
 * as said above, you need to add backward compatibility code, to load
the prefs to the old file as a fallback.


Best regards,
Colomban



More information about the Devel mailing list