Subject: Re: bug#70093: Remove unnecessary `image-tests--map-equal'

From: Joseph Turner <[email-masked]>
Date: Mon, 03 Mar 2025 09:09:50 -0800

David Ponce <[email-masked]> writes:

> On 2025-03-02 20:37, Joseph Turner wrote:
>> David Ponce <[email-masked]> writes:
>>
>>> On 2025-03-02 05:52, Joseph Turner wrote:
>>>> Stefan Kangas <[email-masked]> writes:
>>>>
>>>>> Eli Zaretskii <[email-masked]> writes:
>>>>>
>>>>>>> Was this patch installed?
>>>>>>
>>>>>> No.
>>>>>>
>>>>>>> Should it be?
>>>>>>
>>>>>> I'm not sure, and I said so in the discussion.
>>>>>
>>>>> Now I see that there were some issues with the patch reported by David
>>>>> Ponce, but I see no followup to his last message from Joseph.
>>>>>
>>>>> Joseph, do you still consider this patch a good idea?
>>>> Yes.  The stricter tests which I propose in the patch all pass on my
>>>> machine.  David, are you able to reproduce this issue with emacs -Q?
>>>> Thank you!
>>>> Joseph
>>>
>>> Here here are the results of running image map tests with emacs -Q
>> [...]
>> Thank you!  In this case, I suppose we should not apply this patch
>> until
>> we figure out why the generated image map varies on some machines.
>> Joseph
>
> Hello,
>
> I am still trying to understand why the the rotated-map and
> flipped-map cases in `image--compute-map-and-original-map' test fails
> for me.
>
> I wrote the function `svg-draw-image-map' (see below) to draw in SVG
> an image map, in order to help visualize image maps (maybe a such
> function could be useful to "kind of debug" image maps?).
>
> I also adapted the code from `image--compute-map-and-original-map'
> to be evaluated in the *scratch* buffer, in order to show computed
> and reference image maps.
>
> And, for me this reveals that the reference maps `flipped-map' and
> `rotated-map' are not as expected, contrary to the corresponding
> result of `image--compute-map' which looks as expected.  This explains
> why these test case are failing for me.  But I still can't explain
> why the same test cases passes for you?
>
> Maybe could you try the code below to see if it help clarify this?

[...]

The original-map generation logic is only on Emacs 30, not Emacs 29, so
I'll test this after upgrading to Emacs 30 (on the main Guix channel).

Thank you!

Joseph