|
| From: | David A. Gershman |
| Subject: | Re: [O] Disable org-babel-inline-result-wrap per inline code? |
| Date: | Wed, 21 Sep 2016 07:23:49 -0700 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0 |
|
On 09/21/2016 04:49 AM, Adam Porter
wrote:
That's actually how I'm doing it, but I'm not fully up on how macros work short of just being text replacements. Currently, at the top of my file, I have:"David A. Gershman" <address@hidden> writes: #+MACRO: gendate src_perl[:results output]{print ($1*5);} # Where 'print ($1*5);' will later be replaced with a perl function that takes the first day of class and an integer # ex: print find_date( '20160926', 6 ); # 6 = Sixth lecture day, output: "6, Oct 12, 2016" assuming MW class. and in the org file, I can have headlines: * Day {{{gendate(6)}}} ... * Day {{{gendate(10)}}} and so on. During export, the result desired is: Day 6, Oct 12, 2016 {etc.} FWIW, Eric had the solution: #+MACRO: gendate src_perl[:results output raw]{print ($1*5);} Thank everyone! --dag P.S. I should start a blog with all I learn on this. Someone could benefit from my struggles. :) |
| [Prev in Thread] | Current Thread | [Next in Thread] |