GNU bug report logs - #13622
24.3.50; doc-view: Use (and prefer) soffice as default ODF->PDF converter

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Sun, 3 Feb 2013 19:04:02 UTC

Severity: wishlist

Found in version 24.3.50

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 13622 <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 13622 <at> debbugs.gnu.org
Subject: Re: bug#13622: 24.3.50;
	doc-view: Use (and prefer) soffice as default ODF->PDF converter
Date: Tue, 05 Feb 2013 16:23:56 +0530
Glenn Morris <rgm <at> gnu.org> writes:

> Jambunathan K wrote:
>
>> I am attaching a patch.  Please apply to trunk.
>
> Some explanation as to why would be nice.

One is likely to have LibreOffice installed rather than unoconv.
Getting unoconv on non-Linux platforms could be cumbersome.

>
>> +(defcustom doc-view-odf->pdf-converter-program
>> +  (cond
>> +   ((executable-find "soffice") "soffice")
>> +   ((executable-find "unoconv") "unoconv"))
>
> This could end up being nil, which would give a type mismatch with 'file.
>
>>    :type 'file

What would you suggest?  Use `choice'?

>>  
>> +(defcustom doc-view-odf->pdf-converter-function
>> +  (cond
>> +   ((string-match "unoconv\\'" doc-view-odf->pdf-converter-program)
>> +    #'doc-view-odf->pdf-converter-unoconv)
>> +   ((string-match "soffice\\'" doc-view-odf->pdf-converter-program)
>> +    #'doc-view-odf->pdf-converter-soffice))
>> +  "Function to call to convert a ODF file into a PDF file."
>> +  :type '(radio
>> +          (function-item doc-view-odf->pdf-converter-unoconv
>> +                         :doc "Use unoconv")
>> +          (function-item doc-view-odf->pdf-converter-soffice
>> +                         :doc "Use LibreOffice")
>> +          function)
>> +  :version "24.4")
>
> Why do you need this, as opposed to a single function which calls
> -program with a customizable -program-options argument?

I am mimicing what is done for recent mupdf changes.

    ,----
    | (defcustom doc-view-pdf->png-converter-function
    |   (if (executable-find doc-view-pdfdraw-program)
    |       #'doc-view-pdf->png-converter-mupdf
    |     #'doc-view-pdf->png-converter-ghostscript)
    |   "Function to call to convert a PDF file into a PNG file."
    |   :type '(radio
    |           (function-item doc-view-pdf->png-converter-ghostscript
    |                          :doc "Use ghostscript")
    |           (function-item doc-view-pdf->png-converter-mupdf
    |                          :doc "Use mupdf")
    |           function)
    |   :version "24.4")
    `----




This bug report was last modified 12 years and 191 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.