From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Griswold Subject: Re: tricky odt export needs Date: Thu, 21 Nov 2013 11:34:55 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c29d3c568d6b04ebb27a2a Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjXDW-00070g-2I for emacs-orgmode@gnu.org; Thu, 21 Nov 2013 11:34:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjXDU-0001JR-M3 for emacs-orgmode@gnu.org; Thu, 21 Nov 2013 11:34:58 -0500 Received: from mail-qc0-x22e.google.com ([2607:f8b0:400d:c01::22e]:45424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjXDU-0001JK-HC for emacs-orgmode@gnu.org; Thu, 21 Nov 2013 11:34:56 -0500 Received: by mail-qc0-f174.google.com with SMTP id r5so3117513qcx.19 for ; Thu, 21 Nov 2013 08:34:56 -0800 (PST) In-Reply-To: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Christian Moe Cc: emacs-orgmode@gnu.org --001a11c29d3c568d6b04ebb27a2a Content-Type: text/plain; charset=ISO-8859-1 On Wed, Nov 20, 2013 at 4:33 PM, Christian Moe wrote: > > Well, here's one way to get those page references, using filters: > > (defun my-odt-filter-pagerefs (text backend info) > "Make page references, not textual references in ODT export." > (when (org-export-derived-backend-p backend 'odt) > (replace-regexp-in-string "text:reference-format=\"text\"" > "text:reference-format=\"page\"" text))) > > (add-to-list 'org-export-filter-link-functions > 'my-odt-filter-pagerefs) > > (Whee! I just wrote my first export filter.) > That sounds pretty neat, Christian. But I get an export failed error, and it doesn't complete creating the odt file. Any suggestions? Thanks, Dan --001a11c29d3c568d6b04ebb27a2a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Wed, Nov 20, 2013 at 4:33 PM, Christian Moe <mai= l@christianmoe.com> wrote:

Well, here's one way to get those page references, using filters:=

(defun my-odt-filter-pagerefs (text backend info)
=A0 =A0 =A0 =A0"Make page references, not textual references in ODT ex= port."
=A0 =A0 =A0 =A0(when (org-export-derived-backend-p backend 'odt)
=A0 =A0 =A0 =A0 =A0 =A0 =A0(replace-regexp-in-string "text:reference-f= ormat=3D\"text\"" "text:reference-format=3D\"page\= "" text)))

(add-to-list 'org-export-filter-link-functions
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 'my-odt-filter-pagerefs)

(Whee! I just wrote my first export filter.)

That sounds pretty neat, Christian. But I get an export failed error,= and it doesn't complete creating the odt file. Any suggestions?

Thanks,

Dan
--001a11c29d3c568d6b04ebb27a2a--