[Geany-Users] Removing [new instance] bug #3607948

Lex Trotman elextr at xxxxx
Sat Mar 16 07:30:21 UTC 2013


Hi,

Moved discussion of
https://sourceforge.net/tracker/?func=detail&atid=787791&aid=3607948&group_id=153444
to this thread since discussion is easier on the mailing list than on
the bug tracker.

> Sorry but that's not quite so, at least for me: Second and following
> instances open with the '[new instance]' tag although I open with the plain
> command $ geany

> I do find that the first instance opened does receive $ geany
> somefile.txt... not sure what happens if I close that one and open a third
> or fourth. Nor do I care. That kind of
> open-when-multiple-instances-are-running command is a questionable act in
> any application.

If you do "geany a_file" and "geany b_file" then "b_file" will open in
the window with "a_file", that is the original instance.  The command
"geany a_file" will not exit, but the command "geany b_file" will exit
immediately since the file was opened in the original window, that is
in the original instance.

If you do "geany a_file" and "geany -i b_file" then "b_file" will open
in a new window, that is a new instance and will be labelled by "(new
instance)".  The command "geany -i b_file" will not exit.

If you do "geany a_file" and "geany" then the second geany command
will open a new window, that is a new instance, since thats the only
sensible thing it can do when told no files to open.  It will be
labelled by "(new instance)".

If you close the first instance, the next time you run "geany
some_file" it will open a new window and then "geany else_file" will
open that file in the same window as "some_file".

In other words only one geany with files and without -i will ever run.
 When it is running each invocation without -i will open the files in
the same window.  If that Geany is closed, the next time geany is run
without -i it will take over the role of being the window other files
are opened in.  This is the normal use-case, Geany is not intended to
run multiple times except in special circumstances, such as using it
as a VCS message editor.

> Settings are shared and set by the last closed instance, IIUC. That is a
> global reality that holds at all times, for all instances. The only way I
> can be sure to close the "right" instance of Geany last is if I know in
> which one I made mods to settings I wish to retain. Do you know which? I
> cannot formulate a rule. I tend to open an instance specifically for the
> purpose of modifying Geany settings.

It does not tell you which to close last since it doesn't know which
changes you want to keep.

> Does it help to inform or remind the user of this global, invariant
> behavior by tagging some instances and not others with text unrelated to
> settings? I don't see how.

It merely reminds you to be careful, for most people running multiple
instances is unusual, so the reminder is worthwhile.


> I suppose you could make this work by flashing the titlebar reversed in red
> and replacing the text with SHARED SETTINGS ARE YOU SURE YOU WANT TO CLOSE
> THIS WINDOW LAST. Please don't do that.

As I said above, Geany doesn't know which settings you want to keep,
so doesn't know which instance to show that on.

> Neither situation requires a reminder at all, persistent or not. Geany is a
> complex tool and to get the most out of it with the least astonishment, the
> user must read and understand the manual... and do some experimentation.
> I'm satisfied that the average user who does neither will still be
> productive; nor will he encounter undue astonishment.

The normal Geany use-case is the same as most other editors/ides,
command line requests to open a file are opened in the original
window. Geany is a multi-document compliant GUI application, there is
no need to run multiple copies, and most users do not do so.

> This is a bug, not a feature request; because the message text does not
> reflect anything in reality. All instances are new; that's why they're
> called 'instances'. What may be meant is that 'this' instance is 'newer'
> than another. But that's irrelevant to any other question about the
> instance.

The "(new instance)" message in the title bar reflects that this
instance has been started with the --new-instance option, either
explicitly, or implicitly by not specifying any files to open.

> It might be of interest to tag the titlebar of an instance opened with '-c'
> as 'Unshared settings'. But then, the attempt to do so raises a modal
> dialog and anybody who okays such a thing is probably aware... it's
> deliberate action. And since the new instance does indeed open without
> shared settings, its window's appearance is quite different from any of the
> instances running *with* shared settings.

It might indeed be useful to indicate the source of the configuration
for instances started with -c, but that will use even more screen
real-estate.

By the way, you can give multiple geany commands with the same -c
value and they will behave in the same way towards each other as the
set without -c, and will totally ignore the set run without -c.

> Think like a GUI designer, not like a CLI designer. This is a GUI tool.
> This is not 'vi'.

Then why are you treating it like vi and running multiple copies?  As
I said above its a MD GUI application.  That is how it is meant to be
used.

> Geany already has a great many user-configurable features and I don't
> suppose it would hurt to add one more; which is why I suggested that as a
> second choice. But for those who choose to turn on such a feature -- and it
> surely should NOT ship ON by default -- it should be recast so that it
> actually tells the user something of consequence.

The "(new instance)" message exactly reflects the way Geany was
started, that is what it is meant to do, and all it is meant to do.

Cheers
Lex


More information about the Users mailing list