From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: [ODT] [BUG?] Custom links are formatted as for html Date: Sat, 12 Nov 2011 20:33:29 +0100 Message-ID: <4EBECA09.3030301@christianmoe.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPJGZ-0007ah-Mx for emacs-orgmode@gnu.org; Sat, 12 Nov 2011 14:29:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPJGY-0003P3-Og for emacs-orgmode@gnu.org; Sat, 12 Nov 2011 14:29:27 -0500 Received: from b1.hitrost.net ([91.185.211.67]:23762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPJGY-0003Ov-Jb for emacs-orgmode@gnu.org; Sat, 12 Nov 2011 14:29:26 -0500 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: Jambunathan K , Org Mode Hi, Jambunathan, When I try to define a custom link type with special formatting for ODT export, the exporter behaves as if the backend is html. I'll exemplify with a tweaked version of org-bbdb-export, since that's the textbook example of a custom link. I've rewritten it below so that if the export FORMAT is 'odt, BBDB links should be in bold. (defun org-bbdb-export (path desc format) "Create the export version of a BBDB link specified by PATH or DESC. If exporting to either HTML or LaTeX FORMAT the link will be italicized, in ODT it's bold, in all other cases it is left unchanged." (when (string= desc (format "bbdb:%s" path)) (setq desc path)) (cond ((eq format 'html) (format "%s" desc)) ((eq format 'latex) (format "\\textit{%s}" desc)) ((eq format 'odt) (format "%s" desc)) (t desc))) Now, when I export this: Here's my own address (bbdb:Moe). ...the ODT document does not contain the expected: Here's my own address (Moe). ...instead, it contains the formatting intended for HTML: Here's my own address (Moe). ...which, of course, displays as: Here's my own address (). Yours, Christian