Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Svg mode

186 views
Skip to first unread message

Andrea Crotti

unread,
Oct 14, 2010, 12:01:00 PM10/14/10
to help-gn...@gnu.org
I wanted to try to write some svg AND I found this page
http://www.emacswiki.org/emacs/EmacsSvg

but on my system which is much more recent
GNU Emacs 23.2.1 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29) of
2010-05-09 on linc

apparently svg is not supported at all.
Maybe is not compiled in?


Oleksandr Gavenko

unread,
Oct 15, 2010, 4:31:59 AM10/15/10
to help-gn...@gnu.org
May be.

Try run

$ otool -L /path/to/emacs

to see what libs use Emacs.

But I thunk this not help. On Windows Emacs I run

$ depends runemacs

and no see any image specific libs. After run Emacs in depends.exe and open
.png file I get in log:

Loaded "LIBPNG12.DLL" at address 0x6CC40000. Successfully hooked module.
Loaded "ZLIB1.DLL" at address 0x02190000. Successfully hooked module.

And Emacs show png.

So Emacs load shared library on fly.


Andrea Crotti

unread,
Oct 15, 2010, 9:22:33 AM10/15/10
to help-gn...@gnu.org
Oleksandr Gavenko <gav...@bifit.com.ua> writes:
> May be.
>
> Try run
>
> $ otool -L /path/to/emacs
>
> to see what libs use Emacs.
>
> But I thunk this not help. On Windows Emacs I run
>
> $ depends runemacs
>
> and no see any image specific libs. After run Emacs in depends.exe and open
> .png file I get in log:
>
> Loaded "LIBPNG12.DLL" at address 0x6CC40000. Successfully hooked module.
> Loaded "ZLIB1.DLL" at address 0x02190000. Successfully hooked module.
>
> And Emacs show png.
>
> So Emacs load shared library on fly.

Mm here is very different, since it uses the OSX system if I understand
correctly

--8<---------------cut here---------------start------------->8---
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1038.29.0)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.19.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 38.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 751.21.0)
--8<---------------cut here---------------end--------------->8---


Oleksandr Gavenko

unread,
Oct 15, 2010, 10:21:47 AM10/15/10
to help-gn...@gnu.org
MS Windows:

$ strings emacs.exe | grep png
libpng12d.dll
libpng12.dll
libpng.dll
libpng13d.dll
libpng13.dll

But 'depends.exe' show that 'libpng12.dll' come from third party:

c:\opt\graphviz2.26.3\bin\LIBPNG12.DLL

Emacs from ftp.gnu.org is come only with 'libXpm.dll'.

With 'grep svg' on Windows:

$ strings emacs.exe | grep svg
librsvg-2-2.dll

I download 'librsvg-2-2.dll' from
http://ftp.gnome.org/pub/gnome/binaries/win32/librsvg/2.22/

and put it to PATH. Emacs on open .svg say:

byte-code: Cannot display image: (Invalid image type `svg')
image-type: Cannot determine image type

Linux:

$ strings `which emacs` | grep png
libpng12.so.0

For

$ strings `which emacs` | grep svg

no match. Need upgrade Emacs to 23.x from 22.2.

So try search svg string in emacs executable and install appropriate lib.


Eli Zaretskii

unread,
Oct 15, 2010, 11:20:39 AM10/15/10
to Oleksandr Gavenko, help-gn...@gnu.org
> From: Oleksandr Gavenko <gav...@bifit.com.ua>
> Date: Fri, 15 Oct 2010 17:21:47 +0300

>
> MS Windows:
>
> $ strings emacs.exe | grep png
> libpng12d.dll
> libpng12.dll
> libpng.dll
> libpng13d.dll
> libpng13.dll

This doesn't do what you think it does. In general, the mere fact
that libpng is seen in some string within a binary does not mean the
binary supports display of PNG images. For example, it could come
from a message string like "Sorry, libpng12.dll is not supported."

What you see is that Emacs knows _something_ about PNG libraries.
That something comes from image-library-alist (dynamic-library-alist,
if you are using the development sources of Emacs 24). This alist
simply says that to support PNG, Emacs needs to load one of these
dynamic libraries.

> But 'depends.exe' show that 'libpng12.dll' come from third party:
>
> c:\opt\graphviz2.26.3\bin\LIBPNG12.DLL

Emacs loads these DLLs dynamically and on demand, so `depends.exe'
will not necessarily see any dependencies, because technically Emacs
does not "depend" on them -- it can run without them.

> Emacs from ftp.gnu.org is come only with 'libXpm.dll'.

Yes, because of copyright considerations, and because without XPM
support Emacs cannot show its toolbar icons in color.

> With 'grep svg' on Windows:
>
> $ strings emacs.exe | grep svg
> librsvg-2-2.dll

See above: this doesn't mean what you think it does.

> I download 'librsvg-2-2.dll' from
> http://ftp.gnome.org/pub/gnome/binaries/win32/librsvg/2.22/
>
> and put it to PATH. Emacs on open .svg say:
>
> byte-code: Cannot display image: (Invalid image type `svg')
> image-type: Cannot determine image type

Exactly! The Emacs binary you have was not compiled with SVG support,
so it does not recognize the SVG format. The SVG DLL is loaded only
if Emacs recognizes this format, whose support is optional (and
doesn't work very well on Windows, because the SVG support DLL is not
stable enough, AFAIK).

> So try search svg string in emacs executable and install appropriate lib.

That's not guaranteed to solve the problem, as I explain above.

0 new messages