geiser-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Geiser-users] Showing images in windows


From: Michael Wilber
Subject: Re: [Geiser-users] Showing images in windows
Date: Mon, 10 Dec 2012 11:36:24 -0700
User-agent: Notmuch/0.14 (http://notmuchmail.org) Emacs/24.1.1 (i686-pc-linux-gnu)

It could be that you've quoted the string funny. Does this work?

(insert-image (create-image "c:\\temp\\img.png"))

Note the double backslashes.

Gustav Wikström <address@hidden> writes:
> Hi Jose!
>
> No, emacs don't understand the path with backslashes unfortunately. I tried
> it with (insert-image (create-image "c:\temp\img.png")) but no luck (unless
> I turned the slashes around!). Tried it both "vanilla" (with the -q flag)
> and with my custom initialization.
>
> But my root is not polluted, that was just a simple example to illustrate
> the difference. So no worries there!
>
> Regards
> Gustav
>
>
> On Mon, Dec 10, 2012 at 6:20 PM, Jose A. Ortega Ruiz <address@hidden> wrote:
>
>>
>> Hi,
>>
>> On Mon, Dec 10 2012, Gustav Wikström wrote:
>>
>> > Hi!
>> >
>> > I've been trying to get the image-functionality to work with geiser
>> > and Racket. On windows. The dll's are downloaded and images work in
>> > general. Just not in geiser.
>> >
>> > Trying to debug a bit I realize the problem is with the image pattern
>> > that is scanned in geiser-image--replace-images. Not necessarily in
>> > that function, but in the function that creates the string to be
>> > parsed..
>>
>> If you can see image files being created in C:\, please try replacing
>> line 93 in geiser-image.el (you can open it quickly with M-x
>> find-library RET geiser-image RET) by:
>>
>>         (while (re-search-forward "\"?#<Image:
>> \\([-+.\\\\/_0-9a-zA-Z]+\\)>\"?" nil t)
>>
>> (there's just a change in the regular expression recognizing where
>> images need to be inserted): i think it's actually a bug in that
>> very function.
>>
>> > On my system the string is generated with "\" instead of "/" between
>> > folders.
>> >
>> > Eg.
>> > c:\image.png
>> >
>> > instead of
>> > c:/image.png
>> >
>> > Emacs cannot handle that (at least not my emacs!).
>>
>> Unless i'm mistaken, it's not Emacs, but Geiser's
>> geiser-imag--replace-images who cannot cope :) Let's see if the above
>> fix is really a fix, if you can try.
>>
>> >
>> > I haven't found the function generating the image-string, but maybe
>> > that is Racket-specific? Anyhow, is there anyone in here who knows how
>> > to "fix" this - if it needs to be fixed - or can give me some advice
>> > on how to configure this if it is a user-based error by me?
>>
>> Even if the above fixes the problem, you might want to change the
>> customizable variable geiser-image-cache-dir to a path of your liking.
>> If you then restart the REPL with this variable set, Geiser will tell
>> Racket to use that directory to store cached image files, instead of
>> polluting your root directory.
>>
>> Hope this helps,
>> jao
>> --
>> One reason that life is complex is that it has a real part and an
>> imaginary part.
>>  -Andrew Koenig
>>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]