Subject: Re: bug#56552: [PATCH] Make gnus display webp images inline

From: Visuwesh <[email-masked]>
Date: Thu, 14 Jul 2022 19:23:18 +0530

[வியாழன் ஜூலை 14, 2022] Stefan Kangas wrote:

> Visuwesh <[email-masked]> writes:
>
>> diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
>> index 7256e5a2f7..79217d3400 100644
>> --- a/lisp/gnus/mm-decode.el
>> +++ b/lisp/gnus/mm-decode.el
>> @@ -193,7 +193,11 @@ mm-inline-media-tests
>>    `(("image/p?jpeg"
>>       mm-inline-image
>>       ,(lambda (handle)
>> -       (mm-valid-and-fit-image-p 'jpeg handle)))
>> +        (mm-valid-and-fit-image-p 'jpeg handle)))
>> +    ("image/webp"
>> +     mm-inline-image
>> +     ,(lambda (handle)
>> +       (mm-valid-and-fit-image-p 'webp handle)))
>>      ("image/png"
>>       mm-inline-image
>>       ,(lambda (handle)
>
> Maybe this comment belongs in a separate wishlist item, but why isn't
> this all using the `image-file-name-regexp' function?
>
> I'm looking at `org-display-inline-images', and it seems to me that
> org-mode didn't need any additional changes at all to get support for
> inline webp images once Emacs had it?  So would it be better if Gnus did
> things more like org-mode?

I will leave this to a Gnus expert to answer.  I arrived at that answer
after edebugging around in the relevant Gnus functions.

>> diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
>
> This part LGTM.

Thanks.