Bug 17339

Summary: xdg-open would benefit from an "edit" mode (xdg-edit?)
Product: Portland Reporter: Tim Jackson <bugs>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Tim Jackson 2008-08-28 09:20:15 UTC
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).
Comment 1 Rex Dieter 2008-08-28 09:24:43 UTC
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.
Comment 2 Tim Jackson 2008-08-28 09:33:29 UTC
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).
Comment 3 Rex Dieter 2011-03-31 06:04:42 UTC
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.