Dear Mr. Radchenko!

So that means it just has not landed in the version coming with Emacs and has a 
chance to be included in Emacs 31.

Thank you for your answer and especially for your work on Emacs.

Kind regards


Enviado desde Outlook para Mac

De: Ihor Radchenko <[email protected]>
Fecha: sábado, 1 de noviembre de 2025, 20:10
Para: Weisbarth, Joerg <[email protected]>
CC: [email protected] <[email protected]>
Asunto: Re: Proposal for respecting ts-modes in language-identifiers of 
code-blocks

[No suele recibir correo electrónico de [email protected]. Descubra por qué 
esto es importante en https://aka.ms/LearnAboutSenderIdentification ]

"Weisbarth, Joerg" <[email protected]> writes:

>   1.  Let’s define a code-block like `src_rust[]{fn hello(){println!("Hello 
> World!")}}` in an emacs-instance with default-configs. It does not recognize 
> that mode because per default emacs ships with rust-ts-mode. The 
> documentation<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Forgmode.org%2Forg.html%23index-org_002dsrc_002dlang_002dmodes&data=05%7C02%7Cjoerg.weisbarth%40sap.com%7Ce355ad3427ac4174e55508de197a4b0a%7C42f7676cf455423c82f6dc2d99791af7%7C0%7C0%7C638976210205590895%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2FE7FjBY3Wcr%2FY4i0p0UA59TO%2Bw2ieMQ4ng8Jttm1DG0%3D&reserved=0<https://orgmode.org/org.html#index-org_002dsrc_002dlang_002dmodes>>
>  says “If an Emacs major-mode named <LANG>-mode exists, where <LANG> is the 
> language identifier from code block’s header line, then the edit buffer uses 
> that major mode. Use this variable to arbitrarily map language identifiers to 
> major modes.“ So I propose that org considers as well `<LANG>-ts-mode ` in 
> addition to `<LANG>-mode `.
>   2.  There is the variable `major-mode-remap-alist` that let’s the user 
> control which major-modes get mapped to which others. (As far as I 
> understand, this variable has been introduced for that very purpose to deal 
> with those `-ts-mode`s.)  However, the example from the first observation 
> even fails if that alist contains `(rust-mode . rust-ts-mode)` as an entry.

Support for major-mode-remap-alist has been added some time ago, to the
development version of Org mode, in
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcgit.git.savannah.gnu.org%2Fcgit%2Femacs%2Forg-mode.git%2Fcommit%2F%3Fid%3D984c0c58bba69eb40ee59b13f42f9849a693d4c0&data=05%7C02%7Cjoerg.weisbarth%40sap.com%7Ce355ad3427ac4174e55508de197a4b0a%7C42f7676cf455423c82f6dc2d99791af7%7C0%7C0%7C638976210205608915%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=g5fEIQ1FNg71%2FJUH0%2BbEPjBdeF52FcMd%2Bj1CXRTn7pc%3D&reserved=0<https://cgit.git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=984c0c58bba69eb40ee59b13f42f9849a693d4c0>

--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at 
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Forgmode.org%2F&data=05%7C02%7Cjoerg.weisbarth%40sap.com%7Ce355ad3427ac4174e55508de197a4b0a%7C42f7676cf455423c82f6dc2d99791af7%7C0%7C0%7C638976210205622286%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=hh%2Flxrp0uGi3eQIAi1cMvUfrYafXJViEpXjRYtCvSpQ%3D&reserved=0<https://orgmode.org/>>.
Support Org development at 
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fliberapay.com%2Forg-mode&data=05%7C02%7Cjoerg.weisbarth%40sap.com%7Ce355ad3427ac4174e55508de197a4b0a%7C42f7676cf455423c82f6dc2d99791af7%7C0%7C0%7C638976210205632493%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=jyUmcAwUTqk%2BIqrAAe65qtd2INGOn3nH2VAYqRr8yoQ%3D&reserved=0<https://liberapay.com/org-mode>>,
or support my work at 
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fliberapay.com%2Fyantar92&data=05%7C02%7Cjoerg.weisbarth%40sap.com%7Ce355ad3427ac4174e55508de197a4b0a%7C42f7676cf455423c82f6dc2d99791af7%7C0%7C0%7C638976210205642162%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=oN7lmQTQu6F9lXHWyR0DrlwrCiwLnVSxlE7rnJYn010%3D&reserved=0<https://liberapay.com/yantar92>>

Reply via email to