Le 28/01/2011 19:16, Dimitar Zhekov a écrit :
On Fri, 28 Jan 2011 03:01:06 +0100 Colomban Wendling lists.ban@herbesfolles.org wrote:
- trying to open a file (eg from double clicking in nautilus) will
screw your session as command line loading of single files ignores your session opened files, except if geany was already opened.
SciTE will do the same, and so will UltraEdit (the very old versions I used). If you want a permanent session, create a project.
I don't think so. First, it is an inconsistent behavior: ATM, opening a file with e.g. `geany myfile` will NOT result on the same state depending on whether Geany is already opened or not. If Geany is already running, the file will be appended to the session, but if Geany wasn't running, the session not only don't load, but will be lost (since a new one is saved on quit).
For me that's pretty consistent: when I click a file, Geany will open that exact file only, be it in existing instance, if any, or in a new instance. Why should it reload some temporarily edited/viewed files, when I explicitly specified which file I want open?
I don't see why the session would be reloaded when not specifying any file then: "you have not opened any file, no file are open" seems to also make sense. Which (I guess) is the behavior when session is off.
However, loading the previous files when a file is clicked if "Load files from the last session" is true, which this patch tries to achieve, would also be logical.
So we quite agree that restoring the session anyway would be OK?
I personally use projects for the projects I work on a lot, and for which I want almost all its files opened, and the default session for everything else. Say, a standalone file to edit, a file part of a source tree I don't work on enough to have a project file for it, etc. This does NOT mean that my session is something I don't care to loose.
You can a project and name it "Default Session". Or even several of those.
Yes, but then I need to explicitly open it, regardless the fact that the session does the job perfectly well until you forget to launch Geany before sending it files to open.
And anyway, why use the session if you don't care about the opened files?
Why not use a "Default Session" if you care for them? You can even modify your .lnk file, panel command or menu entry to run "geany ~/path/Default.geany", except that not all DE-s allow menu editing.
I generally don't use my DE to launch Geany, but rather a CLI, so it needs typing more. And using an alias to open a project by default is not possible ATM since Geany doesn't open files specified on CL after a project file. However, I'm not sure it is really needed to b able to add file to a project when opening it.
And using a project for the session -- which (I repeat myself) would just be perfect for me if it would always be loaded -- seems hackish to me. I feel it as a workaround, not as the Right Way To Achieve this.
However, you didn't answered to my question :)
BTW, I checked my Visual Studio 2008 today - it too works as Geany / SciTE / Ultra 7.
...OK the behavior of other editors are a good start to see whether a particular behavior would be "unexpected". But it doesn't mean IMHO that we should follow that behavior, maybe there is a better alternative -- or at least that better fits <insert your name>'s expectations.
I haven't tested the patch yet, but the raised problem is a real concern IMHO. Well, it concerns me :)
Breaks geany -i filename.
Sad :/
Regards, Colomban