Package: mc
Version: 1:4.6.1-2
Severity: wishlist

Hi, at the moment if a file extension is not explicitly listed in the mc
extensions file, then nothing is done:
----------
# Default target for anything not described above
default/*
        Open=
        View=
----------

However, more extensions are defined in /etc/mime.types, and their handling
is defined in /etc/mailcap.  It would be nice if mc's default handler could
try to pass the file through these facilities.

At moment the lack is most jarringly felt with OpenOffice documents. The mc
extensions file has the old 1.0 formats (*.sxw etc) but not the new
OpenDocumentFormat (OOo2) ones, *.odt etc.

Of course a workaround could be to add the new OOo extensions to the mc
extensions file, but it seems wrong to do that when a perfectly good
handler already exists in /etc/mime.types+/etc/mailcap.

In fact implementation is dead trivial. Just change the default handler from
blank to something like:
----------
# Default target for anything not described above
default/*
        Open=run-mailcap --action=edit %f
        View=
----------

The View entry could likewise be set to "run-mailcap %f || %view zcat %f"
(strictly speaking it would go with --action=see, but nothing in
/etc/mailcap has "see" defined).  

You may not want to set View though, since it doesn't seem to behave
consistently.  Without the "|| %view zcat %f", run-mailcap prevents the simple
text display of simple text files e.g. test.dat. In the case of .dat,
run-mailcap fails with 
Error: no "view" mailcap rules found for type "chemical/x-mopac-input",
with exit code 3 (so View does nothing except return an error message).  

With the explicit fallback call of the internal mc text viewer via "|| %view
zcat %f", the text file is displayed as expected, but registered mailcap
entries such as OpenOffice documents then also get displayed as text rather
than viewing them with OpenOffice, which defeats the whole point of defining
View. Perhaps you know the correct way to untangle it so it works both ways?

I hope you can change the default Open=run-mailcap entry, at least. If you
do, I think you'll also need to Depends: mime-support.

Thanks,

Drew

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.16
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)

Versions of packages mc depends on:
ii  libc6                         2.3.6-4    GNU C Library: Shared libraries an
ii  libglib2.0-0                  2.10.1-2   The GLib library of C routines
ii  libgpmg1                      1.19.6-22  General Purpose Mouse - shared lib
ii  libslang2                     2.0.6-2    The S-Lang programming library - r

mc recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to