Simple in-document generation with org-mode

org-mode’s literate programming (Babel) functionality is amazing. The limitation in my case is me, not the tool. The power and abstraction just aren’t something that you think about it for a document. While I suppose that is the whole point of LP, it does just take time for it to sink in, and experience. That said, this example is nice.
Clearly generating a headline is something you may do once, and probably not very often, so would perhaps be more likely just use a macro definition. When I see how simple this is though, the idea of using macros really goes out the window because this is far easier and simpler and much more powerful. Here is a simple example:

* Code
#+name: hname
#+header: :exports none
#+begin_src emacs-lisp
"Hello, world."
* call_hname()[:results raw]

Produces this:

1 Code
2 Hello, world.

The difference between org-ref and org-bibtex

In case you were wondering, here is an answer:

Some features could be merged, but there is an important difference in that org-ref uses bibtex as the backend database, and reftex for searching, and org-bibtex uses org-mode headings as the backend database, and tag/property searches (I think). It is like the difference between org-contacts and bbdb. They both serve similar needs, but with different data sources, and different ways to think about it.

Both approaches are quite nice. Sometimes it seems easier to be able to share the original, not exported, database with folks even though technically it makes no difference what is the system or origin for that data!

org-ref for delightful LaTeX citation management in org-mode

Having avoided setting up a nice LaTeX/BiBTeX build chain in org-mode, and instead leaving it all to the latter, it was wonderful to watch this overview of org-ref. There is a lot of discussion on the org list about different folks workflows. This looks like a really, really nice one with org-ref.

Line snippet helper for posting code

On the org list there are a few ways that people post code indicate the start and end of that code. This is my version that might work in any mode:

(defun gcr/insert-noticeable-snip-comment-line ()
  "Insert a noticeable snip comment line (NSCL)."
  (if (not (bolp))
      (message "I may only insert a NSCL at the beginning of a line.")
    (let ((ncl (make-string 70 ?✂)))
      (insert ncl)
      (comment-or-uncomment-region (line-beginning-position) (line-end-position)))))

ADDENDUM: 2014-06-22T10:18:59-0500: Added newline first

Only use in-line footnotes unless your document is very very small

Footnotes in org-mode are really, really great. Before you really get into using them, take a bit of time to think about how you want to use them.
If you have 5 footnotes or less, then don’t think anymore about it. If more then read on.
This topic is not unique to org first of all, it just isn’t something that you consider much until it is too late. Once you get into the org lifecycle, you start tossing and slinging document and code fragments with ease, especially while refactoring. This is all find and well, until you realize that your footnotes will be left sad and alone, abandoned for some cruel fate. In particular, it will break your document.
The better way is to define them all in-line; that will allow simple and easy refactoring in a quite pleasant manner.
Forgot a key point, as I only revisited this today: also generate random IDs. The kind folks in the org community on-list explained this to me. That prevents name collisions. Here is what you need:

(setq org-footnote-define-inline +1)
(setq org-footnote-auto-label 'random)
(setq org-footnote-auto-adjust nil)

ADDENDUM: 2014-06-22T09:07:09-0500
As FUCO1 pointed out, there was something wrong with my approach as I was still using randomly generated IDs. That was my intent. What I wanted was in-line and still reference-able footnote definitions, but without adding them to the Footnote section/heading. After reading the code, I see now the right setting; it was the above plus no auto-adjusting the footnotes. I just updated the code to correct that.