This option will be used with one or more filenames to open and it should cover 
3 aspects:

1. When there is no running geany instance, start the new one in background. 
"Background" means 2 things: don't block the shell and don't steal window focus.

1. When there is already a geany instance running, but I'm currently working in 
another window (or even on another virtual desktop), geany should add the new 
files to it's running instance, but don't steal window focus.

1. When I'm currently working in geany, it should  add the new files, but keep 
the current tab the active one.

**What is it good for ?**

I'm often using long-running scripts. They create log files and at some 
specific points of execution, they also create intermediate reports, lists, and 
other files. All of these files are opened in geany for _later_ review or 
(sometimes) editing. So, geany collects all these files and when I have some 
time, I can check for the current state. But when I'm working on something else 
(even when working in geany), I don't want to be interrupted.
When the script finishes, it will call geany without the --background option 
and the final report as filename, then geany will pop up to notify me about the 
end f the script.

Aspect 1) is a bit special. Currently, I need to make sure that geany is 
already running before I start the script, otherwise the script will block as 
soon as geany is called the first time.
Yes, I could use ps to check if geany is running and if not, call
`geany filename &`
but on the other hand, geany already has some code for detecting a running 
instance and why not use it for another purpose ?
And: using just the & will not cover the focus thing.

BTW: sending the reports per mail is not an optoin, because I want to keep the 
files in the end. Having them via mail would require additional steps (save 
them, open them for editing).

Thanx

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/907

Reply via email to