[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnus opening attachments

From: Thien-Thi Nguyen
Subject: Re: gnus opening attachments
Date: Sat, 28 Jan 2012 16:50:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

() Lars Magne Ingebrigtsen <>
() Thu, 03 Nov 2011 22:17:21 +0100

   moabi2000 <> writes:

   > I tracked this down to  line 94 of mailcap.el associates gnumeric with
   > files.
   >      ("vnd\\.ms-excel"
   >       (viewer . "gnumeric %s")
   >       (test   . (getenv "DISPLAY"))
   >       (type . "application/"))
   > 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").

reply via email to

[Prev in Thread] Current Thread [Next in Thread]