> but I acknowledge that sometimes comparisons aren't always adequate and 
> shouldn't be solely relied upon to express a desired feature.

Yes, that was what I was asking, describing a feature as "I want it to work 
like Vscode" is unhelpful if the reader doesn't use Vscode or that feature of 
Vscode, whereas "I want it to do xyz when I click blah because I have found it 
useful in Vscode" is of course fine.

> [end getting in ahead]

I was simply saying that I was making the above point as guidance ahead of you 
doing anything, not that it was a criticism of anything you had done in the 
past.

> I searched for document_valid

Sorry I meant 
[`DOC_VALID`](https://www.geany.org/manual/reference/document_8h.html#a064c8f47ec543aa26cb8fd2a895a4ce6)
 which does exactly your suggested code but allows for Geany to add conditions 
without your code needing to be changed.  Thats not to say all plugins use it 
properly (or even Geany itself).

The important thing was to beware that state can change between callbacks to 
your plugin, I saw a note that you made a list (of documents I think) global, 
thats fine, but if you are saving information between callbacks you have to 
check that the information in that list is valid every time your plugin is 
entered because any arbitrary changes could be made (documents opening/closing) 
between callbacks.

>  Maybe our miscommunication stems from my lack of experience developing Geany 
> or GTK development, but feel free to elaborate.

Or the problem of the description of the plugin.  I had in mind "pin" as being 
locking the document tab to the left side of the notebook tabs, a feature 
available in several other applications.  Your `README.md` definition of "pin" 
as adding to a sidebar list clears that up (and is probably simpler to 
implement).

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

Message ID: <geany/geany-plugins/pull/1308/c1953291...@github.com>

Reply via email to