From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-image-actual-width has no effect Date: Fri, 29 Aug 2014 22:54:17 -0400 Message-ID: <87k35qwuue.fsf@alphaville.dokosmarshall.org> References: <53FFB9F8.1080605@gmail.com> <87bnr4jhrm.fsf@karnak.MagnumOpus.khem> <54008482.8040906@gmail.com> <87r3zzwe4f.fsf@alphaville.dokosmarshall.org> <5400EA36.2000609@gmail.com> <87k35rc4nx.fsf@alphaville.bos.redhat.com> <540103C1.8070702@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNYoQ-0003Tv-Ko for emacs-orgmode@gnu.org; Fri, 29 Aug 2014 22:54:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNYoE-0004F1-Lw for emacs-orgmode@gnu.org; Fri, 29 Aug 2014 22:54:46 -0400 Received: from plane.gmane.org ([80.91.229.3]:51108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNYoE-0004Ei-FP for emacs-orgmode@gnu.org; Fri, 29 Aug 2014 22:54:34 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XNYoB-00076Y-ON for emacs-orgmode@gnu.org; Sat, 30 Aug 2014 04:54:31 +0200 Received: from pool-108-20-41-17.bstnma.fios.verizon.net ([108.20.41.17]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 30 Aug 2014 04:54:31 +0200 Received: from ndokos by pool-108-20-41-17.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 30 Aug 2014 04:54:31 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Claudius Mueller 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