From unknown Sun Aug 17 09:10:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#56552 <56552@debbugs.gnu.org> To: bug#56552 <56552@debbugs.gnu.org> Subject: Status: [PATCH] Make gnus display webp images inline Reply-To: bug#56552 <56552@debbugs.gnu.org> Date: Sun, 17 Aug 2025 16:10:12 +0000 retitle 56552 [PATCH] Make gnus display webp images inline reassign 56552 emacs submitter 56552 Visuwesh severity 56552 normal tag 56552 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 08:47:03 2022 Received: (at submit) by debbugs.gnu.org; 14 Jul 2022 12:47:03 +0000 Received: from localhost ([127.0.0.1]:36929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oByFD-0000Pq-4W for submit@debbugs.gnu.org; Thu, 14 Jul 2022 08:47:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:42898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oByFA-0000Oz-OP for submit@debbugs.gnu.org; Thu, 14 Jul 2022 08:47:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBy23-000435-Tn for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 08:33:28 -0400 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:41602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBy22-0005S6-49 for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 08:33:27 -0400 Received: by mail-pj1-x1041.google.com with SMTP id o31-20020a17090a0a2200b001ef7bd037bbso3001518pjo.0 for ; Thu, 14 Jul 2022 05:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=cGR5xa0hQRdMxo+5Dh6CeQUYSDUJk5ZbwmWybwJL0Vk=; b=ANMAAbTBK3Go7gWktx15NMFaKX7NHJpDqaloRE5AdsOlqU34QyCSRlq21+mBd8ftgL bAmRP8Wb8zCGYOuJVT8UjKUzK/+dOiVoFuyZCU9LoejcVBR3J7NeMSWqOFrCF51JxxZf u3UI36t24ZO+J1KBk7Cls9W01MhMifpmkhvwvf0xEvRIt3VUqS4rXOkF39VtVM+FaHMM VS4KYjnKiUNzPt6j4ds3XmfS8Sf1nYJS4ZPj5YmU72QVEDrPHTE425s1FyX0f934ErxB VYKFow/XK9xhunJXg7yisDB5DJW/fi5FmRYZjoIPrHHFJS0r8tb0iW/d3IRTyvDUCIuX GOsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=cGR5xa0hQRdMxo+5Dh6CeQUYSDUJk5ZbwmWybwJL0Vk=; b=FSjQn2lin8EjauYDM0uxLdWtusMF8hwn/0+zTCLydXC/7w7vxkORaCf651jKg6hJbl 6FlhReTFlBUJ3Y//Kbv1Q8lr0iCUoW4et8HLYFjStPGXzNrsTUoUhBhL7YuY9YCa1b98 7nfyYQ8hi+gg2RNpO60Zz9ggfNudfL2q2qoHUiYpRVUu1R7mH7llgsqsCKNoiwDid8+S 12gC0WdLCUpTO1uTTwM+FKd9kPkh2UpM1jRzlUbMk+HgeWqzjukOikeHvbfOh7dKizIJ xjo2OO/VxcrOFoFwCnrvaV9vDvB/E3F5T1zkr29HpqkLzxzMc2RQAf4nGZ3mn0kkmj5L RZPw== X-Gm-Message-State: AJIora/XBkplhRz8IDBOLnbd7fffVMqOzBe9mGJDwBbJQLiVyDNQoaaf s75zwvZl3FQthcvTFu9zQm5bPomIGp0= X-Google-Smtp-Source: AGRyM1vLlYsxIRJmrYYxAzrJqsHW9fDd68Bb4uDhhERY/T/TXMySs6ivGDAgxn935V4gzda2VfoKgQ== X-Received: by 2002:a17:902:8309:b0:167:9a4c:cd58 with SMTP id bd9-20020a170902830900b001679a4ccd58mr8295315plb.166.1657802004480; Thu, 14 Jul 2022 05:33:24 -0700 (PDT) Received: from localhost ([49.205.81.141]) by smtp.gmail.com with ESMTPSA id l62-20020a632541000000b004088f213f68sm1251957pgl.56.2022.07.14.05.33.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 05:33:23 -0700 (PDT) From: Visuwesh To: bug-gnu-emacs@gnu.org Subject: [PATCH] Make gnus display webp images inline Date: Thu, 14 Jul 2022 18:03:13 +0530 Message-ID: <87mtdbswl2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::1041; envelope-from=visuweshm@gmail.com; helo=mail-pj1-x1041.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tags: patch Severity: wishlist Now that Emacs has native support for display webp images, we should add a handler to display it inline. I also added image/webp to mailcap-mime-extensions since in my Debian installation, I had no entry for it in /etc/mime.types.=20=20 [ Since *.webp wasn't in that variable, nneething didn't do the Right Thing=E2=84=A2 to display webp file (it inserted the file as plain text).= ] --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Make-gnus-display-webp-images-inline.patch >From d4ed7bae076319cae3d9b0dd82ded37539f4039c Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Thu, 14 Jul 2022 17:45:31 +0530 Subject: [PATCH] Make gnus display webp images inline * lisp/gnus/mm-decode.el (mm-inline-media-tests): Add webp handler. * lisp/net/mailcap.el (mailcap-mime-extensions): Add webp mimetype. --- lisp/gnus/mm-decode.el | 6 +++++- lisp/net/mailcap.el | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) 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) 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 -- 2.35.1 --=-=-= Content-Type: text/plain In GNU Emacs 29.0.50 (build 11, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2022-07-14 built on astatine Repository revision: d37ba6f259b972aa44c66ecb76210e03a3084183 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101003 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --with-sound=alsa --with-x-toolkit=lucid --with-json --without-xaw3d --without-gconf --without-libsystemd --without-cairo' --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 09:42:52 2022 Received: (at 56552) by debbugs.gnu.org; 14 Jul 2022 13:42:52 +0000 Received: from localhost ([127.0.0.1]:37017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBz7D-0001uG-NV for submit@debbugs.gnu.org; Thu, 14 Jul 2022 09:42:52 -0400 Received: from mail-pj1-f53.google.com ([209.85.216.53]:37855) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBz7C-0001u4-MQ for 56552@debbugs.gnu.org; Thu, 14 Jul 2022 09:42:51 -0400 Received: by mail-pj1-f53.google.com with SMTP id y14-20020a17090a644e00b001ef775f7118so8713106pjm.2 for <56552@debbugs.gnu.org>; Thu, 14 Jul 2022 06:42:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=cFgoooyugwuZBooKEjby5gSPumaXwLyEoDXjlnlu754=; b=GiipFFVWjdeU/zpjLSFR8vF54GNTrVd4hB55r/ltmFZ/tyIGMmJJYCcjYtEMV3Pgwm A0qrBc72n3WaeT1WeoqI5cEqXPQnG3ZQrqyzXudv9rt57hE3R1Td3lP+jWwqoflQ+IxJ itDePBRuFPCJB8DDmNyXOlLe3O9pZAe55un95ug1WjIw72Q9XZSFK6QTgVUvZTQvQezD SvWBzmcI1c/sexJGQstg9HIzB9Tqw0n+XFpyIZSnA4vOd/JsNa64cFWRUQvbeokYxLto bj9vpy20iVBdjRuXfB9FXY+Cpq9IdmzdIko0IOTH2RFpQBBGEYgCXOdPLWiZnbD6NeV+ PWVQ== X-Gm-Message-State: AJIora9TqFX+Tx46OmiVlpLLan+31lj0Rx7xVwnHE/a5vWRiiEJcmvPp PCQIRuZO98jt9b2IrfsLgA9FzEsXfGTdzI8g7Vs= X-Google-Smtp-Source: AGRyM1sIzcubSvBdX4V6HG6Y6YpzUZ+IyN6oXnAFgYKx/ENUO4Zv0uXfyRBIfSdu/OEiy3OHExxbSp1FmLX1GV4SEW4= X-Received: by 2002:a17:903:244c:b0:16c:594b:3f4a with SMTP id l12-20020a170903244c00b0016c594b3f4amr8369305pls.145.1657806164738; Thu, 14 Jul 2022 06:42:44 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 14 Jul 2022 06:42:44 -0700 From: Stefan Kangas In-Reply-To: <87mtdbswl2.fsf@gmail.com> (Visuwesh's message of "Thu, 14 Jul 2022 18:03:13 +0530") References: <87mtdbswl2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) X-Hashcash: 1:20:220714:56552@debbugs.gnu.org::geNtU33yvhwQeCyp:00000000000000000000000000000000000000002trf MIME-Version: 1.0 Date: Thu, 14 Jul 2022 06:42:44 -0700 Message-ID: Subject: Re: bug#56552: [PATCH] Make gnus display webp images inline To: Visuwesh Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 56552 Cc: 56552@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Visuwesh 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 09:53:48 2022 Received: (at 56552) by debbugs.gnu.org; 14 Jul 2022 13:53:48 +0000 Received: from localhost ([127.0.0.1]:37029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBzHo-0002Dw-Hs for submit@debbugs.gnu.org; Thu, 14 Jul 2022 09:53:48 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBzHm-0002Di-U0 for 56552@debbugs.gnu.org; Thu, 14 Jul 2022 09:53:47 -0400 Received: by mail-pg1-f194.google.com with SMTP id s206so1616768pgs.3 for <56552@debbugs.gnu.org>; Thu, 14 Jul 2022 06:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :user-agent:mime-version:content-transfer-encoding; bh=JuBAcYKUlInBJAYxsFGRtl1o56+iNjN5L4hvjWM3+bU=; b=Espcv8U/AenK13i7KZ38xsK46ulh/Xhvk7YNtf7QsBtf4XLJQDGU7mvF5Jgzccwpip mOGtuFZL9EaMxcZ9iIK+Ri3iCyBE2Vpbm62eDIELGHWL/p5N1NRv+W9GO/DuhcZu3CE3 6hNbWLEo6Rzjhe4Mor/LBuIjzlBye00nPKvhFO2SXv/wOWPeg1BN1Wi/S97JurQOI3uu E2EvP5p5aTdXbcnkcqdrozYCs1FpzgY0qwDRHPtj9HN0zXp/t5Vg1N9utA4TFO3vruqd QHiKdor639jzN0VN8oLi/24z0NWJj7tdoMASZ0pscdmvuLHQ+WaPX4KoJDUXu1eQ2DVO 0RqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:user-agent:mime-version:content-transfer-encoding; bh=JuBAcYKUlInBJAYxsFGRtl1o56+iNjN5L4hvjWM3+bU=; b=aJ6tk2DBNvcXRYuqT+cOZ5ueeSHtqp91MqV4Vqfd8aOwvsIxnd6vL0Pw3YAaNH8+vw LVoU7N7oojxSP+seAgMN4Rxblo2NM7j1L8x/j9lGXBiGQYawyLfL/JSL68A/j+1spzC1 mePolL3T1gD90DTJsgKre/aWdW67f2rXOy1JYTIrQK6MbwmkQQKJetogoV8qHVvTQMJQ lm1I7UkS6JT5fXJMCEAbmn94TPLE2JhpzgJ2/D+9tCWu3LIKpTRlShx5UtDeH3A0KL4N MAvjfWPa4zF2IsAHCeWY2jRTWO+pR7P+v+Egz2aMG5vRnLPfG7HiQMBJa1ThZlE2yBmD it4w== X-Gm-Message-State: AJIora9u4e70yN8h4SF9jJDSTu+8YbPWp6CHGZQg6o+utJzkJqtLcgXd /ixgAqNoca4uzCPKIOPimqQ= X-Google-Smtp-Source: AGRyM1uQTBTWYvpBYku0mgzeRqULyDBoNLEKB+5irk5kXhNymxnc0Zj3c2oum7N7IZkAwX27FDYEHA== X-Received: by 2002:a63:b1e:0:b0:3fd:43d9:5354 with SMTP id 30-20020a630b1e000000b003fd43d95354mr7858527pgl.294.1657806818851; Thu, 14 Jul 2022 06:53:38 -0700 (PDT) Received: from localhost ([49.205.81.141]) by smtp.gmail.com with ESMTPSA id f1-20020a170902860100b0016bfa097927sm1455324plo.249.2022.07.14.06.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 06:53:38 -0700 (PDT) From: Visuwesh To: Stefan Kangas Subject: Re: bug#56552: [PATCH] Make gnus display webp images inline In-Reply-To: (Stefan Kangas's message of "Thu, 14 Jul 2022 06:42:44 -0700") References: <87mtdbswl2.fsf@gmail.com> Date: Thu, 14 Jul 2022 19:23:18 +0530 Message-ID: <87bktrssvl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56552 Cc: 56552@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=9C= =E0=AF=82=E0=AE=B2=E0=AF=88 14, 2022] Stefan Kangas wrote: > Visuwesh 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 13:42:24 2022 Received: (at 56552) by debbugs.gnu.org; 14 Jul 2022 17:42:24 +0000 Received: from localhost ([127.0.0.1]:38792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2r1-0002Zo-RO for submit@debbugs.gnu.org; Thu, 14 Jul 2022 13:42:24 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2qz-0002Za-RR for 56552@debbugs.gnu.org; Thu, 14 Jul 2022 13:42:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=53Ajc8OV0wxhei6Qr55hZbn63v9iAdiUWgR78QaSfo0=; b=Zh2n3CEAFFfbr/YSg/gbhcrPMk 7n/ny83GD2c4Tc/eGxTr48GAJ9B+tyQp5UhH5EgPmfLWthZQcTR2pwIE1wVgLtU8TLFDrTj0kA4XL WYZ0rX2Av3lbZKw4QnBhAbIecmZ/G+np1/TMojhI0kr5G3Ry7AC6PHElV/7MRofsGtkQ=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oC2qr-0004ol-OK; Thu, 14 Jul 2022 19:42:16 +0200 From: Lars Ingebrigtsen To: Visuwesh Subject: Re: bug#56552: [PATCH] Make gnus display webp images inline In-Reply-To: <87mtdbswl2.fsf@gmail.com> (Visuwesh's message of "Thu, 14 Jul 2022 18:03:13 +0530") References: <87mtdbswl2.fsf@gmail.com> X-Now-Playing: Heidi Berry's _Love_: "Lonely Heart" Date: Thu, 14 Jul 2022 19:42:13 +0200 Message-ID: <8735f38ubu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Visuwesh writes: > Now that Emacs has native support for display webp images, we should add > a handler to display it inline. > > I also added image/webp to mailcap-mime-extensions since in my Debian > installation, I [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56552 Cc: 56552@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Visuwesh writes: > Now that Emacs has native support for display webp images, we should add > a handler to display it inline. > > I also added image/webp to mailcap-mime-extensions since in my Debian > installation, I had no entry for it in /etc/mime.types.=20=20 > [ Since *.webp wasn't in that variable, nneething didn't do the Right > Thing=E2=84=A2 to display webp file (it inserted the file as plain text= ). ] Thanks; pushed to Emacs 29. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 13:45:03 2022 Received: (at 56552) by debbugs.gnu.org; 14 Jul 2022 17:45:03 +0000 Received: from localhost ([127.0.0.1]:38800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2ta-0002ea-Jl for submit@debbugs.gnu.org; Thu, 14 Jul 2022 13:45:03 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2tZ-0002dj-8C for 56552@debbugs.gnu.org; Thu, 14 Jul 2022 13:45:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=C4YhrWSc/wWKntAo9X2VNgym4GITZcmeIpnWY4FLwV4=; b=lTu7vR8NRFiNBVk08j8wIptE4T FGy1MUBfRDWvvptYL3U5l39LsEYb8Egyt8FcsWBxVhdiFwTkkbugVy1qyC7UkCHatN170sWxBfidX GvZLncAUpOFg/SIZHd3hV2vhr3l5YtVHr5nANV0Tjxdgkng5h8C6bRi9L3zD72z8SFpU=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oC2tQ-0004ro-Mi; Thu, 14 Jul 2022 19:44:55 +0200 From: Lars Ingebrigtsen To: Stefan Kangas Subject: Re: bug#56552: [PATCH] Make gnus display webp images inline In-Reply-To: (Stefan Kangas's message of "Thu, 14 Jul 2022 06:42:44 -0700") References: <87mtdbswl2.fsf@gmail.com> X-Now-Playing: Heidi Berry's _Love_: "Lonely Heart" Date: Thu, 14 Jul 2022 19:44:52 +0200 Message-ID: <87y1wv7fmz.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Kangas writes: >> `(("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 >> + [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56552 Cc: 56552@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Kangas writes: >> `(("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 think this code is this way for historical reasons -- different image types were handled differently at one time (I think), but they now all call `mm-valid-and-fit-image-p'. So, yes, it should all be rewritten. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 13:45:10 2022 Received: (at control) by debbugs.gnu.org; 14 Jul 2022 17:45:10 +0000 Received: from localhost ([127.0.0.1]:38803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2ti-00037U-7d for submit@debbugs.gnu.org; Thu, 14 Jul 2022 13:45:10 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2tf-0002eX-PH for control@debbugs.gnu.org; Thu, 14 Jul 2022 13:45:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wWBeS+ueAe920bRCIYIAH6VhKK4mGaC8E5roAvWPjrM=; b=J32cceP3Bv+Zis7jjqf8qu1LLb dsJEqYuVWJPlUekMDmOQKSWuZ9Uo6+LGxl8YYaQ5tQiQb+K9iYwN99YRtuY0dEVkseBgwkeiUnaoq HMCDX9+cr/Xaj8O9qejeNmVphORYNUkb4fnWbgAfvkHFgv0UKQR7mvqdNHERvGS0a0xc=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oC2tY-0004rx-7w for control@debbugs.gnu.org; Thu, 14 Jul 2022 19:45:02 +0200 Date: Thu, 14 Jul 2022 19:44:58 +0200 Message-Id: <87wncf7fmt.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #56552 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 56552 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 56552 29.1 quit From unknown Sun Aug 17 09:10:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 12 Aug 2022 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator