> From: Ihor Radchenko <yanta...@posteo.net>
> Date: Thu, 19 Jun 2025 16:45:39 +0000
>
> Anush V <j...@gnu.org> writes:
>
>> I believe there’s a bug in org-open-at-point.  The help text states
>> that with a double prefix argument (C-u C-u C-c C-o), it should “try
>> to open outside of Emacs, in the application the system uses for this
>> file type.”  However, when I use this command with a double prefix
>> argument on a media file link in org file (e.g.,
>> [[file:big_buck_bunny.webm]]), the media file opens inside Emacs
>> instead of externally in mpv (my default video player).
>
> That's because we use mailcap to deduce the program to be used outside
> Emacs.

I wasn’t aware of mailcap.  Thanks for letting me know!

> See `org-file-apps-gnu'.  You can customize `org-file-apps' to
> change the default system handler from mailcap to, say, xdg-open.

With this configuration in “emacs --no-init” (also tested with
org-version 9.7.30)

    (require 'org)
    (setopt org-file-apps-gnu '((remote . emacs) (system . "xdg-open %s") (t . 
"xdg-open %s")))

I get the message “Running xdg-open
/home/<username>/big_buck_bunny.webm...done” but doesn’t open mpv.

pdf files open properly with the default pdf viewer, however.

This might be similar to the "failing silently" issue mentioned at
https://list.orgmode.org/orgmode/874jedoo4d.fsf@localhost/, but I’m
not sure.

>> This behavior is inconsistent because dired-do-open (E) in dired
>> buffer correctly opens the same file in mpv.
>
> Dired uses `shell-command-do-open', which is a recent addition to Emacs.
> Org uses mailcap historically, and it is debatable whether we should
> change the historic behavior: 
> https://list.orgmode.org/orgmode/874jedoo4d.fsf@localhost/
>
> In summary, it is not a bug, but we have been considering to move closer
> to what dired does.

Sure.

--
Regards,
Anush

Reply via email to