I would like to use Emac's org mode for taking notes of java snippets. I would like the java snippets to be syntax highlighted.
I tried running Org-mode in minor mode and Java-mode in major mode, but I found this lacks a lot of Org-Mode features (e.g links). I would prefer to run Org-mode in major mode and have some minor mode to do java syntax highlihgting for when it finds java syntax.
I would rather avoid the #+begin_src business as my file would be full of those.
Is this possible?
[Edit] in was thinking along the lines of soft syntax highlighting for none headings and non org-items . I.e general paragraph body?
#begin_srcand#end_src, but you explicitly say you don't want to use that feature. (Note that this actually does more than just syntax highlighting;C-'in such a block opens up a new buffer so you can edit source code in its major mode.)M-x version) and Org mode (M-x org-version) are you using? Does this persist withemacs -Q, when you have manually setorg-src-fontify-nativelytot? What if you manually callorg-src-fontify-blockwith point inside a code block? It works fine for me with a stable release, e.g. Emacs 24.3.1 and Org 7.9.3f under Ubuntu, but under a current trunk build (Emacs "25.0.50.1" and Org "8.2.10") I getorg-mode fontification error.