5

I've got a new language I'm working on that I'm documenting in an Org file. Code samples for this language can be written in lisp-mode, but I want to use the new language's name for the SRC blocks for when I eventually write an Emacs mode for the language.

How can I alias #+BEGIN_SRC my-new-lang to open in lisp-mode?

  • 3
    One option that doesn't exactly answer the question as asked is to simply define the new derived mode in elisp without giving it a new implementation: (define-derived-mode my-new-lang-mode lisp-mode "NewLang") – Sean Allred Mar 10 '17 at 10:18
3

Rather late (you've probably finished writing your language and written an Emacs mode for it), but perhaps still useful:

You can customize (or manually edit) the variable org-src-lang-modes. Without using customize:

(add-to-list 'org-src-lang-modes '("my-new-lang" . lisp))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.