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 11:38:14 +0100 Message-ID: <96eb0190-797f-4749-9575-ec145f8b06bb@imayhem.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------r8Sc811i0qcWy4l1VIPdSPFO" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37492"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 74044@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 27 11:39:06 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 1t50fp-0009VT-HG for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Oct 2024 11:39:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t50fM-00057e-QC; Sun, 27 Oct 2024 06:38:36 -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 1t50fE-00056r-2M for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 06:38:29 -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 1t50fD-0005Bm-Q9 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 06:38:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=From:MIME-Version:Date:To:Subject; bh=qQOUMvb6uA3eFE+TJK6j3Rq7C6uw/k/qh9e7QKO739s=; b=JSm4NQgkrwTce2faFOmS1asm/nZDddB7CFuRymgWueXZNDUO1eZphyGQclQpsVKdpMeiSWkiE+GTtbLPTiLYjq1c0P9POlcNaNubJVSmMrXVccvCSPIezqNCgsfv17HRvzzIt5tePTPB1wN+IWz8iMse71Wg4Bt7JVNKihRb4sCVq047echE5iEKvw00xIX3ws4+3vA9o0IcnbMG5NHZOlpSdzC8ul1NqKlfPZ84diUcDK9pr/TDN9nXgLixD9BhYyJtQ+lCmml+o63ZKY/BxvDvqEswjIadILHkFf6fyBAtq/EiMmpvrEznqIeVsWb+4ZjWYZzEuCKQHWiNrQoQIw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t50fm-0006gG-8n for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 06:39: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 10:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74044 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173002553925665 (code B ref -1); Sun, 27 Oct 2024 10:39:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Oct 2024 10:38:59 +0000 Original-Received: from localhost ([127.0.0.1]:43968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t50fj-0006ft-Er for submit@debbugs.gnu.org; Sun, 27 Oct 2024 06:38:59 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:36468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t50ff-0006fg-4B for submit@debbugs.gnu.org; Sun, 27 Oct 2024 06:38:55 -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 1t50f5-00055n-RE for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 06:38:19 -0400 Original-Received: from mail.imayhem.com ([82.223.54.191] helo=zealous-pike.82-223-54-191.plesk.page) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t50f3-0005Ag-GV for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 06:38:19 -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 67F6380421 for ; Sun, 27 Oct 2024 10:38:15 +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 Received-SPF: pass client-ip=82.223.54.191; envelope-from=cpardo@imayhem.com; helo=zealous-pike.82-223-54-191.plesk.page X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:294330 Archived-At: This is a multi-part message in MIME format. --------------r8Sc811i0qcWy4l1VIPdSPFO Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------r8Sc811i0qcWy4l1VIPdSPFO 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 RnJvbSA1NTY0YTY3ZTI4OTlkNTA3YjBkMzVlOWVhZjcwNTNhZDljM2YwMDI0IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBDZWNpbGlvIFBhcmRvIDxjcGFyZG9AaW1heWhlbS5j b20+CkRhdGU6IFN1biwgMjcgT2N0IDIwMjQgMTE6MDI6NDUgKzAxMDAKU3ViamVjdDogW1BB VENIXSBGaXggeWFuayBtZWRpYSB0byBhbGxvdyBTVkcgZmlsZXMuCgoqIGxpc3AvbmV0L21h aWxjYXAuZWwgKG1haWxjYXAtbWltZS10eXBlLXRvLWV4dGVuc2lvbik6IFJldHVybiAic3Zn Igpmb3IgbWltZSB0eXBlIGltYWdlL3N2Zyt4bWwuIE9yZy1tb2RlIHVzZXMgdGhpcy4KKiBs aXNwL3lhbmstbWVkaWEuZWwgKHlhbmstbW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bWltZS10eXBlKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKHN5bWJvbC1uYW1lIG1pbWUtdHlwZSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW1lLXR5cGUpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICIvIikpKSkKKyAgICAgKGlmIChzdHJpbmc9IGUgInN2Zyt4 bWwiKQorICAgICAgICAgInN2ZyIKKyAgICAgICBlKSkpKQogCiAoZGVmdW4gbWFpbGNhcC1t aW1lLXR5cGVzICgpCiAgICJSZXR1cm4gYSBsaXN0IG9mIE1JTUUgbWVkaWEgdHlwZXMuIgpk aWZmIC0tZ2l0IGEvbGlzcC95YW5rLW1lZGlhLmVsIGIvbGlzcC95YW5rLW1lZGlhLmVsCmlu ZGV4IDY2NTViYjcwNWVmLi5jZmM4ODhlOWY3ZiAxMDA2NDQKLS0tIGEvbGlzcC95YW5rLW1l ZGlhLmVsCisrKyBiL2xpc3AveWFuay1tZWRpYS5lbApAQCAtNjcsNyArNjcsOCBAQCB5YW5r LW1lZGlhLS1maW5kLW1hdGNoaW5nLW1lZGlhCiAgICAobGFtYmRhICh0eXBlKQogICAgICAo cGNhc2UtbGV0ICgoYCgsbWFqb3IgLG1pbm9yKSAoc3BsaXQtc3RyaW5nIChzeW1ib2wtbmFt ZSB0eXBlKSAiLyIpKSkKICAgICAgICAoaWYgKGFuZCAoZXF1YWwgbWFqb3IgImltYWdlIikK LSAgICAgICAgICAgICAgICAobm90IChpbWFnZS10eXBlLWF2YWlsYWJsZS1wIChpbnRlcm4g bWlub3IpKSkpCisgICAgICAgICAgICAgICAgKG5vdCAoaW1hZ2UtdHlwZS1hdmFpbGFibGUt cAorICAgICAgICAgICAgICAgICAgICAgIChpbnRlcm4gKGlmIChzdHJpbmc9IG1pbm9yICJz dmcreG1sIikgInN2ZyIgbWlub3IpKSkpKQogICAgICAgICAgICA7OyBKdXN0IGZpbHRlciBv dXQgYWxsIHRoZ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