From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claudius Mueller Subject: Re: org-image-actual-width has no effect Date: Sat, 30 Aug 2014 22:30:41 -0400 Message-ID: <540288D1.803@gmail.com> 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> <87k35qwuue.fsf@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNute-0006L9-TH for emacs-orgmode@gnu.org; Sat, 30 Aug 2014 22:29:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNutV-0004S6-Rn for emacs-orgmode@gnu.org; Sat, 30 Aug 2014 22:29:38 -0400 Received: from mail-qa0-x232.google.com ([2607:f8b0:400d:c00::232]:57805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNutV-0004S1-M0 for emacs-orgmode@gnu.org; Sat, 30 Aug 2014 22:29:29 -0400 Received: by mail-qa0-f50.google.com with SMTP id cm18so3768767qab.9 for ; Sat, 30 Aug 2014 19:29:28 -0700 (PDT) Received: from BrainDwork.site (c-68-49-109-123.hsd1.va.comcast.net. [68.49.109.123]) by mx.google.com with ESMTPSA id l7sm13785582qaf.16.2014.08.30.19.29.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 30 Aug 2014 19:29:27 -0700 (PDT) In-Reply-To: <87k35qwuue.fsf@alphaville.dokosmarshall.org> 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 Nick, your code worked! My example image was small and I could change the size by altering the width variable. The same image in a regular org file is huge. That means something is wrong with my org-mode install? I have not changed or done anything to org-mode that came with the compiled emacs 24.3 version. Any tests I can do? Thank you - this process has already taught me a lot. Claudius On 08/29/2014 10:54 PM, Nick Dokos wrote: > 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. >