From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Generic Elisp mechanism to declare file/URI handlers for Emacs Date: Tue, 19 Sep 2023 16:46:02 +0300 Message-ID: <83o7hycm3p.fsf@gnu.org> References: <87v8d66r7l.fsf@localhost> <87led53q0c.fsf@thaodan.de> <87fs3bkho4.fsf@localhost> <835y47g2b2.fsf@gnu.org> <874jjrk48q.fsf@localhost> <87cyyfwqs5.fsf@yahoo.com> <87sf7ao1o0.fsf@localhost> <87wmwmv13q.fsf@yahoo.com> <87cyyenwge.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11991"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, bjorn.bidar@thaodan.de, stefankangas@gmail.com, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 19 15:47:21 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qib4T-0002kd-EQ for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Sep 2023 15:47:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qib3X-0002yM-BW; Tue, 19 Sep 2023 09:46:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qib3H-0002xm-4O for emacs-devel@gnu.org; Tue, 19 Sep 2023 09:46:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qib3F-00011w-DS; Tue, 19 Sep 2023 09:46:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=HpRfhU/BRvEgrgnKJUjVwrQoA/RHCXUf4WXJexbiN8g=; b=f5vUXIlgtADQNkYWbg2w JH7g2xciuKFubPCCm6MCdTfofxr/Rqi228hR9fbRv7+IY7DKW9QQ7L1XLuR60ctZ50QowUc0J5wK/ 50ez/MgRO7gSoLeK2VFfOIa6e4JXmnQ/crD1TdwtjSBkDYzG+Vyad7YN3nfVw+Jfy4uzSENxPtP6l B52U4ZP6ihQp8aj51rVKNNIb8ivO/lw3fInkaG1Zr/ADakT/wXZBP0qr04EkXtj+V9UhDdMXoXfxw OmyeQRWG1mKYZDMAatdTa9zDyX/LJZ5hED+WlwQjBh02RJGYM8XwdCv+sebzU/GKV3ssVp+Ev6fhk LHPI3h0GPn+2tg==; In-Reply-To: <87cyyenwge.fsf@localhost> (message from Ihor Radchenko on Tue, 19 Sep 2023 13:06:57 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310763 Archived-At: > From: Ihor Radchenko > Cc: Björn Bidar , 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.