In org-mode - is there a way I can make emacs treat a region to be of a given mode (with syntax highlighting and so on). I tried the following for bash:

#+begin_src bash
# -*- mode:sh -*-
find . -type f -not -name '*[[:digit:]]*'

it doesn't work - it just shows the find line in grey. I want to be highlighted as if I were in a shell-script mode, or at least - black - with no org-mode parsing.


The (setq org-src-fontify-natively t) solves it, but org still interprets [[:digit:]] as a link:

#+begin_src sh 
find . -type f -not -name '*[[:digit:]]*'

can this be turned of somehow?


1 Answer 1


(setq org-src-fontify-natively t)

  • This solution requires me to have (org-babel-do-load-languages 'org-babel-load-languages '( (R . t) (sh . t) (python . t) (perl . t) )) right?
    – Adobe
    May 29, 2012 at 9:27

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.