polymode / poly-org

Polymode for org-mode
57 stars 13 forks source link

Wrong major mode in bash/shell code blocks #4

Closed yantar92 closed 5 years ago

yantar92 commented 6 years ago

The current implementation of :mode-matcher for poly-org assumes that language string in the src block is exactly same as the corresponding major mode. However, it is not always the case. Specifically, the following should be edited in sh-mode.

#+begin_src bash 
ls
#+end_src

The correct way to determine major mode would be calling org-src--get-lang-mode on the language name in the src block.