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; yank-media on MS-Windows Date: Thu, 24 Oct 2024 12:43:29 +0200 Message-ID: <9df7ceb5-3dd0-4231-9729-69a183fe2c4b@imayhem.com> References: <865xtnhyn6.fsf@foxmail.com> <868qv2wwyk.fsf@gnu.org> <865xq6wwkc.fsf@gnu.org> <86wmimuz18.fsf@gnu.org> <0056b65b-5cdc-4271-b717-0acc75661c17@imayhem.com> <86o73xvkj8.fsf@gnu.org> <86o73wt997.fsf@gnu.org> <1b239275-068f-40b4-814e-dbaf9229e99f@imayhem.com> <8634l54cp4.fsf@gnu.org> <51b40c99-1104-4fbd-bf58-dde7d4c0791a@imayhem.com> <8634kmdl5b.fsf@gnu.org> <86wmhxdemu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25232"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 71909@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 24 12:45:00 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 1t3vKt-0006Nd-8S for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Oct 2024 12:44:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3vKU-0000fN-6v; Thu, 24 Oct 2024 06:44:34 -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 1t3vKS-0000f5-1S for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2024 06:44:32 -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 1t3vKR-00027r-Od for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2024 06:44:31 -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=cJhKST/x7FjGKtS7k0ycD3oAd/H31EWDo/q+56XeEoo=; b=QuCkar32w9Sdxj8OSCyeu2cTDJPWsG3mdTw5fOldmH8Qk3DxFRt57QslR+bRncRbbBCGre1vwzyQYMVy3Xzl0j9U2c96HX9ockcBX5t7+QmnVTlymhyV+BKdIGmbNWJyeteKZJRRAwuTMivpWrzHkmwxFlh9xcun6y5UhEzfdVE0K/gIKx/6TpgvS7i1kLX2uKZ1D8iguQkogxgGsX3HEuf77JZUlQzHLLHModbiW4iIP1yaN2Fk+KGQpoAAsLR00EYpSD1L/BHUl5nQY2JjceMe1GUyIGtHbSd8w0ORV+LZXRofpiB7uO4c/zPQP3RgrjuCgkJpi87ue31JHbEejQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t3vKw-0004De-6P for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2024 06:45: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: Thu, 24 Oct 2024 10:45: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.172976665316118 (code B ref 71909); Thu, 24 Oct 2024 10:45:02 +0000 Original-Received: (at 71909) by debbugs.gnu.org; 24 Oct 2024 10:44:13 +0000 Original-Received: from localhost ([127.0.0.1]:33824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3vK8-0004Bu-GV for submit@debbugs.gnu.org; Thu, 24 Oct 2024 06:44:12 -0400 Original-Received: from mail.imayhem.com ([82.223.54.191]:58737 helo=zealous-pike.82-223-54-191.plesk.page) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3vK5-0004Bc-Va for 71909@debbugs.gnu.org; Thu, 24 Oct 2024 06:44:11 -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 2AE7380185; Thu, 24 Oct 2024 10:43:30 +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: <86wmhxdemu.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:294182 Archived-At: On 24/10/2024 11:38, Eli Zaretskii wrote: >> Date: Thu, 24 Oct 2024 10:39:13 +0200 >> From: Cecilio Pardo >> >> On 24/10/2024 9:18, Eli Zaretskii wrote: >> >>> I'm not sure I follow: isn't yank-media about yanking the image into >>> the current buffer? If so, why is having a file important, let alone >>> necessary? >> >> I mean they need data in the format that would go into a file, PNG, BMP, >> etc. Not the kind of data that is a DIB. We could easily convert in to a >> BMP file, but, once we need to manipulate it, better to give a PNG. > > Maybe we need an image-save-as function, to save an image's data to a > file, then? What you describe sounds like a separate requirement. > >> org-mode stores the yanked images as attachments, saving files. >> message-mode stores the images in the message like this: >> >> <#part type="image/png" disposition=inline data-encoding=base64 raw=t> >> iVBORw0KGgoAA... >> >> That is, not a file in disk, but the data that would go into a PNG file. > > If a file is needed, writing the image data to a file will solve it > (and is a useful feature to have, regardless). > > Does yank-media produce image files on GNU/Linux, when it yanks > images? > No, yank-media calls a handler (lisp function) given by the current mode that receives raw data for the clipboard content. The content corresponds to some file format. The mode specifies which mime types it wants, and specify a handler for each one of them. If after invoking yank-media there is more that one format accepted by the mode, the user has to choose one. Org-mode saves the files to disk, message-mode embeds them in the body of the message, other modes could do differently. This behaviour is only for GNU/Linux (and other ports I guess), on Windows yank-media does nothing currently. >>> Where we have both RTF and HTML, should we perhaps use HTML and pass >>> it through shr, to produce text with faces, rather than raw HTML? >>> Once RTF handler exists, we could use that instead, but having it >>> rendered via HTML might be a useful option anyway. >> >> What mode could benefit from yanking propertized test? > > Any descendant of Text mode can use propertized text. It doesn't > _have_ to be so, but it's possible, and I think we should offer that > if we can. Then we can make Text-mode add a media handler for html-text (and hopefully tich text later), and convert it into propertized text.