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.help Subject: Re: 29.3: enriched text SVG images Date: Sat, 29 Jun 2024 09:57:17 +0300 Message-ID: <86r0cgjkxe.fsf@gnu.org> References: <871q4gkho4.fsf@librehacker.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4415"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 29 08:58:04 2024 Return-path: Envelope-to: geh-help-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 1sNS28-0000zE-Bo for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 29 Jun 2024 08:58:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNS1S-0003ex-IZ; Sat, 29 Jun 2024 02:57:22 -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 1sNS1R-0003ec-Hg for help-gnu-emacs@gnu.org; Sat, 29 Jun 2024 02:57:21 -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 1sNS1R-0002zj-9O for help-gnu-emacs@gnu.org; Sat, 29 Jun 2024 02:57:21 -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=6ICijBjqaOvT5phj10N7CBWmJDhbLpF0Hir29Vckon8=; b=YlMoKu2VHjlX AmCmGW04FNu9oKQJd2Xoju3JdHQUY4aVI3FfYnPQVG2lnP3DFMuloho2kV9aCAAGRwaFKQegTJtMW OO8oyhdL3DIX12BN7KkMnJxiqmu/DW7ylh2jyp/LnAdDZpIUEK842dc/9BplGmpaBBkPogRpoAdpQ +mzugnk90w6oxeId9fkXbDIszBz2cAJjAo1CslhszUVWOKxO+yfsOH8LzN0znnVvKWSHHhxWYxXOU EL43L5gVqRaQcp3j7myNQItPvedwM/xWqL0GOgDxI/vw45LIUw7RqSkI/wNNSGqolT9xh7Qs/VYL7 Cg1WUiQYUYGoD8QEclV8qw==; In-Reply-To: <871q4gkho4.fsf@librehacker.com> (message from Christopher Howard on Fri, 28 Jun 2024 11:10:03 -0800) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147023 Archived-At: > From: Christopher Howard > Date: Fri, 28 Jun 2024 11:10:03 -0800 > > Hi, I wanted to submit this as a bug, but lately I keep getting in trouble for submitting bugs and then realizing I read the documentation wrong... That shouldn't stop you from reporting bugs. Closing a bug that is not a bug is easy, and there's no shame in reporting a bug because you didn't know something. So please keep reporting bugs whenever you see something you think might be a bug. > When I read the documentation for enriched-mode, I get the impression it is possible to save images embedded in a text/enriched document. And indeed, I can save an SVG image in the document. But for some reason when I open the document back up, the image is not displayed correctly. I tested that this behaves the same if I use "emacs -q". > M-x find-file ~/Scratch/enriched-test.txt > M-x enriched-mode > M-x eval-express (setq svg (svg-create 400 400)) > M-x eval-express (svg-circle svg 200 200 50) > M-x eval-express (insert-image (svg-image (svg-circle (svg-create 400 400 :stroke "orange" :stroke-width 5) 200 200 50))) > [image is visible as expected] I tried to reproduce this, but I see only an empty square at this point. Are you sure you have all the steps of the recipe accurate and without mistakes? (It definitely lacks (require 'svg) at least.) When the image is displayed correctly, if you go to the image and type "M-x describe-text-properties RET", what does Emacs show in a buffer it pops up? > M-x eval-express (setq enriched-allow-eval-in-display-props t) > [kill and reopen the buffer] > > Instead of the image, I see only a small empty square. If I find-file-literally, I see that the image data is saved: > > ``` > Content-Type: text/enriched > Text-Width: 70 > > (image :type svg :data " " :scale 1.7009009009009008 :transform-smoothing t)circle > ``` What do you see in *Messages* after you visit the saved file as described above?