Max Nikulin <maniku...@gmail.com> writes:

> On 16/05/2022 18:57, Ihor Radchenko wrote:
>> Craig STCR writes:
>>> But with the new form in 9.5.3, /home/user/myscript is opened by
>>> /bin/less, not emacs.  I assume mailcap is not consulted.  Which does
>>> not work well.  These behaviors are only for org.  Outside of org, emacs
>>> behaves correctly.
>> 
>> mailcap does get consulted. What you are seeing happens because
>> mailcap.el (built-in Emacs library) is only able to recognise mime-types
>> by extension. So, your file is likely recognised as "nil" mimetype thus
>> making Org mode fallback to default mailcap handler, which is /bin/less
>> in your case.
>
> Sounds reasonable. However I just have tried a [[file:~/path/to/script]] 
> link running Org main HEAD and the file is opened in emacs (26.3) other 
> window.

The behaviour is dependent on the OS-level mailcap defaults. What does
(mailcap-mime-info nil) return for you?

Best,
Ihor

Reply via email to