[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] feature request: exporting TBLFM line, formatted or not
From: |
Eric S Fraga |
Subject: |
Re: [O] feature request: exporting TBLFM line, formatted or not |
Date: |
Mon, 11 Apr 2016 15:20:12 +0100 |
User-agent: |
Gnus/5.130016 (Ma Gnus v0.16) Emacs/25.0.92 (gnu/linux) |
Okay, a start on this using hooks:
#+begin_src emacs-lisp
(defun esf/process-table-tblfm (backend)
"Process the TBLFM line to make it available for export as a verbatim block"
(while (re-search-forward "^ *#\\+TBLFM:" (point-max) t)
(replace-match ":")
(let ((start (point))
(end (progn (forward-line) (point))))
(goto-char start)
(while (re-search-forward "::" end t)
(replace-match "\n: ")))
)
)
(add-hook 'org-export-before-parsing-hook 'esf/process-table-tblfm)
#+end_src
I'm sure there's a much easier way to do this but, for now, this does
what I need.
thanks,
eric
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-705-g716e33