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?

  • 4
    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") Mar 10, 2017 at 10:18

1 Answer 1


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 and acknowledge you have read our privacy policy.

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