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.devel Subject: Re: `M-x yank-media' Date: Sun, 07 Nov 2021 15:42:51 +0200 Message-ID: <83mtmg84kk.fsf@gnu.org> References: <877ddlt2pp.fsf@gnus.org> <837ddk9tc8.fsf@gnu.org> <878ry0kt2h.fsf@gnus.org> <83r1bs85jr.fsf@gnu.org> <87sfw8jdl1.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23653"; mail-complaints-to="usenet@ciao.gmane.io" Cc: alan@idiocy.org, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 07 14:44:55 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mjiTe-0005uU-4s for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Nov 2021 14:44:54 +0100 Original-Received: from localhost ([::1]:36954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjiTd-0001iP-0K for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Nov 2021 08:44:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjiRv-0000Gm-3H for emacs-devel@gnu.org; Sun, 07 Nov 2021 08:43:09 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44900) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjiRs-0008M9-V5; Sun, 07 Nov 2021 08:43:05 -0500 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=695ti6EvugV8zHCyD5J1dBFhVbDts3w9qaxA0rAc8Jo=; b=U/hY1vpKZ8+i vT1Vy1tTK6+MTxJxREm+wk8EL37N49gVbpH+rQJXW+Fey5N+yvepW7h7jgx7Jcg3nTBurZQp4XClu 4GBahrgRVKwUK29PcjZ3dRjKNMDwzhFlEuNkTeKUERe36OkmHGs4kgg2T0zgZqgiHv5dxMB0VDzuT iek+4p6sGkYEBCpS3+BVvla+OxihaVR9TIeZxA9amtMGaKFiQLVFccDHLZuUXIPxhfmxuNBzQmvvH QdDaPhJYijyLfbMOe00EsQ9R2rvNOlHvNHfjQuDoG15u7Mm4R+7ab+mo/Jed1SHK1vQ7vh4WuenAW QVP2M4WBVs7WgpyfBi3yHw==; Original-Received: from [87.69.77.57] (port=1121 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjiRr-0005W5-JB; Sun, 07 Nov 2021 08:43:04 -0500 In-Reply-To: <87sfw8jdl1.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 07 Nov 2021 14:32:42 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:278948 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org, Alan Third > Date: Sun, 07 Nov 2021 14:32:42 +0100 > > Eli Zaretskii writes: > > > What does this require from the clipboard to work? What are the > > assumptions? > > It's basically this on GNU/Linux: > > (gui-get-selection 'CLIPBOARD 'TARGETS) > => > [TIMESTAMP TARGETS MULTIPLE SAVE_TARGETS text/html text/_moz_htmlinfo text/_moz_htmlcontext image/png image/jpeg image/bmp image/x-bmp image/x-MS-bmp image/x-icon image/x-ico image/x-win-bitmap image/vnd\.microsoft\.icon application/ico image/ico image/icon text/ico image/tiff] > > This lists the available media types. But those are just the types. How do we fetch the stuff afterwards? > I haven't looked at Windows, but I'm guessing it has to grow a similar > set of capabilities. The TARGETS thingy is already supported, has been for a long time: (gui-get-selection 'CLIPBOARD 'TARGETS) => [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] (This is after "Copy Image" in Firefox.) But I suspect that's not all of the story. > > AFAIK, that's what "other applications" do: they paste the content > > from the clipboard regardless of the type. Fine-tuned behavior, where > > the user can select exactly what he/she wants to past and how, is then > > available from a context menu. > > Yes, but it would just be too surprising in an Emacs context, in my > opinion. Changing how something as fundamental as `C-y' works here > would potentially be extremely annoying. Let's see what others think.