<div dir="ltr">Hello,<div><br></div><div>I reply to all of your posts in one message. Hope that's ok.<br><br><div>Basically, the terminology Djynn use is:</div><div>* workspace: a set of projects</div><div>* project: a set of files, organised into a directory tree, that may or may not be opened</div><div>* session: a set of opened documents in the editor</div><div><br></div><div>In Geany, a project is the configuration of the project, including editing and building.</div><div><br></div><div><br></div>> I've got what might be a stupid question, but couldn't your plugin<br>> integrate with Geany projects the other way around, e.g. your plugin<br>> reacts to project open/close rather than making Geany react to your<br>> plugin's project open/close?<br><br>It's actually a good question, however, opening a project in Djynn means to view the files in that project in the tree-view; while opening a project in Geany means to change configurations according to that project. So, in Djynn, when I want to open a Geany project, I double click on it in the projectmanager tree-view, instead of selecting it in the project menu.</div><div><br><br>> I must admit I didn't try your plugin, but there are a few other plugins<br>> enhancing Geany's project support, and AFAIU they do this by listening<br>> to Geany project open/close and add their own logic to that.<br><br></div><div>That's a great idea! I'll see what I can come up with.<br></div><div><br></div><div><br></div><div>> Adding `document_close_all()` sounds reasonable indeed.  Out of<br>> curiosity, why do you need it?<br><br></div><div>Well, actually, I've found a solution for `document_close_all()`, this works as well:</div><div><div>while((doc=document_get_current())!=NULL) document_close(doc);<br></div></div><div><br></div><div>In answer to your question: The session manager; it switches between sessions, and stores many sessions. When switching between sessions, all opened documents are stored in the present session's file; then all opened documents are closed; then the documents in the next session are opened.</div><div><br></div><div><div><br></div><div>> Sounds like reasonable usage, I think you can just open Geany pull request<br>> to make these public. To make a function public, you just need to:<br>><br>> 1. Prefix the implementation with GEANY_API_SYMBOL.<br>> 2. Add some user-visible API documentation with a docstring (see other API<br>> functions in the code to have an idea how it should look)<br>> 3. Move the function declarations above GEANY_PRIVATE in the header.<br>><br>> That's about it.<br><br></div><div>That would work on my computer, but not on Launchpad, or for anyone else.</div><div><br></div><div>For the moment I'll disable the project functions, that's ok.</div><div><br></div><div><br></div><div>> As it usually works, the best presents have to come from yourself, there<br>> will be just socks and pyjamas under the Christmas tree :-).<br><br>I'd actually need just that, comfy socks and a pyjamas would be really nice, perhaps I'll buy that for myself :-)<br><br><div><br></div><div>> If I understand the project part of the plugin (haven't tried it either),<br>> it tries to simplify switching between projects and organizing projects<br>> into workspaces. In the screenshot here<br>><br>> <a href="http://plugins.geany.org/djynn.html">http://plugins.geany.org/djynn.html</a><br>><br>> it seems that the second combo serves switching between projects in a<br>> workspace so it's the plugin which decides whether a project should be<br>> opened/closed rather than Geany. This functionality cannot be done with<br>> listening to the signals only so access to project_open()/close() makes<br>> sense here.<br><br>That's true. Though opening the Geany project could actually trigger the project in the Djynn tree-view opening to visible, and close other project folders.<br><br><br>> The other thing is the plugin itself is a bit too "All the stuff I need in<br>> Geany" and it would be better break the functionality into individual<br>> plugins, or extending existing plugins or adding the functionality directly<br>> to Geany.<br><div><br></div></div></div></div><div>Yes, more or less, I've yet to find a use for base58 encoding, but the rest is used all the time :-) When I began working on Djynn in 2012 it was part of a library (<a href="https://code.google.com/p/libamanita/wiki/djynn">https://code.google.com/p/libamanita/wiki/djynn</a>), and I didn't intend it to be anything more than "what I need in Geany".</div><div><br></div><div>I could probably break Djynn into several plugins, but it would become a lot more maintenance work handling many projects instead of one. I'm open to extending existing plugins or adding directly to Geany.</div><div><br></div><div>The Project Organizer is an interesting plugin, they are similar, but works very differently. If we can agree on a common "vision", I'd happily contribute to that. Djynn has regex pattern add files on a per directory basis, i.e. you can add a directory and tell to search files according to pattern, and recurse into subfolders, but you can still have fixed files added too; e.g. you can add files from the project source directory, and also add `~/.config/project/file.conf` etc.</div><div><br></div><div>Then there is commenting, encoding and line ordering; that could be broken into three plugins, or preferably one "Extended editing" or something similar; there are no other plugins that suggest merging that I can see.</div><div><br></div><div>If there is anything you would add directly to Geany, let me know.</div><div><br></div><div>Regards,</div><div>Per</div><div><br></div></div>