Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:]]*'
#+end_src

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.

Edit:

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:]]*'
#+end_src

can this be turned of somehow?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

(setq org-src-fontify-natively t)

share|improve this answer
    
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 '12 at 9:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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