Calling any text editor for any text file
Marcin Zajączkowski
mszpak at wp.pl
Sat Sep 22 20:42:19 UTC 2007
Ville Skyttä wrote:
> On Saturday 22 September 2007, Marcin Zajączkowski wrote:
>
>> Some time ago I asked [1] about calling default text editor from an
>> application (here for isomaster). I can't use editor assigned to
>> specified mime type, because any (text) file (even html) should be
>> opened in a text editor (not e.g. web browser).
>>
>> I wrote a small script for that purpose and before its upload I would
>> like to ask for comments.
>
> - emacs is missing from the list
Does emacs graphical interface (doesn't need a console)?
> - Should take current desktop environment into account, eg. prefer kate over
> gedit if running KDE even if gedit is installed
In a version for iso master it was created to be a default editor (it's
better to open in any editor than doesn't open at all). User can change
it from GUI.
But if you know more programs (packagers) that have similar problem a
script could be enhanced to be more "powerful" :)
Btw, is there a simple way to determine already running desktop environment?
> - Should provide a way for users to set their preferred editor and not do any
> detection, eg. in a sourced ~/.somefile
For the second version of that script it's a good idea. In Fedora I
don't know a way to call default text editor on any file.
> - Should probably be quiet by default, output stuff to stdout only on request
Yes, debug output could be disabled by default.
> - Would be nice to have this kind of a tool in xdg-utils, eg. as "xdg-edit" or
> "xdg-open --edit". Ask xdg-utils upstream?
Why not. I wrote it because that option was missing in xdg-utils.
But maybe I'm the only one who needs that functionality?
Thanks for you comments.
Marcin
More information about the fedora-devel-list
mailing list