How to syntax highlight for Org-mode inline source code src_lang{}?
(font-lock-add-keywords 'org-mode
'(("\\(src_\\)\\([^[{]+\\)\\(\\[:.*\\]\\){\\([^}]*\\)}"
(1 '(:foreground "black" :weight 'normal :height 10)) ; src_ part
(2 '(:foreground "cyan" :weight 'bold :height 75 :underline "red")) ; "lang" part.
(3 '(:foreground "#555555" :height 70)) ; [:header arguments] part.
(4 'org-code) ; "code..." part.
)))
(defun org-fontify-inline-src-block (limit) "Fontify inline source block." (when (re-search-forward org-babel-inline-src-block-regexp limit t) (add-text-properties (match-beginning 1) (match-end 0) '(font-lock-fontified t face (t (:foreground "#008ED1" :background "#FFFFEA")))) (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) t))
add to function org-set-font-lock-defaults in org.el
;; Drawers '(org-fontify-drawers) ;; Inline source block '(org-fontify-inline-src-block)
UPDATE: the correct answer to this particular question is following https://stackoverflow.com/a/28059832/462601 . Answer presented here is related to this question Syntax highlighting within #+begin_src block in emacs orgmode not working
You mean like syntax-highlighting source blocks in buffer?
#+BEGIN_SRC ruby
Array.new
#+END_SRC
You need to set (setq org-src-fontify-natively t)
Ref: http://orgmode.org/worg/org-contrib/babel/examples/fontify-src-code-blocks.html