[Top][All Lists]

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

Re: Bug in 9.5.3 org--file-default-apps

From: Ihor Radchenko
Subject: Re: Bug in 9.5.3 org--file-default-apps
Date: Sat, 21 May 2022 09:44:39 +0800

Max Nikulin <manikulin@gmail.com> writes:

> On 20/05/2022 15:22, Ihor Radchenko wrote:
>> Max Nikulin <manikulin@gmail.com> writes:
>>>>> run-mailcap --norun ~/path/to/script
>>>> Note that mailcap.el does _not_ use run-mailcap or anything external. It
>>>> is written purely in elisp.
>>>> So, can you please report the output of M-: (mailcap-mime-info nil)?
>>> view-mode
>> Sorry, I did not consider that you customised mailcap-user-mime-data (I
>> guess). No doubt your Emacs opens the script in other window.
>> What about using emacs -Q?
> 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.

As I understand now:
1. (mailcap-mime-info nil) in Emacs 26 returns 'view-mode disregarding
2. (mailcap-mime-info nil) in Emacs 27 returns "less %s" on my system
   unless I have ~/.mailcap, in which case it takes text/plain handler
   from ~/.mailcap
3. (mailcap-mime-info nil) in Emacs 28/29 returns 'fundamental-mode
   unless I have ~/.mailcap, in which case it takes text/plain handler
   from there

Dear Craig, your issue will kind of disappear if you upgrade Emacs or
provide plain/text handler in ~/.mailcap.

On Org side, the very reason we call (mailcap-mime-info nil) with _nil_
argument is because mailcap.el does not recognise file types without
extension. I think that we can prefer the output of `file' utility if it
is available on the system. However, I am not sure what to do on


reply via email to

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