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:
#+header: :exports none
* call_hname()[:results raw]
2 Hello, world.
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!
Thanks to Jon’s org-ref package post, now there is a video demonstrating org’s built in BiBTeX management solution.
My goodness, that 8 minute video sums up what was not obvious to many even after wantingly browsing the documentation on it. Very cool Eric!
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.
Nice post to get you think about org-mode as a data vehicle.
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 ?✂)))
(comment-or-uncomment-region (line-beginning-position) (line-end-position)))))
ADDENDUM: 2014-06-22T10:18:59-0500: Added newline first
This is a great, detailed overview of one person’s org usage.
Myself not having used agenda at all yet, it is nice to see such a thoughtful exposition, something seemingly common to org users.
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)
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.
Be sure to configure org-startup-folded for large org documents.
org quite nicely handles navigating a collapsed document. Large ones though get a nagging slowdown, and nofold remedies this.
Here is a simple, simple example so you can see it and believe it:
Continue reading “A tiny noweb-ref tangling example”