|
From: | Darcy Shen |
Subject: | Re: [Texmacs-dev] The default mimeType seems overly aggressive. |
Date: | Mon, 15 Mar 2021 23:43:08 +0800 |
User-agent: | ZohoCN Mail |
As I’m not a Linux user I cannot really see the tricky side effects. As far I remember desktop environment behaves differently according the linux distribution and desktop manager. As far I remember, it was quite difficult to overload the defaults mime types (defined for tex or historic texmacs) and that is done by InitialPreference=99 for KDE Environment. Unfortunately this priority applies to every mime types defined in texmacs.desktop.On the most downloaded/used Linux distributions (Ubuntu), texmacs installation doesn’t change the default text/plain manager (at least with gnome desktop).That’s said, texmacs is capable of dealing perfectly with text files but it’s true there are plenty others set in Linux systems.I wonder if simply remove texmacs as support of text/plain cannot have side effect for example cut/paste functionality.The solution would be to lower the texmacs priority for text/plain type in order to keep the current default. I’ll investigate in this way.DenisLe 13 mars 2021 à 16:29, Darcy Shen <sadhen@zoho.com.cn> a écrit :I agree with you.And here is your PR: https://github.com/texmacs/texmacs/pull/50Thanks for your contribution.If your PR actually fixes a bug, I would like to review and apply the patch to SVN.-------Denis, what's your opinion?---- On Wed, 2021-02-17 16:56:47 slb <shenlebantongying@gmail.com> wrote ----Hi,
According to `TeXmacs/misc/mime/texmacs.desktop` [0], texmacs will set
> MimeType=text/x-texmacs.doc;text/x-texmacs.sty;text/plain;text/x-tex;
It includes a _text/plain_ !
Some system will treat _text/plain_ very serious and override default
app for all text files, including .sh .py .cpp .h .conf .ini .xml
.html etc.
The reason is that text/x-python, text/x-c++src, text/html are all
subtype of _text/plain_.
TeXmacs is obviously not a general purpose text editor like VIM or
Emacs. I do not want to use TeXmacs as source code editor or editing
my configuration files.
Please remove _text/plain_.
---
In the same time, texmacs rely on scheme source codes, I suggest to
include an "x-scheme".
x-scheme are defined at xdg-shared-mime-info.xml [1] as below. The
shared-mime-info database should be included on most of the modern
GNU/linux distros.
<comment>Scheme source code</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.scm"/>
<glob pattern="*.ss"/>
</mime-type>
<mime-type type="text/x-scheme">
[0] http://svn.savannah.gnu.org/viewvc/texmacs/trunk/src/TeXmacs/misc/mime/texmacs.desktop?view=markup
[1] https://github.com/freedesktop/xdg-shared-mime-info/blob/103b3058353ee7ca2b154b2e3d26d12cd1de958d/data/freedesktop.org.xml.in#L6462
[3] Shared MIME-info Database specification from freedesktop.org
https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/
Thanks for great software BTW :)
slbtty
_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/texmacs-dev
[Prev in Thread] | Current Thread | [Next in Thread] |