From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: feature request: exporting TBLFM line, formatted or not Date: Mon, 11 Apr 2016 15:20:12 +0100 Message-ID: <87h9f8mdlv.fsf@ucl.ac.uk> References: <87mvp0nwbk.fsf@ucl.ac.uk> <1bbb803c2d1d4ae391de2caff17ebb62@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apchR-0005ym-C5 for emacs-orgmode@gnu.org; Mon, 11 Apr 2016 10:20:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apchN-0003fX-3a for emacs-orgmode@gnu.org; Mon, 11 Apr 2016 10:20:21 -0400 Received: from mail-db3on0148.outbound.protection.outlook.com ([157.55.234.148]:42929 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apchM-0003fH-Px for emacs-orgmode@gnu.org; Mon, 11 Apr 2016 10:20:17 -0400 In-Reply-To: <1bbb803c2d1d4ae391de2caff17ebb62@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (Nick Dokos's message of "Mon, 11 Apr 2016 13:22:39 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org" 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