"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://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://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://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
