emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org-image-actual-width has no effect


From: Nick Dokos
Subject: Re: [O] org-image-actual-width has no effect
Date: Fri, 29 Aug 2014 22:54:17 -0400
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux)

Claudius Mueller <address@hidden> writes:

> Thanks for trying to help! I really appreciate that!
>
> (image-type-available-p 'imagemagick) ==> output: "t"
> org-image-actual-width ==> output: "10"
>
> I had set org-image-actual-width to 10 in the .emacs file to make sure
> I really notice the difference once the problem is solved.
>

OK - this looks correct.

Inline images work by creating an overlay on a portion of a text, and
then giving the overlay a property (a key-value pair) where the key is
'display and the value is an image. The following is a minimal example
(you'll have to change the path to the image of course to suit your
situation).

If you execute the first code block with C-c C-c, you should see the
image replacing the word "foo"; executing the second code block should
get rid of the overlay and let you see "foo" again. Changing the width
(but not too much: from 50 to 100 and back should work, but larger
overlays tend to make the buffer visually a mess because the code is not
robust enough - you can always recover by killing the buffer and
revisiting the file) and reexecuting the first code block should give
you an image with the new width:

--8<---------------cut here---------------start------------->8---
foo

















#+BEGIN_SRC emacs-lisp :results none
(setq ov (make-overlay 1 4))
(overlay-put ov 'display (create-image 
"/home/nick/src/org/inline/hello-world.png" 'imagemagick nil :width 50))
#+END_SRC


#+BEGIN_SRC emacs-lisp :results none
(delete-overlay ov)
#+END_SRC
--8<---------------cut here---------------end--------------->8---


In any case, the experiment takes org out of the picture, so if it works
by itself then there is probably a problem with your org-mode. If it
doesn't work, then there is something more basic that's busted.

-- 
Nick




reply via email to

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