emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-babel-load-file support elisp


From: Tim Cross
Subject: Re: org-babel-load-file support elisp
Date: Tue, 04 Feb 2020 17:29:50 +1100
User-agent: mu4e 1.3.7; emacs 27.0.60

Well there are exceptions to all rules aren't there?

Yes, strictly speaking, for shell scripts, only 'sh' fits with the
<lang>-mode rule. However, that mode is also slightly different from
other language modes in that it supports many shell 'dialects'.

The thing is, the more 'liberal' we are with what we allow as the name
of the source block language, the more complex any additional
functionality becomes - I think your original issue is an example of
this. Allowing 'elisp' seem reasonable, but then other functions which
work with source blocks now also need to know that 'elisp' is an alias
for 'emacs-lisp'.

There are probably other inconsistencies which will 'fail' in some
situations. For example, I wonder about 'javascript' and 'js2'.
Jack Kamm <address@hidden> writes:

> Tim Cross <address@hidden> writes:
>
>> All other language specifiers comply to the pattern of source block
>> languages being the language major mode name without the '-mode', but
>> there is no elisp-mode.
>
> Sorry to be pedantic, but I think shell source blocks are another
> exception here. They can use various synonyms for the source language,
> such as "shell", "sh", or any other name in org-babel-shell-names. Also,
> while "shell-mode" is a major-mode, it is not the mode used by the
> source buffer -- it is the mode used for the interactive shell created
> by the `shell' command.


--
Tim Cross



reply via email to

[Prev in Thread] Current Thread [Next in Thread]