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: Claudius Mueller
Subject: Re: [O] org-image-actual-width has no effect
Date: Sun, 31 Aug 2014 09:02:39 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

I got it to work! Thanks to Nick's code pointing to org-mode as the culprit, I re-installed org on top of a fresh compile of emacs (24.3.1). Using the org version that came with the freshly compiled emacs, inline images did not scale. Installing the latest version of org (8.2.7c) and org-plus-contrib on top of the fresh emacs compile (via emacs packaging system) did the trick.

Thank you for your help!!!

Claudius

On 08/29/2014 10:54 PM, Nick Dokos wrote:
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.





reply via email to

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