MIME changes
Thomas Leonard
tal00r at ecs.soton.ac.uk
Tue May 13 15:43:39 EEST 2003
On Mon, May 12, 2003 at 03:21:33PM +0200, David Faure wrote:
> On Monday 12 May 2003 15:10, Thomas Leonard wrote:
> > On Mon, May 12, 2003 at 02:33:02PM +0200, David Faure wrote:
> > > We have a X-KDE-Text boolean property now in mimetypes, to tell which
> > > one have a plain text representation - so that kmail can show the
> > > contents if asked for. application/x-perl, x-ruby and x-python have it
> > > set to true, for instance, as well as all the text/* mimetypes.
> >
> > > I think email programs should have the option to view the plain text
> > > source for everything, builtin, but indeed firing text editors in the
> > > general case (e.g. from a filemanager) isn't useful (to a
> > > non-developer).
> >
> > Wouldn't it be better to just check the start of the file for control
> > characters? Or even just show it anyway? In ROX-Filer, clicking on any
> > file with Shift held down loads it as if it was a text/plain file, for
> > example.
> Nice for binaries :)
> I don't think it makes sense to always offer to view something as plain
> text though.
Non-novice users will often want to do just that though. Loading an MS
Word document into a text editor is a reasonable way to try and read it if
you don't have a converter, and loading an executable is a good way to
find paths for 'File missing' errors, or to look for credits or other
error messages.
> > We already have 'text/*' to indicate that text is a reasonable want to
> > view the file (as a default option). Having another layer ("This file
> > shouldn't normally be viewed as text, but advanced users could still get
> > some sense out of it") doesn't seem necessary, given that an advanced user
> > should be able to view *anything* as text, if they want (eg, an MS-Word
> > document).
> But viewing binary data as text is much less useful than viewing e.g.
> python/ruby/perl scripts or postscript files, as text.
I'm having a hard time imagining someone who can usefully view a perl
script as text, but wouldn't understand why loading an MP3 produced random
characters. In any case, the text editor should just display a box ("This
file doesn't appear to be a text file. Really try to view it?").
> I think the point of X-KDE-text is to offer a sensible "advanced users
> can view AND edit this as text" option in some apps (which is the case
> for perl/ruby/python, but editing as text is definitely not a good idea
> with binary formats). Andras, can you confirm?
But do advanced users (programmers?) need this kind of hand-holding? You
still have to offer a load-as-text option anyway (even for binary files),
and you still have to check that something typed as text really is, so I
don't see this buys you anything:
"View as text."
"This isn't a text/* file. Really view it?"
"Yes."
"It isn't marked as X-KDE-text. REALLY view it?"
"Yes."
"It seems to contain binary data. Really REALLY view it?"
"YES!"
--
Thomas Leonard http://rox.sourceforge.net
tal00r at ecs.soton.ac.uk tal197 at users.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1
More information about the xdg
mailing list