From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cecilio Pardo Newsgroups: gmane.emacs.bugs Subject: bug#74044: 31.0.50; yank-media filters out svg files Date: Sun, 27 Oct 2024 14:45:45 +0100 Message-ID: References: <96eb0190-797f-4749-9575-ec145f8b06bb@imayhem.com> <86sesh92gh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------NmyjbczHe6QY0t13uk9VXhXF" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12933"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 74044@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 27 14:46:48 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t53bT-0003FQ-Im for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Oct 2024 14:46:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t53bA-0001Gx-SN; Sun, 27 Oct 2024 09:46:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t53b9-0001Gi-MT for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 09:46:27 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t53b9-0000yZ-Do for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 09:46:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=eabHq6kS/YIirPr7IIzzf2j/WRwpn59FKcVVueUfRSo=; b=Ib6bVw8ZniZTm8ED4sbW/05tcpUundcyw4qFdpM5T5D+vwWthXUMnRYimVH47zQ79sZ7iFlPSLj6zb60qW8wla4sTjcGpEqtFL8bANoHOJHy4ctcOX1/RzUCF8zpL4Dn5e4rCLhddBPoKz7xaw4VQsaIxmKoLQb+7pFrABXDeR94Jg6i7brI1qyjJ95ET63sUTMLWfvvYdGFuRl/727/+3GcAWnETEDSy1ueR0hBFz/2LxwVd2pl4FF4fricCEcdXOAB7BJd5L5eC+KCrMV43DOcO4cMDmpAsdN5TASov9V/Df2uk826Gfp0MfgJg5JXih/VNcVHRIhvkOaeu07f/w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t53bi-0007MX-4c for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 09:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Cecilio Pardo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2024 13:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74044 X-GNU-PR-Package: emacs Original-Received: via spool by 74044-submit@debbugs.gnu.org id=B74044.173003678928236 (code B ref 74044); Sun, 27 Oct 2024 13:47:02 +0000 Original-Received: (at 74044) by debbugs.gnu.org; 27 Oct 2024 13:46:29 +0000 Original-Received: from localhost ([127.0.0.1]:44325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t53bA-0007LL-FK for submit@debbugs.gnu.org; Sun, 27 Oct 2024 09:46:28 -0400 Original-Received: from mail.imayhem.com ([82.223.54.191]:36077 helo=zealous-pike.82-223-54-191.plesk.page) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t53b8-0007L7-An for 74044@debbugs.gnu.org; Sun, 27 Oct 2024 09:46:26 -0400 Original-Received: from [192.168.68.104] (111.red-88-21-7.staticip.rima-tde.net [88.21.7.111]) by zealous-pike.82-223-54-191.plesk.page (Postfix) with ESMTPSA id E015A80421; Sun, 27 Oct 2024 13:45:45 +0000 (UTC) Authentication-Results: zealous-pike.82-223-54-191.plesk.page; spf=pass (sender IP is 88.21.7.111) smtp.mailfrom=cpardo@imayhem.com smtp.helo=[192.168.68.104] Received-SPF: pass (zealous-pike.82-223-54-191.plesk.page: connection is authenticated) Content-Language: es-ES In-Reply-To: <86sesh92gh.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294360 Archived-At: This is a multi-part message in MIME format. --------------NmyjbczHe6QY0t13uk9VXhXF Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 27/10/2024 13:04, Eli Zaretskii wrote: >> yank-media filters out image formats that are not supported by emacs. >> >> To do that is passes the second part of the mime type (png, jpeg, etc.) >> to (image-type-available-p). This is ok for other image types, but not >> for SVG, because its mime type is image/svg+xml. For example, InkScape >> (a free vector drawing program) uses image/svg+xml to copy vector data >> into the clipbard. >> >> This patch fixes that filtering. Also changes the function >> mailcap-mime-type-to-extension, used by org-mode to choose an extension >> for the file it saves. It nees to be svg, not svg+xml. > > Please add comments that explain why we treat svg+xml spercially. Patch attached. Thank you. --------------NmyjbczHe6QY0t13uk9VXhXF Content-Type: text/plain; charset=UTF-8; name="0001-Fix-yank-media-to-allow-SVG-files.patch" Content-Disposition: attachment; filename="0001-Fix-yank-media-to-allow-SVG-files.patch" Content-Transfer-Encoding: base64 RnJvbSBiZDFmMzAyOTFiYzMzMmNjNjVkZWNmZjVjNzY2YzgxNDU3ZTJkMGQ4IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBDZWNpbGlvIFBhcmRvIDxjcGFyZG9AaW1heWhlbS5j b20+CkRhdGU6IFN1biwgMjcgT2N0IDIwMjQgMTQ6Mzk6MzQgKzAxMDAKU3ViamVjdDogW1BB VENIXSBGaXggeWFuayBtZWRpYSB0byBhbGxvdyBTVkcgZmlsZXMuCgoqIGxpc3AvbmV0L21h aWxjYXAuZWwgKG1haWxjYXAtbWltZS10eXBlLXRvLWV4dGVuc2lvbik6IFJldHVybiAic3Zn Igpmb3IgbWltZSB0eXBlIGltYWdlL3N2Zyt4bWwuIE9yZy1tb2RlIHVzZXMgdGhpcy4KKiBs aXNwL3lhbmstbWVkaWEuZWwgKHlhbmstbWVkaWEtLWZpbmQtbWF0Y2hpbmctbWVkaWEpOiBJ ZiBzdmcgaXMKc3VwcG9ydGVkLCBkb24ndCBmaWx0ZXIgb3V0IGltYWdlL3N2Zyt4bWwKLS0t CiBsaXNwL25ldC9tYWlsY2FwLmVsIHwgMTUgKysrKysrKysrKystLS0tCiBsaXNwL3lhbmst bWVkaWEuZWwgIHwgIDcgKysrKysrLQogMiBmaWxlcyBjaGFuZ2VkLCAxNyBpbnNlcnRpb25z KCspLCA1IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2xpc3AvbmV0L21haWxjYXAuZWwg Yi9saXNwL25ldC9tYWlsY2FwLmVsCmluZGV4IDNlODQ3Yzc1OGMyLi5kM2NhODk5MjE2YSAx MDA2NDQKLS0tIGEvbGlzcC9uZXQvbWFpbGNhcC5lbAorKysgYi9saXNwL25ldC9tYWlsY2Fw LmVsCkBAIC0xMDg0LDEwICsxMDg0LDE3IEBAIG1haWxjYXAtZmlsZS1uYW1lLXRvLW1pbWUt dHlwZQogKGRlZnVuIG1haWxjYXAtbWltZS10eXBlLXRvLWV4dGVuc2lvbiAobWltZS10eXBl KQogICAiUmV0dXJuIGEgZmlsZSBuYW1lIGV4dGVuc2lvbiBiYXNlZCBvbiBhIE1JTUUtVFlQ RS4KIEZvciBpbnN0YW5jZSwgYGltYWdlL3BuZycgd2lsbCByZXN1bHQgaW4gYHBuZycuIgot ICAoaW50ZXJuIChjYWRyIChzcGxpdC1zdHJpbmcgKGlmIChzeW1ib2xwIG1pbWUtdHlwZSkK LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc3ltYm9sLW5hbWUgbWltZS10 eXBlKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW1lLXR5cGUpCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAiLyIpKSkpCisgIChpbnRlcm4KKyAgIChsZXQg KChlIChjYWRyIChzcGxpdC1zdHJpbmcgKGlmIChzeW1ib2xwIG1pbWUtdHlwZSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzeW1ib2wtbmFtZSBtaW1lLXR5cGUp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWltZS10eXBlKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAiLyIpKSkpCisgICAgIDs7IFVzdWFsbHksIHRo ZSBub3JtYWwgZXh0ZW5zaW9uIGlzIHRoZSBzYW1lIGFzIHRoZSBNSU1FIHN1YnR5cGUuCisg ICAgIDs7IEJ1dCBmb3IgU1ZHIGZpbGVzLCB0aGUgZXh0ZW5zaW9uIGlzICJzdmciIGFuZCB0 aGUgTUlNRSB0eXBlIGlzCisgICAgIDs7ICJzdmcreG1sIi4KKyAgICAgKGlmIChzdHJpbmc9 IGUgInN2Zyt4bW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KKyAgICAgICAgICAgICAgICAgICAgICAoaW50 ZXJuIChpZiAoc3RyaW5nPSBtaW5vciAic3ZnK3htbCIpICJzdmciIG1pbm9yKSkpKSkKICAg ICAgICAgICAgOzsgSnVzdCBmaWx0ZXIgb3V0IGFsbCB0aGUgaW1hZ2UgdHlwZXMgdGhhdCBF bWFjcyBkb2Vzbid0CiAgICAgICAgICAgIDs7IHN1cHBvcnQsIGJlY2F1c2UgdGhlIGNsaXBi b2FyZCBpcyBmdWxsIG9mIHRoaW5ncyBsaWtlCiAgICAgICAgICAgIDs7IGBpbWFnZS94LXdp bi1iaXRtYXAnLgotLSAKMi4zNS4xLndpbmRvd3MuMgoK --------------NmyjbczHe6QY0t13uk9VXhXF--