[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generic Elisp mechanism to declare file/URI handlers for Emacs
From: |
Ihor Radchenko |
Subject: |
Re: Generic Elisp mechanism to declare file/URI handlers for Emacs |
Date: |
Wed, 20 Sep 2023 09:26:52 +0000 |
Po Lu <luangruo@yahoo.com> writes:
>> For example, consider that we have built-in clojure-mode at some point.
>> Then, it will make sense to tell OS that Emacs is able to open .clj
>> files. Same for any other new major mode.
>>
>> Not every major mode author knows the specific ways how Emacs implements
>> file type handling in different OSes.
>
> Emacs opens all text documents, and Clojure files are a kind of text
> file.
AFAIK, this is not the case. At least, for .desktop file on Linux.
Emacs opens all text/plain documents, but not all text/* documents.
In addition Emacs opens
text/english;text/x-makefile;text/x-c++hdr;text/x-c++src;
text/x-chdr;text/x-csrc;text/x-java;text/x-moc;
text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
which is a closed list. If we have something like, for example,
text/markdown, it will not be open by Emacs without explicit declaration
in the .desktop file.
> And be that as it may, operating systems use different names to
> designate each kind of text file, so expecting major mode authors to
> understand every one of those names is unreasonable anyway.
I thought that mimetypes is the common standard:
https://www.iana.org/assignments/media-types/media-types.xhtml
If not, it is indeed a problem.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Generic Elisp mechanism to declare file/URI handlers for Emacs (was: bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol), Ihor Radchenko, 2023/09/19
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Po Lu, 2023/09/19
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Ihor Radchenko, 2023/09/19
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Po Lu, 2023/09/19
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs,
Ihor Radchenko <=
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Po Lu, 2023/09/20
- Should Emacs declare itself as being able to open all the text/* mimetypes? (was: Generic Elisp mechanism to declare file/URI handlers for Emacs), Ihor Radchenko, 2023/09/20
- Re: Should Emacs declare itself as being able to open all the text/* mimetypes?, Po Lu, 2023/09/20
- Re: Should Emacs declare itself as being able to open all the text/* mimetypes?, Ihor Radchenko, 2023/09/20
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Eli Zaretskii, 2023/09/19
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Ihor Radchenko, 2023/09/19
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Eli Zaretskii, 2023/09/20
Re: Generic Elisp mechanism to declare file/URI handlers for Emacs (was: bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol), Jim Porter, 2023/09/19