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#71909: 30.0.60; Date: Mon, 28 Oct 2024 22:46:36 +0100 Message-ID: <58c79a62-cd21-4ff5-8e81-a9ba3e9b2097@imayhem.com> References: <865xtnhyn6.fsf@foxmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------Q9mko74FfJCykForsU90paN6" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26901"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 71909@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 28 22:47:22 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 1t5Xa6-0006q5-Db for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Oct 2024 22:47:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5XZo-00012y-RU; Mon, 28 Oct 2024 17:47:04 -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 1t5XZm-00012p-Mt for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 17:47:02 -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 1t5XZm-0007LK-Dw for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 17:47:02 -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=EmlUDTrKYDkh/ZJ5Z2XPo95yJSMX4MG1Xi1621XPBmE=; b=tCKxjR3Egtb72sR+NhV86DjUho4OwJiWUXpNNL8OId5CgHUJDE2Wl8MCctDvUUVjGNgPihHXeH9rzWf0JU03EI9YVRUrG/35TaBB13ufjIOKh/tKzGj+HaFmO1i6VS5y/WjOZuRfLchqQd2ugqH27He4P3aU7bkiFD0eOL194Q5Zz0u58AA2vP6hNUWs6xO1i1kuwa49NBPQpAMyqzeRq5vapPq+RBq63E2MfzaZb+tSp1anLALoddLfsb2MSj6JZ5mVdIZKLhzy+2GGxelAj/KrjPGhMqBH4F/gAHRcULlFKOcILz/Lf7eh62rWs4ARszBcc2zwZ7zPEvkPjzBf0A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5XZm-0006gm-3i for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 17: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: Mon, 28 Oct 2024 21:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71909 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.173015201025690 (code B ref -1); Mon, 28 Oct 2024 21:47:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Oct 2024 21:46:50 +0000 Original-Received: from localhost ([127.0.0.1]:54945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5XZY-0006gF-Q4 for submit@debbugs.gnu.org; Mon, 28 Oct 2024 17:46:50 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:38982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5XZW-0006g7-6A for submit@debbugs.gnu.org; Mon, 28 Oct 2024 17:46:47 -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 1t5XZV-00011U-K5 for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 17:46:45 -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 1t5XZS-0007Kf-01 for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 17:46:45 -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 31FBB80104 for ; Mon, 28 Oct 2024 21:46:37 +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: 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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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:294453 Archived-At: This is a multi-part message in MIME format. --------------Q9mko74FfJCykForsU90paN6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit This patch adds support for yank-media on MS-Windows. Media is handled in some different ways: - Clipboard data that is already named as a mime-type needs no work besides returning it. For example, Krita provides copied pixels as multiple image/xxxx types, and Firefox provides html as text/html. - Other programs don't use mime types. We try to recognize some names and change then to mime types. For example, GIMP uses the name "PNG" for copied pixels. We change it to image/png. LibreOffice also uses "PNG" for images. It uses "HTML Format" for rich text and also for spreadsheet cells, and we change that to text/html. - Finally, some programs supply image data in DIBV5 format. We offer it as image/png, and convert in on the fly when requested. Firefox does this when using "Copy image". This are the tested media types: - [X] GIMP copy pixels -> image/png - [X] LibreOffice vectorial object -> image/png - [X] LibreOffice embedded image -> image/png - [X] LibreOffice rich text -> text/html - [X] LibreOffice Calc cells -> text/html - [X] Firefox copy image -> image/png (also text/html as embedded image) - [X] Firefox page text -> text/html - [X] Krita pixels -> image/png (and others) - [X] InkScape -> image/svg+xml, image/png Images can be yanked in at least org-mode, message-mode, html-mode. HTML (text/html) can be yanked in at least html-mode. SVG will not work until bug #74044 is fixed. LibreOffice offers vectorial objects as Metafiles, that could be converted to SVG. I may do that at some point. This patch does NOT include the planned functionality to yank rich text as propertized text, or to use RTF format as a source. Those are not Windows-only. It also includes a small fix in sgml-mode.el. It was mangling image files because of Windows new lines. The image conversion is done using GdiPlus functions, which are already used on w32image.c, but are static. I have splitted this file into .c and .h, to be able to reuse those definitions. The image conversion requires that native image functions are activated. Now I think this patch may have been splitted into 2 or 3 for review. Let me know if that would be better. --------------Q9mko74FfJCykForsU90paN6 Content-Type: text/plain; charset=UTF-8; name="0001-Add-support-for-yank-media-on-MS-Windows.patch" Content-Disposition: attachment; filename="0001-Add-support-for-yank-media-on-MS-Windows.patch" Content-Transfer-Encoding: base64 RnJvbSBjNmVjYjU5NDA2OGRiNjg5YzBiMzQ4YmU0ZjdjZjUzY2M0MWI1M2UwIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBDZWNpbGlvIFBhcmRvIDxjcGFyZG9AaW1heWhlbS5j b20+CkRhdGU6IE1vbiwgMjggT2N0IDIwMjQgMjI6MTg6MTMgKzAxMDAKU3ViamVjdDogW1BB VENIXSBBZGQgc3VwcG9ydCBmb3IgeWFuay1tZWRpYSBvbiBNUy1XaW5kb3dzCgpBZGRzIHRo ZSBjYXBhY2l0eSB0byBoYW5kbGUgdHlwZXMgZGlmZmVyZW50IGZyb20gc3RyaW5ncyB0byB0 aGUKY2xpcGJvYXJkIG1hbmFnZW1lbnQgZnVuY3Rpb25zIG9uIE1TLVdpbmRvd3MsIGFuZCBz b21lIGxvZ2ljIHJlcXVpcmVkIHRvCmNvbnZlcnQgbWVkaWEgdHlwZXMgbmFtZXMgYW5kIGNv bnRlbnQgdG8gYmUgd2hhdCB5YW5rLW1lZGlhIGFuZCB0aGUKbW9kZXMgdGhhdCB1c2UgaXQg ZXhwZWN0LgoKKiBsaXNwL3Rlcm0vdzMyLXdpbi5lbCAodzMyLS1zZWxlY3Rpb24tdGFyZ2V0 LXRyYW5zbGF0aW9ucyk6IE5ldwp2YXJpYWJsZSB0aGF0IGhvbGRzIHRoZSBuYW1lIHRyYW5z bGF0aW9ucyBmb3IgbWVkaWEgdHl0cGVzLgoodzMyLS10cmFuc2xhdGUtc2VsZWN0aW9uLXRh cmdldCk6IE5ldyBmdW5jdGlvbiwgdHJhbnNsYXRlIHRoZSBuYW1lIG9mIGEKbWVkaWEgdHlw ZS4KKHczMi0tdHJhbnNsYXR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mFsdWUpKSkKIAotKGRlZnVuIHczMi0tZ2V0LXNlbGVjdGlvbiAgKCZvcHRpb25hbCB0 eXBlIGRhdGEtdHlwZSkKKyhkZWZ2YXIgdzMyLS1zZWxlY3Rpb24tdGFyZ2V0LXRyYW5zbGF0 aW9ucworICAnKChQTkcgLiBpbWFnZS9wbmcpCisgICAgKERJQlY1IC4gaW1hZ2UvcG5nKQor ICAgIChIVE1MXCBGb3JtYXQgLiB0ZXh0L2h0bWwpKSkKKworKGRlZnVuIHczMi0tdHJhbnNs YXRlLXNlbGVjdGlvbi10YXJnZXQodGFyZ2V0KQorICAobGV0ICgoeGxhdCAoYXNzb2MgdGFy Z2V0IHczMi0tc2VsZWN0aW9uLXRhcmdldC10cmFuc2xhdGlvbnMpKSkKKyAgICAoaWYgeGxh dAorICAgICAgICAoY2RyIHhsYXQpCisgICAgICB0YXJnZXQpKSkKKworKGRlZnVuIHczMi0t dHJhbnNsYXRlLXJldmVyc2Utc2VsZWN0aW9uLXRhcmdldCh0YXJnZXQpCisgIChsZXQgKChy ZXQKKyAgICAgICAgIChhcHBlbmQKKyAgICAgICAgICAoY2wtbWFwY2FyICMnY2FyCisgICAg ICAgICAgICAgICAgICAgICAoY2wtcmVtb3ZlLWlmLW5vdAorICAgICAgICAgICAgICAgICAg ICAgIChsYW1iZGEgKHgpIChlcSB0YXJnZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHczMi0tdHJhbnNsYXRlLXNlbGVjdGlvbi10YXJnZXQgKGNhciB4KSkp KQorICAgICAgICAgICAgICAgICAgICAgIHczMi0tc2VsZWN0aW9uLXRhcmdldC10cmFuc2xh dGlvbnMpKQorICAgICAgICAgIChsaXN0IHRhcmdldCkpKSkKKyAgICByZXQpKQorCisKKyhk ZWZ1biB3MzItLWdldC1zZWxlY3Rpb24gKCZvcHRpb25hbCB0eXBlIGRhdGEtdHlwZSkKICAg KGNvbmQgKChhbmQgKGVxIHR5cGUgJ0NMSVBCT0FSRCkKICAgICAgICAgICAgICAgKGVxIGRh dGEtdHlwZSAnU1RSSU5HKSkKICAgICAgICAgICh3aXRoLWRlbW90ZWQtZXJyb3JzICJ3MzIt Z2V0LWNsaXBib2FyZC1kYXRhOiVTIgogICAgICAgICAgICAodzMyLWdldC1jbGlwYm9hcmQt ZGF0YSkpKQogICAgICAgICAoKGVxIGRhdGEtdHlwZSAnVEFSR0VUUykKICAgICAgICAgIChp ZiAoZXEgdHlwZSAnQ0xJUEJPQVJEKQotICAgICAgICAgICAgICh3MzItc2VsZWN0aW9uLXRh cmdldHMgdHlwZSkKKyAgICAgICAgICAgICAodmNvbmNhdAorICAgICAgICAgICAgICAoZGVs ZXRlLWR1cHMKKyAgICAgICAgICAgICAgIChzZXEtbWFwICMndzMyLS10cmFuc2xhdGUtc2Vs ZWN0aW9uLXRhcmdldAorICAgICAgICAgICAgICAgICAgICAgICAgKHczMi1zZWxlY3Rpb24t dGFyZ2V0cyB0eXBlKSkpKQogICAgICAgICAgICAoaWYgKGdldCAneC1zZWxlY3Rpb25zIChv ciB0eXBlICdQUklNQVJZKSkgJ1tTVFJJTkddKSkpCisgICAgICAgICgoZXEgdHlwZSAnQ0xJ UEJPQVJEKQorICAgICAgICAgKGxldCogKCh0bXAtZmlsZSAobWFrZS10ZW1wLWZpbGUgImVt YWNzLWNsaXBib2FyZCIpKQorICAgICAgICAgICAgICAgIChkYXRhLXR5cGVzICh3MzItLXRy YW5zbGF0ZS1yZXZlcnNlLXNlbGVjdGlvbi10YXJnZXQgZGF0YS10eXBlKSkKKyAgICAgICAg ICAgICAgICAoZGF0YSAodzMyLS1nZXQtY2xpcGJvYXJkLWRhdGEtbWVkaWEgZGF0YS10eXBl cyB0bXAtZmlsZSkpCisgICAgICAgICAgICAgICAgKHJlc3VsdCAoY29uZAorICAgICAgICAg ICAgICAgICAgICAgICAgIDs7IGRhdGEgaXMgaW4gdGhlIGZpbGUKKyAgICAgICAgICAgICAg ICAgICAgICAgICAoKGVxIGRhdGEgdCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKHdp dGgtdGVtcC1idWZmZXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2V0LWJ1ZmZl ci1tdWx0aWJ5dGUgbmlsKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpbnNlcnQt ZmlsZS1jb250ZW50cy1saXRlcmFsbHkgdG1wLWZpbGUpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGJ1ZmZlci1zdHJpbmcpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICA7 OyBkYXRhIGlzIGluIGRhdGEgdmFyCisgICAgICAgICAgICAgICAgICAgICAgICAgKChzdHJp bmdwIGRhdGEpIGRhdGEpCisgICAgICAgICAgICAgICAgICAgICAgICAgOzsgTm8gZGF0YQor ICAgICAgICAgICAgICAgICAgICAgICAgICh0IG5pbCkpKSkKKyAgICAgICAgICAgKGRlbGV0 ZS1maWxlIHRtcC1maWxlKQorICAgICAgICAgICByZXN1bHQpKQogICAgICAgICAodCAoZ2V0 ICd4LXNlbGVjdGlvbnMgKG9yIHR5cGUgJ1BSSU1BUlkpKSkpKQogCiAoZGVmdW4gdzMyLS1z ZWxlY3Rpb24tb3duZXItcCAoc2VsZWN0aW9uKQpkaWZmIC0tZ2l0IGEvbGlzcC90ZXh0bW9k ZXMvc2dtbC1tb2RlLmVsIGIvbGlzcC90ZXh0bW9kZXMvc2dtbC1tb2RlLmVsCmluZGV4IGNj ODYyOTRkZjA5Li5mYWQ3MDA4YWRjMCAxMDA2NDQKLS0tIGEvbGlzcC90ZXh0bW9kZXMvc2dt bC1tb2RlLmVsCisrKyBiL2xpc3AvdGV4dG1vZGVzL3NnbWwtbW9kZS5lbApAQCAtMjQ3Niwx MCArMjQ3Niw5IEBAIGh0bWwtbW9kZS0taW1hZ2UteWFuay1oYW5kbGVyCiAgICAgKHdoZW4g KGFuZCAoZmlsZS1leGlzdHMtcCBmaWxlKQogICAgICAgICAgICAgICAgKG5vdCA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