[Geany-devel] Proposed patch to fix issues with command line file loading

weltall weltall2 at xxxxx
Fri Jan 28 19:01:03 UTC 2011

Il giorno ven, 28/01/2011 alle 20.16 +0200, Dimitar Zhekov ha scritto:
> On Fri, 28 Jan 2011 03:01:06 +0100
> Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> > >> 2) 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?
> 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.
> > 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.
> > 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.
> BTW, I checked my Visual Studio 2008 today - it too works as Geany /
> SciTE / Ultra 7.
> > I haven't tested the patch yet, but the raised problem is a real concern
> > IMHO. Well, it concerns me :)
> Breaks geany -i filename.

no it doesn't break -i if you check the updated patch. I didn't even
know there was such a function like -i when I’ve tried the first one
(which is a great way to destroy your opened file session if you aren't
cautious to close the additional instances before the first one with the
full session).
Visual studio doesn't store the previous session, at least not by
default, it just shows a welcome pane asking what project to open. I
don't have ultraedit 7 and scite. The fact other editors, anyway, have
such a behaviour doesn't  make it consistent. 
In any case, the updated patch has an option which gives the same exact
behaviour of before if not enabled (could set it false as default, I've
set it true) and allows those who see it as annoying and inconsistent
(which seems to not be only me from the other posts) to maintain their
session, at the same time it fixes the cited bug.

More information about the Devel mailing list