Re: The default mimeType seems overly aggressive.
Massimiliano Gubinelli <[email protected]>
| Newsgroups | gmane.editors.texmacs.devel |
|---|---|
| Message-ID | <[email protected]> |
It is not clear to me what is the proper way to handle this issue. On one hand LyX lists only its own format: https://www.lyx.org/trac/browser/lyxgit/lib/lyx.desktop.in?rev=20e1fe4674cdcd0164c74f76dddd882d95ea3c88 While on the other the freedesktop site says explicitly https://specifications.freedesktop.org/desktop-entry-spec/0.9.5/ar01s07.html "It is also worth noting who this mechanism is defined for. It is primarily intended for use by distributors/sysadmins to provide a sane set of defaults for their users. Additionally, users themselves can use this mechanism to override the user defaults. We intentionally don't provide a way for application authors themselves to list themselves as the default for a given type, as we felt that that cannot work." So it seems that we can list the text/plain type since we actually can handle it and there is somewhere else a problem when our declaration is taken as a request to set a system default. Can it be that is something else causing the problem? my 2 cents. Best, Max > On 15. Mar 2021, at 18:17, Ingolf Schäfer <[email protected]> wrote: > > Dear Darcy, > > may I jump in? > > I can't name all systems, but it happens on Arch-based systems with KDE (including my computers) and likely with Kubuntu, too. Denis explained why very well. It is likely happening on most Linux distros with KDE and LXQt, if the developers of that distro use the default mime settings for those desktop environments. > > Best wishes, > > > > Ingolf > > > > Am 15.03.21 um 16:43 schrieb Darcy Shen via Texmacs-dev: >> > 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. >> >> slbtty, could you explicitly list these systems? >> >> >> ---- On Mon, 2021-03-15 19:39:14 denis Raux <[email protected]> wrote ---- >> >> 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. >> >> >> Denis >> >> Le 13 mars 2021 à 16:29, Darcy Shen <[email protected]> a écrit : >> >> I agree with you. >> >> And here is your PR: https://github.com/texmacs/texmacs/pull/50 >> >> Thanks 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 <[email protected]> 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 >> [email protected] >> https://lists.gnu.org/mailman/listinfo/texmacs-dev >> >> >> >> >> >> >> >> _______________________________________________ >> Texmacs-dev mailing list >> >> [email protected] >> https://lists.gnu.org/mailman/listinfo/texmacs-dev > -- > Dr. Ingolf Schäfer > Universitätslektor für Mathematik > Fachbereich 3, Universität Bremen > Gebäude Unicom 2 (Oxford), Raum 2.0090 > Postfach 105 > Tel: +49 (421) 218 63718 > > _______________________________________________ > Texmacs-dev mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/texmacs-dev _______________________________________________ Texmacs-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/texmacs-dev