From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH]: Fix latex image bug in org-mime-org-buffer-htmlize Date: Tue, 14 Jun 2016 14:25:50 +0200 Message-ID: <87mvmo0xf5.fsf@saiph.selenimh> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCnPs-0002wP-Pd for emacs-orgmode@gnu.org; Tue, 14 Jun 2016 08:26:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCnPq-0005CE-Re for emacs-orgmode@gnu.org; Tue, 14 Jun 2016 08:25:59 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:59085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCnPq-0005C7-L1 for emacs-orgmode@gnu.org; Tue, 14 Jun 2016 08:25:58 -0400 In-Reply-To: (Carlo Nucera's message of "Sat, 11 Jun 2016 01:32:47 +0200") 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: Carlo Nucera Cc: emacs-orgmode@gnu.org Hello, Carlo Nucera writes: > attached is a patch that should fix a bug in the function > org-mime-org-buffer-htmlize (thanks to punchagan on irc!). > > When exporting an org buffer with a latex snippet including the org > option tex: dvipng the images were always created in /tmp/ltxpng/, but > the reported link in the htmlized buffer was the local ./ltxpng folder; > so, unless the org file to htmlize was actually in /tmp, the user got an > error saying that the image could not be found. > > This was caused by the two different ways in which the function > org-mime-replace-images is used inside of org-mime-org-buffer-htmlize > and org-mime-htmlize. > > To correct the problem, the function org-mime-replace-images doesn't > take anymore the current-file parameter (that was only used to get its > directory) and instead always creates a temporary directory using > temporary-file-directory. I amended the commit message so as to include references to the functions being modified, and applied the patch. Thank you. Regards, -- Nicolas Goaziou