[...]<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
><br>
> Are all settings saved on apply? not just the prefs/project prefs ones?<br>
<br>
</div>I doubt we make a difference when saving the config file -- since as you<br>
said yourself saving only a part of a keyfile isn't that easy --, but I<br>
don't know for sure.<br></blockquote><div><br></div><div>I didn't mean that only part of the file was changed, I meant that the configuration save is triggered by *all* the dialogs and menu items that can change settings, for eg unless I missed it, the set build commands dialog doesn't trigger a configuration save after an ok (though it does save filetypes).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
>  I thought there were some that still didn't for one reason or another,<br>
> maybe that should be changed as a separate thing anyway, in which case<br>
> you are right, the "rush" only applies to session data.<br>
><br></div></blockquote><div><br></div><div>Every UI or programatic change to a setting needs to be checked that the configuration/project is saved, unless you have already done that?</div><div><br></div><div>I agree that we should do that but its another discussion, although it does affect this one.</div>
<div><br></div><div><br></div><div>[...]</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> If the save happens its unlikely to be a problem so long as<br>
> its on a local disk which isn't full.  If the project file is on a<br>
> network share or worse still, on a ftpfs/sshfs/httpfs file system then<br>
> lots can "go wrong" and the chances are increased by periodic saving<br>
<br>
</div>Oh dear, configuration on an unsafe remote.  OK, that's an argument why<br>
saving config periodically might not be that safe -- although normally a<br>
network failures would result in *not* saving the file, not corrupting<br>
it (given that we use an atomic write like g_file_set_contents()).<br></blockquote><div><br></div><div>For project files in the tree it is reasonable that they may be on the remote, and well, on those funny file systems, g_file_set_contents() doesn't work :(</div>
<div><br></div><div>My cunning? implementation puts the session file in the user config directory, which *hopefully* is local, or at least on a fast reliable nfs/samba share.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><br>
> (not to mention potential performance issues).<br>
<br>
</div>Well, performance issue is inherent to periodic saving, it being session<br>
only or whole config doesn't change anything.<br></blockquote><div><br></div><div>But only the session needs to be periodically saved, and that should be local in my split implementation.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">[...]</div><div class="im">
>     > For project sessions just using another file in the same place as the<br>
>     > project file is more of a problem since project files can be in the<br>
>     > project tree and some people like to save them in VCS.  So users would<br>
>     > have to make sure that their git.ignore (or whatever the other VCSes<br>
>     > use) is edited each time so that the session file isn't saved in the<br>
>     > VCS.<br>
><br>
>     I agree with Dimitar, if somebody is able to add a file to a VCS she<br>
>     must be able *not* to add that file.  Is there *any* VCS around that<br>
>     adds files without asking before, unless explicitly told so?  Nobody<br>
>     sane will do `git add .` or `svn add .` for committing changes.<br>
><br>
><br>
> Well, git add is part of the normal workflow, editing .gitignore isn't.<br>
<br>
</div>Yeah, but you *choose* what you add, you don't add the whole project<br>
directory but maybe on the first import.<br>
<div><div class="h5"><br>
>  But I guess if the project file is being stored in VCS then you would<br>
> expect .gitignore (or whatever svn etc use) to be edited already to<br>
> exclude .session and .gitignore to be stored in the VCS as well.<br>
><br></div></div></blockquote><div><br></div><div>What I mean here is that I agree that putting a session file in the same directory as the project file isn't a big issue.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
><br>
>[...]<br>
>     PLEASE, no.  This is IMO the easiest solution to make the fix worst than<br>
>     the issue.  Not removing files would leave more and more useless files<br>
>     (not an option), and cleaning is almost impossible to do well -- your<br>
>     proposition might remove actually used sessions as easily as having ><br>
>     MAX_SESSION projects (not an option either).<br>
><br>
><br>
> Heh, heh, I was going to just say, sort by access time and delete the<br>
> oldest one before creating a new one, but then I remembered that all my<br>
> disks are mounted noatime :)<br>
<br>
</div></div>Even if access time was reliable you'll never know how many project<br>
files one has, and you can't rely on the user changing some weird magic<br>
value for them not to loose session data.<br></blockquote><div><br></div><div>I wasn't being so complex as you seem to think, I was just saying keep the last N project related sessions, like the recent files list, we could even use the recent projects list and only keep sessions for those?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
>     > This proposal isn't about a proper session management capability,<br>
>     > there isn't one that works on enough platforms to be worth including.<br>
>     ><br>
>     > Any thoughts welcome.<br>
><br>
>     Reading my mail above, I see it might sound like I think $subject is<br>
>     just a bad idea.  No, I think it would be a quite good thing, and for<br>
>     weird people adding project files to their VCS [1] would be most<br>
>     welcome.  I also think that separating session and settings will<br>
>     probably help to someday improve the settings sharing between instances.<br>
><br>
>     The only problem is that I don't see immediate and tremendous gain, and<br>
>     that I don't like the proposed solution -- not that I have a better one.<br>
><br>
><br>
> Damn! The point of starting the thread was to see what other<br>
> implementations there are :)  If I thought it was a perfect solution I'd<br>
> have made a PR by now :)<br>
<br>
</div>No no, what I asked was "why is $subject useful?", because I thought<br>
(and somewhat still think) that the arguments weren't for $subject but<br>
for "periodic save" ;)<br></blockquote><div><br></div><div>Heh, yeah the two issues are a bit mixed, </div><div><br></div><div>1. as I said to Dimitar, the main reason for the proposal is to put projects in VCS without the noise from session data while still allowing users project sessions.</div>
<div>2. any possible improvements to the reliability of session saving via periodic save or even save on file open/close are a secondary (but still useful) by product.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><br>
>      On the first point, I'd be happy to be proven wrong though, maybe I<br>
>     just don't see the light.<br>
><br>
>     Regards,<br>
>     Colomban<br>
><br>
><br>
>     [1]  Yes, I don't really see the point.  OK, the settings we have in<br>
>     project files might be useful for the project.  Indentation type & with,<br>
>     and EOL style.  First two are saved in each file by well known editors<br>
>     (vim, emacs).  Generally when people put project files in their VCS it's<br>
>     because those project files are used as build system too.<br>
><br>
><br>
> Yes ATM the main use-case is build system settings,<br>
<br>
</div>Hum, what I meant that our project files *are no* a build system, so the<br>
current use case I see is only indentation settings and maybe line<br>
ending settings.<br></blockquote><div><br></div><div>I don't understand what you are saying here, the project files *do* store build commands, if your project uses different tools, eg scons not make, then that is stored in the project file and gets restored in Geany whenever you open the project file.  This is *very* useful and is the original reason I extended the Geany "build system" back in 0.19.  And having that information in a project file in VCS distributed with the project source is then *very* useful as well, but ATM you have to turn off project sessions to avoid lots of noise commits, and so we are back to the original reason for the thread :)</div>
<div><br></div><div>Cheers</div><div>Lex</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Cheers,<br>
Colomban<br>
<div class="HOEnZb"><div class="h5"><br>
> but that could also change if it was easier to share project files.<br>
><br>
> Cheers<br>
> Lex<br>
_______________________________________________<br>
Geany-devel mailing list<br>
<a href="mailto:Geany-devel@uvena.de">Geany-devel@uvena.de</a><br>
<a href="https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel" target="_blank">https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel</a><br>
</div></div></blockquote></div><br>