From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.orgmode,gmane.emacs.bugs Subject: Re: Extending ODT export Date: Wed, 22 May 2013 14:06:34 +0530 Message-ID: <87wqqrfm25.fsf@gmail.com> References: <162AA118-3C0D-4E3D-BA96-90CBB47003A0@ieee.org> <969F330B-BF74-4C3F-A166-13BE3DFF2EF6@ieee.org> <878v3q7xpi.fsf@med.uni-goettingen.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369211845 25000 80.91.229.3 (22 May 2013 08:37:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 May 2013 08:37:25 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org To: Andreas Leha Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Wed May 22 10:37:25 2013 Return-path: Envelope-to: geo-emacs-orgmode@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uf4Xz-0004qc-SN for geo-emacs-orgmode@m.gmane.org; Wed, 22 May 2013 10:37:23 +0200 Original-Received: from localhost ([::1]:55315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf4Xz-0007lV-8V for geo-emacs-orgmode@m.gmane.org; Wed, 22 May 2013 04:37:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf4Xf-0007T7-Qp for emacs-orgmode@gnu.org; Wed, 22 May 2013 04:37:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf4XZ-0000pg-AE for emacs-orgmode@gnu.org; Wed, 22 May 2013 04:37:03 -0400 Original-Received: from mail-pa0-f51.google.com ([209.85.220.51]:39719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf4XP-0000o7-08; Wed, 22 May 2013 04:36:47 -0400 Original-Received: by mail-pa0-f51.google.com with SMTP id lf10so543830pab.38 for ; Wed, 22 May 2013 01:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=cqTfywVsce01Po8KGpCaEc8GNHqWA6pHSZ1TUeRrfZY=; b=wK5GoGqxLdKCzOQM1/8nUdeP0vML9/S6y8r67N+J2QoQfsuqvSFqrbrgpILj6tublS DKT1yQNy3xDmS6I2/KhStrqZzHpP3PcTQMChehRxJ6kElD1aCZS88XEBf9RZDwkF4SGR M9iyOHR5BrxLTA+1pBRMXH0ATxH1Vbl9iQdhaQ99pqaTpk1BHItZ3AQ2zANHzZKAbDWr MsItUWKvjxzwlkCli+kDPe6TZDlQO8rPvB3Ppik8RvRGETP0Gt27+/Nbzl7W8zDnITLK Fz6W7FHxRE5LCewE0GLZWUg+jtmH6WRH9h2+KNrdFoVFDF/KuV0b/LG3VmbqOBiGCpyF olFA== X-Received: by 10.68.130.167 with SMTP id of7mr6812977pbb.169.1369211806092; Wed, 22 May 2013 01:36:46 -0700 (PDT) Original-Received: from debian-6.05 ([101.63.165.74]) by mx.google.com with ESMTPSA id l4sm6397183pbo.6.2013.05.22.01.36.42 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 22 May 2013 01:36:45 -0700 (PDT) In-Reply-To: <878v3q7xpi.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Wed, 08 May 2013 09:11:21 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.51 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.14 Precedence: list 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 Original-Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.orgmode:72494 gmane.emacs.bugs:74448 Archived-At: doc-view (for OpenDocument files) uses the below mentioned work around. The fix can be ported to `org-odt.el' and `ox-odt.el'. --8<---------------cut here---------------start------------->8--- (defun doc-view-odf->pdf-converter-soffice (odf callback) "Convert ODF to PDF asynchronously and call CALLBACK when finished. The converted PDF is put into the current cache directory, and it is named like ODF with the extension turned to pdf." ;; FIXME: soffice doesn't work when there's another running ;; LibreOffice instance, in which case it returns success without ;; actually doing anything. See LibreOffice bug ;; https://bugs.freedesktop.org/show_bug.cgi?id=37531. A workaround ;; is to start soffice with a separate UserInstallation directory. (let ((tmp-user-install-dir (make-temp-file "libreoffice-docview" t))) (doc-view-start-process "odf->pdf" doc-view-odf->pdf-converter-program (list (concat "-env:UserInstallation=file://" tmp-user-install-dir) "--headless" "--convert-to" "pdf" "--outdir" (doc-view-current-cache-dir) odf) (lambda () (delete-directory tmp-user-install-dir t) (funcall callback))))) --8<---------------cut here---------------end--------------->8--- Andreas Leha writes: > I had problems to use LibreOffice to convert a *already open* document. So, > if you are viewing the doc in LibreOffice while you try your export, you > might run into problems. > > This is a reported bug in LibreOffice. The suggested work-around is to > use a temporary profile as in: > libreoffice "-env:UserInstallation=file:///tmp/LibO_Conversion" > --headless --invisible --convert-to txt:text "$FILENAME" >/dev/null > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > You might try to add that to the conversion command and see whether it > helps.