xdg-open doesn't appear to allow any distinction between "viewing" and "editing" a file, although the former appears to be the current implied mode of operation. An extra option (--edit ?) or an xdg-edit script instead would be really useful when it is desirable to express a wish to edit a file rather than just display it. (Obviously, this might or might not be possible depending on the environment, but the fallback could be to the same situation as currently).
while a nice feature in spirit, how is xdg-open to divine which apps allow editing? Right now, xdg-open (as other similar stuff in xdg-utils) work from mimetypes, which doesn't provide any distinction between viewing/editing, afaik.
I don't know if any current desktop environments provide this (or expose it in such a way that it can be used by xdg-open) - if not, that's a different bug - but, hypothetically, a desktop environment might well keep a directory containing two helper applications for each MIME type: one for viewing, one for editing and in that case an xdg-edit or similar which is able to make use of that info would be useful. It may well be that no current environment supports that, which could do with fixing upstream (and until that day I suppose xdg-edit is an impossibility).
I think this is still the wrong layer to even try something like this. It ought to be addressed at a lower level via mimetypes or something similar.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.