all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: 29.3: enriched text SVG images
Date: Sat, 29 Jun 2024 09:57:17 +0300	[thread overview]
Message-ID: <86r0cgjkxe.fsf@gnu.org> (raw)
In-Reply-To: <871q4gkho4.fsf@librehacker.com> (message from Christopher Howard on Fri, 28 Jun 2024 11:10:03 -0800)

> From: Christopher Howard <christopher@librehacker.com>
> 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
> 
> <x-display><param>(image :type svg :data "<svg width=\"400\" height=\"400\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <circle cx=\"200\" cy=\"200\" r=\"50\"></circle></svg>" :scale 1.7009009009009008 :transform-smoothing t)</param>circle</x-display>
> ```

What do you see in *Messages* after you visit the saved file as
described above?



  reply	other threads:[~2024-06-29  6:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28 19:10 29.3: enriched text SVG images Christopher Howard
2024-06-29  6:57 ` Eli Zaretskii [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-06 19:39 Christopher Howard
2024-07-08 14:45 Christopher Howard
2024-07-14  6:09 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86r0cgjkxe.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.