bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stefan Kangas
Subject: bug#56552: [PATCH] Make gnus display webp images inline
Date: Thu, 14 Jul 2022 06:42:44 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Visuwesh <visuweshm@gmail.com> 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?

> diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
> index 8ba7f1bec3..ee72eba35d 100644
> --- a/lisp/net/mailcap.el
> +++ b/lisp/net/mailcap.el
> @@ -974,6 +974,7 @@ mailcap-mime-extensions
>      (".ai"    . "application/postscript")
>      (".jpe"   . "image/jpeg")
>      (".jpeg"  . "image/jpeg")
> +    (".webp"  . "image/webp")
>      (".org"   . "text/x-org"))
>    "An alist of file extensions and corresponding MIME content-types.
>  This exists for you to customize the information in Lisp.  It is

This part LGTM.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]