Hey Nick, Matthew, Lex, Frank, Enrico, whoever cares,
https://github.com/b4n/geany/commit/01fd682674286dada6d6b77d0e3064c89a28df64
I wrote this patch that adds automatic mounting of volumes needed to open a GIO URI, so one don't have to first mount the corresponding volume in Nautilus/whatever. This make opening arbitrary URIs from the CLI easier, though it's probably not needed when using a file manager (who would've already mounted the volume to browse it).
I'm quite confident mounting the volume is a good idea in theory, but there is a small thing making it a bit tricky: GIO doesn't seem to provide a synchronous API to do that.
So, it either requires the calling code to be asynchronous (which we don't have yet and that don't fit well with current code), or to hack around to make the asynchronous code look synchronous.
I did the latter, and that's basically the reason why I post this mail: do you think it's too ugly, too useless, too something?
Basically, points I see in a pros/cons:
+ allows to open URIs on unmounted volumes; + as a cause, makes Geany handle URIs more naturally; + mount is tried only as a last resort, so doesn't impact already working situations;
- code is a bit hackish (the loop thing), though it works fine [1]; - may be slow if mounting the volume is slow (since it is synchronous); - may not be really useful in practice (since people probably open URI through the file manager, who will mount the volume).
So... thoughts?
Cheers, Colomban
[1] only problem might be that idle/timeout callbacks (e.g. main loop sources) can still run during the mount -- though, I don't see why it'd be an actual problem for us