> all 3 problems are in master branch, you can tell from how config window > looks on videos, and PR for Autosave is directed to master (of my fork). But we can add Autosave fix to this PR no problem
I don't care much, you can post it afterwards too. > right, it does not affect PUD unless templates start working, then it would > in a minor way. But we could just merge changes from that PR into current one > or create new one afterwards or just forget about it - as you prefer I'm slightly lost in what you are proposing here - as I said, I think it can wait until this PR is merged. > So from this point on, Instantsave is not working with such new files. I'm not questioning the fact that it doesn't work - I just don't think your implementation is the right one. You can't change the "document-new" signal - you break API towards plugins this way. Also, as I said, plugins would have to be modified to use `document_new_file_with_creation_type()` consistently and plugin authors would have to remember to do it correctly and I think this is the potential source of problems. As I said, instead, the plugin itself should try to do it right by itself without any extra API. `doc->real_path` tells you whether there's a file backing the tab or not plus I think it should detect whether the file is modified or not before converting it to a persistent untitled document. > If we dont fix this - we should at least remove mentions of supporting > templates from geany.txt, in my PR https://github.com/geany/geany/pull/4077 i > kept mentions and furthermore moved it to common part that describes both IS > and PUD since their code in that place is common. This is an option too, depends which way you decide to go. > This is not cool, yes, alternatives would be worse - add field to > GeanyDocument or just change template-spawned file name to something > definitive like "untitled-tpl" and check for this kind of name here if > (enable_instantsave && doc->file_name == NULL) Again, I'd point you to `doc->real_path` (this isn't `doc->file_name`) - it tells you whether there's a file to which a tab is saved and based on this you can detect all "untitled" , template files, or any similar files created by plugins. No extra API needed IMO. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/3911#issuecomment-2504520728 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany/pull/3911/[email protected]>
