On 21/05/2022 08:44, Ihor Radchenko wrote:
Max Nikulin writes:

It is the same with and without -Q and no, I have not customized
`mailcap-user-mime-data', its value is nil, easy customization interface
tells that it is the standard value. There is a chance that debian has
some patch, but most of debian specific is disabled when -Q option is used.

Interesting. In any case, it confirms that mailcap behaviour depends on
both Emacs settings and also system settings.

You should be even more surprised, if I say that [[file:~/tstorg]] link is opened in emacs buffer in shell-script mode (emacs-27.1, org main HEAD) despite

   (mailcap-mime-info nil)
   nil

actually it is a minimal LXC container with no mime-support package installed, so /etc/mailcap file is absent.

Notice `mailcap-mime-data' has the following entries for a long time
    ("text"
     ("plain"
      (viewer  . view-mode)
      (type    . "text/plain"))
     ("plain"
      (viewer  . fundamental-mode)
      (type    . "text/plain"))

The source of the problem is that Emacs-27 was released with the following bug:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40247
mailcap-mime-data erased when parsing mime parts

So `mailcap-parse-mailcaps' called from `mailcap-mime-info' erases predefined associations in Emacs-27.


Reply via email to