summaryrefslogtreecommitdiff
path: root/lisp/doc-view.el
diff options
context:
space:
mode:
authorTassilo Horn <tsdh@gnu.org>2013-02-12 11:52:47 +0100
committerTassilo Horn <tsdh@gnu.org>2013-02-12 11:52:47 +0100
commit62c0e84768a8f83c7c7ce1e9401a04e68a98c226 (patch)
tree5860a0a7d00acc2694e856425fb91437f4526e37 /lisp/doc-view.el
parent0b244335656c7f425b139cc8bad7f26cb749d0e1 (diff)
downloademacs-62c0e84768a8f83c7c7ce1e9401a04e68a98c226.tar.gz
* doc-view.el (doc-view-odf->pdf-converter-soffice): Use separate
UserInstallation when calling soffice to work around LibreOffice bug 37531.
Diffstat (limited to 'lisp/doc-view.el')
-rw-r--r--lisp/doc-view.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index edd59a7b518..da0b728ce91 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -940,8 +940,20 @@ is named like ODF with the extension turned to pdf."
The converted PDF is put into the current cache directory, and it
is named like ODF with the extension turned to pdf."
(doc-view-start-process "odf->pdf" doc-view-odf->pdf-converter-program
- (list "--headless" "--convert-to" "pdf"
- "--outdir" (doc-view-current-cache-dir) odf)
+ (list
+ ;; 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.
+ (concat "-env:UserInstallation=file://"
+ (expand-file-name (format "libreoffice-docview%d" (user-uid))
+ temporary-file-directory))
+ "--headless" "--convert-to" "pdf"
+ "--outdir" (doc-view-current-cache-dir) odf)
callback))
(defun doc-view-pdf/ps->png (pdf-ps png)