Sometimes you don’t want a 100% reproducible system (org-mode, noweb, polymode) and instead just want an easy way to work with multiple languages within the same document (MuMaMo). Sometimes you don’t even want to go that far though and just want a really easy way to hack on different languages that have somehow ended up in the same file.
Jon posted the link here to Zane’s solution. Very cool. Nice reminder that if we were to read the Emacs and Emacs Lisp user manual, we would all know how to do this. Another nice reminder, even if we don’t, kind people provide the information and solutions for us, the very definition of community. I wanted a slightly different approach with just a couple additional things: line numbers instead of the point, safety checks for use via code, and a little more documentation:
Continue reading “Lightweight multiple modes for semi-literate programming”
Tag: Programming Language
Whitespace
Most modern programming languages do not consider white space characters (spaces, tabs and newlines) syntax, ignoring them, as if they weren’t there. We consider this to be a gross injustice to these perfectly friendly members of the character set. Should they be ignored, just because they are invisible? Whitespace is a language that seeks to redress the balance. Any non whitespace characters are ignored; only spaces, tabs and newlines are considered syntax.
Whitespace must be learned.
Polymode is on MELPA
Styles for reading exported org-mode documents in HTML
Exporting org-mode documents to HTML offers 3 styles for navigating the exported document. Those styles are listed here.
You may be pleasantly surprised by the “info” style view.
Parallel code execution in Emacs with org-mode literate-programming
The question of how to do so comes up quite often and is answered quite well here how to accomplish it.
org-mode document transport ala a zip file
In this humble post the Kitchin Research Group demonstrates how to package up all external references for an org-mode document for transportation in a zip file solving the problem that many org-mode users face of how to simply and easily share the entirety of an org-mode document with others without exporting to PDF.
imenu-anywhere
A mistake that I made too often in life was to focus too much on the specific implementation or realization of a thing instead of learning about the valuable generalizations and abstractions that may be learned from it and applied elsewhere. That was then, this is now.
imenu is actually a nice feature for Emacs. When I learned about it way back when, having quit using the menu bar, I dismissed it as not-helpful. That was a stupid thing for me to do because there ought to be a way to use it with the keyboard. Of course there is.
Thank you vitoshka, for imenu-anywhere.
Polymode
Recently learned about Polymode from the ESS user manual.
It looks like a nice option for working with code that didn’t start out in org-mode; which is likely pretty common.
Org Manual
The org-mode manual lives here.
org-mode examples
This post is a wonderful cookbook from which to pull.