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

Vladi Belperchinov-Shabanski cade at xxxxx
Thu Aug 2 17:26:20 UTC 2012


hi,

On Mon Jul 30 16:12:29 UTC 2012, Colomban Wendling wrote

> Le 28/07/2012 17:16, Vladi Belperchinov-Shabanski a ?crit :
>
> > 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.

Actually I'm no trying to move settings/config to several files but to
separate history/status data. You would agree that open files list and 
geometry are local to the current machine (work locations, monitor 
sizes, etc.)?

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

Well, I'm not sure about this :/ also not sure how this would affect "projects"
since I do not use them yet. Comments from more developers are welcome :) thanks!

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

yes, point taken, sorry :/ :)

>  * as said above, you need to add backward compatibility code, to load
> the prefs to the old file as a fallback.
>

I'd prefer not to add such code unless it goes away in few (1-2) revisions in the future. 
If not backward compatible, the only problem will be lost geometry (i.e. using default) 
and no open files. And this will be only one time problem :)

>
> Best regards,
> Colomban

----------------------------------

> On Mon Jul 30 17:10:24 UTC 2012, Dimitar Zhekov wrote:
>
> On Sat, 28 Jul 2012 18:16:03 +0300
> Vladi Belperchinov-Shabanski <cade at bis.bg> wrote:
>
> > 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. [...]
>
> If you are using Geany under *nix, with a GUI that supports sessions
> (kde, xfce, maybe gnome), you can do the following:

I use only IceWM and I'd prefer not to add another dependancy (unless it
also depends on x11 sm, not aware, sorry.)

>
> 1. Patch geany for x11 session management - see the patch tracker.
>
> 2. Don't Quit it, but logout (shutdown, restart) instead. The sm will
> save your configuration in a separate .conf file.
>
> 3. Using Quit, or Edit -> Preferences -> OK / Apply, will save your
> current settings in geany.conf - including the "local" ones.
>
> Hope this can be somewhat useful to you.

Have to check :) thanks.

> ...
> --
> E-gards: Jimmy
>
>

P! Vladi.
-- 
Vladi Belperchinov-Shabanski  
Engineering Lead, ePay.bg Ltd.
ePay.bg      <cade at epay.bg>     http://epay.bg   
DataMax SA   <cade at datamax.bg>  http://datamax.bg
pgp/gpg key  6F35B214           http://pgp.mit.edu
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20120802/719e60f5/attachment.pgp>


More information about the Devel mailing list