Hi,
While reading the thread regarding "grouping text files in project", I was curios if anyone has a solution to a problem that I am hitting every now and then;
I have some projects (with lots of files) that are either located on a network share, or in an encrypted vault (KDE) (or a combination of those).
Too often, I forget to open the vault, or sometimes I don't have access to the network share - If I then open a project in Geany, it removes all the files that are inaccessible during project load, from the project. I then have to find them, and open them again, once they are available.
Note: the main "problem" for me, is that Geany saves the new file list on exit, or perhaps also earlier. So quitting Geany, opening the vault will not help, the file list is already "corrupt".
Is there a smart way of dealing with this, that I have missded? :)
Geany is without a doubt, one of the best text editors out there!
Cheers, Micael
On Wed, 6 Jul 2022 at 16:56, Micael m8847@abc.se wrote:
Hi,
While reading the thread regarding "grouping text files in project", I was curios if anyone has a solution to a problem that I am hitting every now and then;
I have some projects (with lots of files) that are either located on a network share, or in an encrypted vault (KDE) (or a combination of those).
Too often, I forget to open the vault, or sometimes I don't have access to the network share - If I then open a project in Geany, it removes all the files that are inaccessible during project load, from the project. I then have to find them, and open them again, once they are available.
Note: the main "problem" for me, is that Geany saves the new file list on exit, or perhaps also earlier. So quitting Geany, opening the vault will not help, the file list is already "corrupt".
The files saved in Geany project files are simply intended to be a list of files open in the current session, its not like "projects" in full fat IDEs where files have to be "added" to the project and will be remembered even if not open. Since its only the session, if a file won't open (due to locked crypts or network fails or whatever) it is no longer in the session and its name is not saved.
So unfortunately there is no simple solution.
In theory it could be possible to script backing up the project and/or user session files before starting Geany just in case, but thats an exercise left to the reader ;-)
Cheers Lex
Is there a smart way of dealing with this, that I have missded? :)
Geany is without a doubt, one of the best text editors out there!
Cheers, Micael _______________________________________________ Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
On 2022-07-06 10:21, Lex Trotman wrote:
The files saved in Geany project files are simply intended to be a list of files open in the current session, its not like "projects" in full fat IDEs where files have to be "added" to the project and will be remembered even if not open. Since its only the session, if a file won't open (due to locked crypts or network fails or whatever) it is no longer in the session and its name is not saved.
So unfortunately there is no simple solution.
OK, yes I fully understand the reason behind it, I was hoping there was some hidden setting somewhere ("Don't remove inaccessible files from project files").
In theory it could be possible to script backing up the project and/or user session files before starting Geany just in case, but thats an exercise left to the reader ;-)
Yes, I have thought about that, but then there' always the risk that the script is also overwriting a good project file with a bad one.
But thanks for confirming. :)
- Micael
Hey there,
Micael wrote:
Too often, I forget to open the vault, or sometimes I don't have access to the network share - If I then open a project in Geany, it removes all the files that are inaccessible during project load, from the project. I then have to find them, and open them again, once they are available.
Note: the main "problem" for me, is that Geany saves the new file list on exit, or perhaps also earlier. So quitting Geany, opening the vault will not help, the file list is already "corrupt".
Is there a smart way of dealing with this, that I have missded? :)
This is exactly the type of situation where I would use a list of files (with their full paths) as options on the command line to ask Geany to open them for me:
geany "/home/foo/Desktop/file1.txt" "/home/foo/Desktop.file2.txt"
If you put that into a script or a .bashrc alias, nothing will come along and alter it and you can rely on it to open exactly what you like each time.
If all of the files are already open when you run the command/alias/script, Geany won't do anything. If none of the files are already open, Geany will open them all in the same tab order each time. If some of the files are already open, Geany will open only the ones that aren't. The freshly-opened ones will be opened in new tabs on the right and won't necessarily be in the order that you would normally expect them to be. I just drag them into place afterwards.
I've got several different types of activities that each have files "exploded" all over the place and this has never failed me.