[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Should Emacs declare itself as being able to open all the text/* mimetyp
From: |
Ihor Radchenko |
Subject: |
Should Emacs declare itself as being able to open all the text/* mimetypes? (was: Generic Elisp mechanism to declare file/URI handlers for Emacs) |
Date: |
Wed, 20 Sep 2023 11:17:40 +0000 |
Po Lu <luangruo@yahoo.com> writes:
>> 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.
>
> Then maybe that should be fixed, because under Android, Emacs opens all
> text/* files. (Given that Emacs is usually the sole functioning text
> editor when installed on Android systems.)
I am not sure if it is possible to use wildcards like this.
Nothing is said in the spec:
https://specifications.freedesktop.org/desktop-entry-spec/0.9.5/ar01s07.html
On the other hand, wildcards seems to work:
https://unix.stackexchange.com/questions/232525/mimetype-desktop-entry-for-all-image-files
So, your suggestion sounds reasonable.
>> 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.
>
> Does the IANA standard encompass Clojure files?
Nope. It was just an example. Clojure files do not have a dedicated
mimetype:
$ xdg-mime query filetype ./project.clj
text/plain
Other source code files might though. For example,
$ xdg-mime query filetype src/js.rs
text/rust
--
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, 2023/09/20
- 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 <=
- 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