DONE org-mode and code block major mode integration

  • State "DONE" from "PROPOSED" 2010-10-05 Tue 14:34
  • State "PROPOSED" from "" 2010-08-29 Sun 23:36

The theme of tighter integration between org-mode and the major modes of code blocks has appeared recently in a number of different forms.

  • major-mode syntax coloring of code blocks in org-mode files 1
  • execution of code-specific major-mode functions from within org-mode files (e.g. indentation of code) 2
  • execution of org-mode functions (e.g. tangling) from within Org-Edit-Src buffers 3

It seems that all of these issue should be addressed in a unified manner, but it's not clear exactly how…

Footnotes:

Solution

See variables `org-src-fontify-natively', `org-src-tab-acts-natively' and functions `org-src-do-at-code-block' and `org-babel-do-in-edit-buffer'.

Footnotes:

1 "Mode-specific fontification of babel source blocks" http://thread.gmane.org/gmane.emacs.orgmode/28307

2 "Indent code with TAB in Org buffer" http://thread.gmane.org/gmane.emacs.orgmode/28790

3 "Seemless editing of Babel Blocks" http://thread.gmane.org/gmane.emacs.orgmode/27788