@LiquidCake Thanks for the updates! I definitely like that the temp files are 
preserved across project opens/closes and it seems to work very well for me.

Some more observations when playing with the feature:
- when closing a temp file and choosing "Save", I'd suggest using some other 
default directory than the one where temp files are stored so users aren't 
tempted to store the files there (and be surprised by the consequences if they 
choose a `gtemp_x` file name)
- since all temp files are opened on session load, there could be one more 
option in the dialog asking what to do when closing a temp file - "Close". This 
would just close the temp file but keep it saved on the disk. I can imagine it 
could be useful when someone is not interested to see the temp file for some 
project but still wants to keep it for other projects. I'd also maybe rename 
"Don't save" to "Delete" so it's clear the contents of the tab is lost.
- it would be worth considering whether `create_new_temp_file_name()` shouldn't 
rather iterate over integers and test whether `gtemp_i` exists - this way, when 
e.g. `gtemp_5` is open and all other temp files closed, `gtemp_1-4` file names 
could be reused again for new tabs
- I'm not completely sure if `utils_is_file_writable()` should be part of 
Geany's API. Personally I'd rather sacrifice this check and not bloat Geany's 
API with another random function.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3911#issuecomment-2212555557
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3911/[email protected]>

Reply via email to