New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opening a new tab in an existing instance from shell #1512
Comments
It should be opened in an opened window if it exists. I always have only one instance. |
Hm. When I call When I call |
No geany cannot open a new file from the command line, if a filename is
given geany attempts to open it and complains if it doesn't exist since its
most likely a typo. A command line option to specify this is a new file
would be needed, but nobody has written it.
Running Geany on the command line without a filename creates a new instance
as you have observed, this is intended behaviour documented in the manual.
Running Geany from the command line with at least one filename more than
once defaults to opening all files in the first instance as you observed,
this is also intended and documented behaviour. If you want a new instance
use the -i option.
I always warn about running more than one instance of Geany using the same
configuration, there is no sharing of changes and the last one to write its
version of the configuration "wins" at shutdown.
Cheers
Lex
…On 9 June 2017 at 00:14, Anna Frankova ***@***.***> wrote:
Hm. When I call geany from shell (either from a new one or using geany &
repeatedly) it spawns a new instance every time.
When I call geany <filename> it opens the file in the first instance that
was opened. (Thinking of which, that also isn't too good - I'd expect it to
appear in the last one).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1512 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAxgTVimeOtXGlCrdtgNo7Nzvv356iF8ks5sCAHNgaJpZM4N0F8M>
.
|
Here it behaves just like nano or vim and opens a new unsaved file with the given filename. |
@codebrainz weird
|
Ahh, couldn't find geany, ok, now it works :) |
Although technically it opens a new buffer, it doesn't actually create the file until you save the buffer, either in the running instance by default, or in a new instance with the -i option. |
Yeah, that's the usual behaviour, it would be annoying if created the file, for example if you made or a typo or decided you didn't want to save the file, you'd have to go into terminal/file manager and manually delete it. I think this issue could probably be closed as you can do what the title says already. |
You can use the
you get one instance of Geany with two open documents, Here’s a script I use (on Linux) to have one instance of Geany per workspace: https://gist.github.com/vfaronov/6843c6bc817521bfab7e58fff139c525 |
Thanks for the replies, but none of the suggestions are helpful with what I'm trying to do, which is to open a new tab (empty "untitled" file, or a new buffer as @elextr said) in an existing instance (any existing instance, I just don't want to spawn a new one).
And thanks for that, because I tried calling
...no, I can't? Unless you choose to interpret it as "open existing file in a new tab" which, okay, but not what I meant. Oh, well. Is there any official way of submitting a feature request for this? |
You have 😄 |
I don't get it, you can open a new empty file from the command line, and @vfaronov showed how to open that new file in any existing instance instead of just the first one. What more is needed? |
@corvidism is it that you don't want to choose a name for the new file up-front but rather later using the Save As dialog? |
If so, this patch should work, but it doesn't since Geany ignores $ geany -u
# or
$ geany --socket-file=/what/ever -u |
Yes, that's it. |
This adds a new command line option '-e' / '--empty' which opens a new empty document on starting geany. If there is an existing instance, then that instance will be re-used and a new empty document is openend in it. Also see geany#1512.
@corvidism @LarsGit223 has implemented this in #1811, but I'm wondering what is the actual use case for not choosing the filename? It eludes me why one would like to create a new empty document from outside Geany without anything, be it content or even path. |
This adds a new command line option '-u' / '--untitled' which opens a new empty untitled document on starting geany. If there is an existing instance, then that instance will be re-used and a new empty untitled document is openend in it. Also see geany#1512.
Well, to be honest, I abandoned Geany since then, but the use case was this: I wanted to use a keyboard shortcut to open a new file - for notes and such. The problem was, that calling "geany" with no params would spawn a new instance, which was pretty slow (not "loading an IDE" slow, but still too much for regular use).
and so on. So I would have to write an actual script to do something that I still feel is basic functionality. And if I remember correctly, when saving a new file created through the GUI, the Save as... dialog would remember last used location, whereas with an auto filename it would open at the file's location. |
Closing for now, if somebody wants the feature again, there is an implementation in #1811. |
Hi,
is it possible to start creating a new file in an existing instance from shell? I'd like to use a keyboard shortcut to start a new file, but
geany
with no arguments opens a new instance (not useful).If it can't be done, how likely are you to implement it? Ideally, this would be a commandline parameter (something like the opposite of
-i
).The text was updated successfully, but these errors were encountered: