From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Stanton Subject: Re: How to get graphs to display inline (immediately upon creation)? Date: Sun, 9 Sep 2012 22:51:43 -0700 Message-ID: <40C7B1BFC291ED4E9D10436D07736A3347089E65F8@EXMAIL7.haas.uc.berkeley.edu> References: <40C7B1BFC291ED4E9D10436D07736A3347089E65C1@EXMAIL7.haas.uc.berkeley.edu> <20333.1347253977@alphaville> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAwuZ-0000mX-60 for emacs-orgmode@gnu.org; Mon, 10 Sep 2012 01:51:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAwuX-0002oW-T5 for emacs-orgmode@gnu.org; Mon, 10 Sep 2012 01:51:55 -0400 Received: from gateway-b.haas.berkeley.edu ([128.32.222.40]:38426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAwuX-0002oN-NJ for emacs-orgmode@gnu.org; Mon, 10 Sep 2012 01:51:53 -0400 Content-Language: en-US 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: "nicholas.dokos@hp.com" Cc: "emacs-orgmode@gnu.org" One minor issue: if there are no images in the org file, I now get the mess= age No images to display inline When executing a code block. > -----Original Message----- > From: Richard Stanton > Sent: Sunday, September 09, 2012 10:46 PM > To: 'nicholas.dokos@hp.com' > Cc: emacs-orgmode@gnu.org > Subject: RE: [O] How to get graphs to display inline (immediately upon > creation)? >=20 > Yes! >=20 > Thanks very much. That seems to work fine. >=20 > > -----Original Message----- > > From: nicholas.dokos@hp.com [mailto:nicholas.dokos@hp.com] > > Sent: Sunday, September 09, 2012 10:13 PM > > To: Richard Stanton > > Cc: emacs-orgmode@gnu.org > > Subject: Re: [O] How to get graphs to display inline (immediately upon > > creation)? > > > > Richard Stanton wrote: > > > > > I'm using Org-mode version 7.9.1 (release_7.9.1-154-g659be3 @ > > > c:/emacs/site=3D > > > -lisp/org-mode/lisp/) > > > > > > I'd like to use org mode to display inline graphs, but am having > > > some troub=3D le. Here's a sample org file (with results block), whic= h > > > creates a single p=3D lot using R: > > > > > > ----------------- > > > > > > #+TITLE: Test plot > > > #+PROPERTY: session *R* > > > > > > * Sample plot in R > > > > > > #+begin_src R :exports both :results graphics :file img.png > > > hist(rnorm(40)) > > > #+end_src > > > > > > #+RESULTS: > > > [[file:img.png]] > > > > > > --------------- > > > > > > I'd like the graph to appear inline immediately when I press C-c C-c > > > to exe=3D cute the code block. However, all I get is the result block > > > shown. I can us=3D > > > e=3D20 > > > > > > #+STARTUP: inlineimages > > > > > > to show the graph when I first load the org file, and I can press > > > C-c C-x C=3D -v to turn on inline displaying if it's off, but even > > > when it's turned on, =3D the graph doesn't display inline if I press > > > C-c C-c again. In fact, I then =3D have to press C-c C-x C-v *twice* > > > (once to turn inline display off, and onc=3D e to turn it back on > > > again) to get the graph > > to display. > > > > > > How can I get inline graphs to display inline the moment they've > > > been creat=3D ed? > > > > > > > Untested. > > Maybe add org-redisplay-inline-images to org-babel-after-execute-hook? > > > > Nick