<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div class="h5">
<br>
<br></div></div>
Reviving this old thread because the annual discussion naturally came up again this year.<br>
<br></blockquote><div><br class="">It must be the change of season that triggers it, and it wasn't even one of the usual suspects this time :-)</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Your proposal lists issues that are rather orthogonal to separating the session file list, thus I think these should be dealt with later. As a first step I would propose we split out the session file lists to separate files (normal session: in the same folder as geany.conf, for projects in the same folder as $project.geany). This should solve the problem checking project files in as well as enabling to sync geany.conf across machines without affecting opened files.<br>

<br>
If one made such a patch, would it be accepted? It should be relatively trivial, only complicated by backward compat code to read session informations from the old location.<br></blockquote><div><br></div><div>I think we got fairly close to an agreed solution on IRC, but I don't think there was an exact common understanding.  Since the IRC discussion was fairly noisy (communication wise) I have tried to describe my best understanding of the most agreed with solution.<br>
</div><div><br></div><div>Please note this is what I think the majority agreed with, its not necessarily any individuals solution.</div><div><br></div><div>The basic idea is to separate the user session files list into a separate file.  The discussion applied mostly to the projects, since only the OP who triggered the discussion is trying to store user config in a VCS.  For the user config it is expected that simply having a session.conf file containing the session specific data (files list, open project at least) stored in the same directory as geany.conf is a suitable solution. </div>
<div><br></div><div>Since there are lots of project config files, and they can be stored in ~/projects or in the project trees (or anywhere) and because existing projects are single files the solution is more complex.  The majority agreed:</div>
<div><br></div><div>1. instead of being a single file, the project config becomes a directory like the user config</div><div><br></div><div>2. various names were suggested, but no clear winner emerged, suggestions included $project.geany, geany.$project and $project.conf.d.  Objections included $project.geany is the existing name and may be confused or overwritten by an old version of geany and $project.conf.d is ugly.  Making it a define was suggested, which is fine during development, but a permanent solution must be selected prior to merging the change.</div>
<div><br></div><div>3. initially that directory contains the config file (which is the existing project file without the session files list) and the session files list file.  Retaining the $project.geany name for the config file or changing it to geany.conf to match the user config were suggested, no conclusion was reached.  Similarly using $project.session.conf or just session.conf were suggested for the session file.</div>
<div><br></div><div>4. over time more data can be added to the project directory, possibly becoming pretty much the same as the user config directory.</div><div><br></div><div>5. the user is responsible for setting their .gitignore (or equivalent for other VCSes) to ignore the session file.</div>
<div><br></div><div>I say again, this may not be anybodys exact solution, but its what I think was agreed by the majority.  If you think I have misunderstood then shout, but don't complain just because its not your personal solution.   I am posting this because I don't think we all had the same understanding of what we were agreeing.  </div>
<div><br></div><div>Now for the further discussions.</div><div><br></div><div>Assuming the above to be correct I suggest:</div><div><br></div><div>1. Project and user session file formats should match to allow the same code to store both.  The fact that the storing the current project in the project session file is not needed doesn't matter.</div>
<div><br></div><div>2. For user config, keeping the same name for geany.conf is ok since a new geany can simply ignore session info in the geany.conf file if the session.conf is present.  Accidently overwriting geany.conf with an old version won't damage anything but won't update session.conf.</div>
<div><br></div><div>3. For project config the new version should use names that don't match existing project file names since the new config is a directory and an old geany trying to read it would get very confused.  An old geany may also overwrite the directory with a file if its the same name.  Also I see no point in including the project name on the config and session files inside the project config directory, its just more filepath manipulation needed for no gain, use the fixed names project.conf and session.conf.  The project config file should not be geany.conf as it is currently not the same format.</div>
<div><br></div><div>4. Although partly orthogonal to the current discussion, we should find any places in Geany where config is not stored on each change and fix them so the now separate config file does not need to be saved at quit.  So only the session file needs saving on quit and we don't lose config changes when the desktop shuts Geany down abruptly (or the rare crash :-).</div>
<div><br></div><div>Personally I would be willing to accept the above solution despite my misgivings about the need to .gitignore the session file and previous attempts to work around that need.</div><div><br></div><div>Cheers</div>
<div>Lex</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Best regards.<div class=""><div class="h5"><br>
______________________________<u></u>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.geany.org" target="_blank">Devel@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel" target="_blank">https://lists.geany.org/cgi-<u></u>bin/mailman/listinfo/devel</a><br>
</div></div></blockquote></div><br></div></div>