() Lars Magne Ingebrigtsen <la...@gnus.org>
() Thu, 03 Nov 2011 22:17:21 +0100

   moabi2000 <moabi2...@gmail.com> writes:

   > I tracked this down to  line 94 of mailcap.el associates gnumeric with
   > vnd.ms-excel files.
   >
   >      ("vnd\\.ms-excel"
   >       (viewer . "gnumeric %s")
   >       (test   . (getenv "DISPLAY"))
   >       (type . "application/vnd.ms-excel"))
   >
   > Replacing gnumeric with libreoffice and doing make clean && make had
   > me on my way.
   >
   > So there seem to be significant issues in gnus parsing of mailcap
   > files.

   So basically, the built-in alist in mailcap.el seems to override your
   .mailcap file?

   I'm unable to reproduce this.  If I put something in my .mailcap file,
   start Emacs, and then try to view something, the entries from the
   .mailcap file ends up first in my `mailcap-mime-data' variable.

The order in ‘mailcap-mime-data’ is only relevant if there are no
wildcards or Lisp-handled viewer candidates.  This is because when
those are present, they are de-prioritized as a result of:

          (setq passed (sort passed 'mailcap-viewer-lessp))

You can reproduce the problem by adding something like:

  image/*; xloadimage -shrink %s

to ~/.mailcap and restarting.  For example, doing just that,
on my computer:

  (mailcap-mime-info "image/jpeg")
  => "/usr/bin/xloadimage '%s' "

which is from /etc/mailcap, i believe.  One solution is to expose the
"lessp" arg to the ‘sort’ call as a variable, so users can specify a
function that causes wildcard "*" to mean override instead of default
(as it is currently).  This is more upward compatible than the
alternative -- adding a variable to disable sorting entirely -- since
the MIME support infrastructure in Debian (and maybe others) now
includes a user-specified "priority" option (man "update-mime").

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to