emacs-devel
[Top][All Lists]
Advanced

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

Re: Generic Elisp mechanism to declare file/URI handlers for Emacs


From: Eli Zaretskii
Subject: Re: Generic Elisp mechanism to declare file/URI handlers for Emacs
Date: Tue, 19 Sep 2023 16:46:02 +0300

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: Björn Bidar <bjorn.bidar@thaodan.de>, eliz@gnu.org,
>  stefankangas@gmail.com, emacs-devel@gnu.org
> Date: Tue, 19 Sep 2023 13:06:57 +0000
> 
> I agree that it is not difficult. But it is very easy to miss
> implementing a new scheme on _all_ the supported OSes. For example, I
> have no idea if Emacs even provides something similar to .desktop file
> on MacOS and Windows.

The "Open With" feature of the file managers on MS-Windows is not
determined by files like the XDG *.desktop files, it is determined by
system-wide "file-associations" that are modified by special commands
and/or settings offered by relevant applications.  (The associations
themselves are recorded in the Registry, of course.)  Emacs on
MS-Windows can thereafter make use of these associations via the
w32-shell-execute primitive.

So I don't see how we could offer something like that for Windows; we
learned long ago that including scripts or programs that write into
the Registry is a two-edged sword, so we refrain from doing that
nowadays.

> I mostly thought about file type handling.
> Wouldn't it be nice to allow built-in major modes also make Emacs
> register as application capable to open the corresponding file
> type/extension.

Most of this setup is not in Emacs at all, it is in the OS outside
Emacs and in other applications.  At least on MS-Windows.



reply via email to

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