From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71909: 30.0.60; Date: Sat, 05 Oct 2024 22:31:47 +0300 Message-ID: <86wmimuz18.fsf@gnu.org> References: <865xtnhyn6.fsf@foxmail.com> <868qv2wwyk.fsf@gnu.org> <865xq6wwkc.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29638"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71909@debbugs.gnu.org To: Cecilio Pardo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 05 21:33:16 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 1sxAWh-0007Ug-D6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Oct 2024 21:33:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sxAWQ-0003V1-Me; Sat, 05 Oct 2024 15:32:58 -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 1sxAWP-0003Uo-Ne for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2024 15:32:58 -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 1sxAWP-0005gM-FN for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2024 15:32:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=afEJ+7srm7A05H96B2QSt8ZoUdV6C9tgIsbZze77ijM=; b=qXOWTMIthTVrjk2EOu/a++akKUnGgZ4nSIoh5B7YIV1z7aIpB6idESflwwkQF7uCg4HgYC5STXdofbmIZcr9sp938p5jpdvoPt6BEpWlFxWbnRs1ul5uTuqXzB+Vm/yq2ZFfYirABhLqJULaJkpBCnjqjXMJjDy0t19989xAbi2kViSBJFcryjoCUcdtYrhHptXwjVL9xMeFN3D/vOjltaHMHWG3NVvgkI6fX2sxrK6UQIhoNi+uzXiJD32qIutloqkLFht5z+X281I8+5K8XYIhi8LBedxSpjBmROAt8CtFn8JY86YWwPOABiqxS6TYyThoCRqh+IBf24jdVyW+sQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sxAWU-0002Go-1w for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2024 15:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Oct 2024 19:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71909 X-GNU-PR-Package: emacs Original-Received: via spool by 71909-submit@debbugs.gnu.org id=B71909.17281567268602 (code B ref 71909); Sat, 05 Oct 2024 19:33:02 +0000 Original-Received: (at 71909) by debbugs.gnu.org; 5 Oct 2024 19:32:06 +0000 Original-Received: from localhost ([127.0.0.1]:39629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxAVZ-0002Eg-KZ for submit@debbugs.gnu.org; Sat, 05 Oct 2024 15:32:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxAVW-0002E5-Is for 71909@debbugs.gnu.org; Sat, 05 Oct 2024 15:32:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sxAVL-0005Yb-NC; Sat, 05 Oct 2024 15:31:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=afEJ+7srm7A05H96B2QSt8ZoUdV6C9tgIsbZze77ijM=; b=FREHlnsfUz1b osh/WbdUQXQZvxzi8SMcEproFQGIiz/kb3W5D7iAoNIVZBZZUrHiEDaAc8JQf/9qVUFhlErruKqan pea++iSFI3nPta1GaabgV2EDkB0Q+2OvrDENeI+xkLLXrPy+8Jp17kGlwMA3mLxFOXmLiD+0PaNEy gh4XhoIF0blUW8K5v0IhjI2kMpPJ4KQykciMsPxFpgvsC3epWOSmJBqWCeXw9UJne1LAhtsUqx2ao vFrJhIK5wElghNcDg7mGfTfy2f9qHt78GENwWEGIqpVjRjcda74vr7/6XdVMYIXW39cqJUJyRw6U3 ssxf1edmscMsy4APGGsbAQ==; In-Reply-To: (message from Cecilio Pardo on Sat, 5 Oct 2024 19:14:20 +0200) 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:293050 Archived-At: > Date: Sat, 5 Oct 2024 19:14:20 +0200 > Cc: 71909@debbugs.gnu.org > From: Cecilio Pardo > > On 05/10/2024 14:42, Eli Zaretskii wrote: > > > Btw, perhaps we should discuss the implementation ideas you have > > first. I'm guessing you are going to somehow map the clipboard > > formats defined by Windows to MIME types, then I wonder what should we > > do with the virtually open-ended set of Windows clipboard formats. > > > > Or maybe you have other ideas? > > Yes, I was thinking about mapping some of the formats, and ignoring the > rest. Looking at the lisp files inside emacs, only these formats seem to > be in use: > > image/* > text/html (which is treated as text in sgml-mode) > x/special-\\(?:gnome\\|KDE\\|mate\\)-files > > So CF_BITMAP and CF_HDROP, and maybe CF_HTML would cover all. Metafiles > could be converted to bitmaps. > > As for other formats, other than offer them as application/octet-stream, > I don't know. If you invoke "M-: (gui-get-selection 'CLIPBOARD 'TARGETS) RET" after copying something to the clipboard, you will see some very weird format names there. For the standard formats, we convert them to something similar to what X Window system produces (see w32-selection-targets), but the rest are returned as-is. For example, after copying an image from Firefox, I get this as the return value of the above evaluation: [DataObject text/html HTML\ Format text/_moz_htmlinfo text/_moz_htmlcontext application/x-moz-file-promise-url application/x-moz-file-promise-dest-filename FILE_NAMES Preferred\ DropEffect application/x-moz-nativeimage DIB Ole\ Private\ Data BITMAP nil] There's no image/* here, only DIB and BITMAP (which correspond to CF_DIB and CF_BITMAP clipboard formats). There are also a lot of text/* formats, but they are all non-standard, except, perhaps, text/html. Do you have ideas how to select the proper format and how to yank the data? What do the x/special-* formats correspond to on Windows?