Subject: bug#35571: bug#35696: preview-latex does not work under any Emacs themes and bug#35571: 12.1; Changing foreground breaks previews

From: David Kastrup <[email-masked]>
Date: Mon, 27 May 2019 13:16:33 +0200

Ikumi Keita <[email-masked]> writes:

> [Adding [email-masked] in To: field may result in too many
> duplicated delivery of this message, so I refrain from doing so.]
>
> Hi David and all,
>
>>>>>> David Kastrup <[email-masked]> writes:
>
>> It never was a problem for myself since my windows are black on white.
>> This code is for people who expect preview-latex to do something more
>> useful than the default on other setups.
>
> Thanks for confirmation.  I understand your point of view.
>
> Then, I'd like to ask other developers what we should do.  Some options
> which came to my mind, in no particular order, are:
>
> (1) Make `preview-pdf-color-string' just a no-op and drop the feature
> to match the foreground color of the generated image with the default
> face of emacs.

The current code is already a sledgehammer that looks like a "not again"
approach of evading yet another changed API.  Looking at the history of
the recommended replacements, I see that the Ghostscript developers
state that some of those were removed in some Ghostscript versions but
reinstated.

So it's conceivable that reverting the last change to these code lines
is all that it would take to work with current Ghostscript (at the price
of breaking _some_ older version).

Might be worth a try.

-- 
David Kastrup