Re: Displaying SVG with embedded links

Eli Zaretskii <[email protected]>
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
> Date: Sun, 5 Apr 2026 19:06:21 +0200
> Cc: Michael Heerdegen <[email protected]>,
> 	[email protected]
> From:  <[email protected]>
> 
> > > But I would have to do that all manually, including parsing the svg
> > > file's source - right?
> > 
> > Parsing for what purpose?
> 
> I think Michael wants a hot spot for each link /whithin/ the SVG. For
> this, he needs to know where those links in the SVG are (NB: in SVG,
> you can embed <a href="...">...</a> elements, they are allowed in the
> definition, and browsers honour them)

If you mean parsing for the purpose of determining the coordinates of
the links which should be mouse-sensitive, then yes, this will need
SVG parsed.  Hopefully, the svg.el package already in Emacs could help
(not that I ever used it for this purpose).

> > What I had in mind is just adding :map to the image descriptor which
> > names the SVG file name (or SVG data, if that's how you pass the image
> > to Emacs).
> 
> I think Michael wants a more fine-grained approach; if I understand
> you correctly, the whole SVG image would be just one button, right?

No, there could be several, see the description of :map in the ELisp
manual.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.