[Geany-devel] "Use project-based session files" check button

Eugene Arshinov earshinov at xxxxx
Tue Feb 23 19:21:23 UTC 2010


On Tue, 23 Feb 2010 01:17:05 +0300%
Eugene Arshinov <earshinov at gmail.com> wrote:

> 
> SM branch seems to be complete.

That was a premature conclusion. While testing SM today, I discovered a
serious issue that needs discussion. I'll post a separate message for that.

>
> Everybody is welcome for testing,
> especially with "Preferences -> General -> Misc -> Use
> project-based session files" check button unchecked; I don't know what
> it does and whether it can really infect project-related behaviour I
> changed.
>

I had some time to test this check button tomorrow. Now I understand
how it works, and there is only one issue that prevents enhancing SM
so it works properly regardless of the button.

The issue is that files from the default session are always opened when
Geany is run with --new-instance option and a project. Suppose the
default session contains "1.txt". Then

  "geany -i --project a.geany"              opens  1.txt;
  "geany -i --project a.geany 2.txt 3.txt"  opens  1.txt, 2.txt, 3.txt;

while

  "geany -i"              opens  nothing
  "geany -i 2.txt 3.txt"  opens  2.txt, 3.txt

You see, it is even inconsistent and meaningless, which itself is a
sufficient reason to fix this.

How it prevents enhancing SM? Suppose you have a "geany" with 1.txt
opened and "geany -i" with a.geany project and 2.txt and 3.txt files.
There is no way to prevent 1.txt from being opened in "geany -i
--project=a.geany -- 2.txt 3.txt" after restart, as the default session
is always loaded.

The solution is straightforward: do not open the default session when
--new-instance is specified, whether a project is being opened or not.

I'm going to commit the fix and SM enhancement quite soon.

Best regards,
Eugene.



More information about the Devel mailing list