From mboxrd@z Thu Jan 1 00:00:00 1970 From: Georg Lehner Subject: Re: Open Document Exporter Date: Fri, 28 Jun 2013 23:20:00 +0200 Message-ID: <51CDFE00.7080401@magma.com.ni> References: <51C8BA2B.8010509@magma.com.ni> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Usg7N-0006nv-85 for emacs-orgmode@gnu.org; Fri, 28 Jun 2013 17:22:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Usg7I-0003pg-CP for emacs-orgmode@gnu.org; Fri, 28 Jun 2013 17:22:09 -0400 Received: from home.umim.anteris.net ([88.198.75.67]:37956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Usg7I-0002v5-3Y for emacs-orgmode@gnu.org; Fri, 28 Jun 2013 17:22:04 -0400 Received: from cpe90-146-159-28.liwest.at (HELO [192.168.173.13]) (jorge@magma.com.ni@[90.146.159.28]) (envelope-sender ) by home.umim.anteris.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 28 Jun 2013 21:41:41 -0000 In-Reply-To: <51C8BA2B.8010509@magma.com.ni> 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: emacs-orgmode@gnu.org Hello! Here comes another (tiny) patch which fixes generation of external links to relative file paths. Apparently =./Media/logo.png= has to be inserted as =href=../Media/logo.png=. At least on LibreOffice 3 and 4 anything else fails. LibreOffice always shows and uses the absolute path and prefixes the stored relative path with the path to the =.odt= file *including the filename itself*! So the =../= removes the filename and the link gets calculated correctly. Best Regards, Georg Lehner - - - --- /home/jorge/progs/org-mode/lisp/ox-odt.el +++ /home/jorge/emacs/lib/org-mode/lisp/ox-odt.el @@ -2763,7 +2780,7 @@ ((string= type "file") (if (file-name-absolute-p raw-path) (concat "file://" (expand-file-name raw-path)) - (concat "file://" raw-path))) + (concat "file:" "../" raw-path))) (t raw-path))) ;; Convert & to & for correct XML representation (path (replace-regexp-in-string "&" "&" path))