Subject: bug#72193: 31.0.50; DocView on Postscript with SVG support

From: Tassilo Horn <[email-masked]>
Date: Sat, 20 Jul 2024 22:27:03 +0200

Eli Zaretskii <[email-masked]> writes:

Hi Manuel & Eli,

>> Looking for pages into the cache with `doc-view-dired-cache', it
>> seems that DocView has produced PNG content into files with "svg"
>> extension.  Emacs then tries to display SVG images with PNG content
>> and, obviously, failed.
>> 
>> The following patch fixes the issue for me but maybe there is more than
>> meets the eye:
>> 
>> diff --git a/lisp/doc-view.el b/lisp/doc-view.el
>> index f96b1bad886..e3539f8f886 100644
>> --- a/lisp/doc-view.el
>> +++ b/lisp/doc-view.el
>> @@ -2151,6 +2151,7 @@ doc-view-set-up-single-converter
>>    (pcase-let ((`(,conv-function ,type ,extension)
>>                 (pcase doc-view-doc-type
>>                   ('djvu (list #'doc-view-djvu->tiff-converter-ddjvu 'tiff "tif"))
>> +                 ((or 'ps 'postscript 'eps) (list #'doc-view-ps->png-converter-ghostscript 'png "png"))
>>                   (_ (if (and (eq doc-view-pdf->png-converter-function
>>                                   #'doc-view-pdf->png-converter-mupdf)
>>                               doc-view-mupdf-use-svg)
>
> Tassilo, any comments or suggestions?

The patch is absolutely correct.  That's been an oversight, I think.
Thanks Manuel!

Bye,
  Tassilo