* How to get graphs to display inline (immediately upon creation)?
@ 2012-09-10 2:39 Richard Stanton
2012-09-10 5:12 ` Nick Dokos
0 siblings, 1 reply; 5+ messages in thread
From: Richard Stanton @ 2012-09-10 2:39 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
I'm using Org-mode version 7.9.1 (release_7.9.1-154-g659be3 @ c:/emacs/site-lisp/org-mode/lisp/)
I'd like to use org mode to display inline graphs, but am having some trouble. Here's a sample org file (with results block), which creates a single plot 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 execute the code block. However, all I get is the result block shown. I can use
#+STARTUP: inlineimages
to show the graph when I first load the org file, and I can press C-c C-x C-v to turn on inline displaying if it's off, but even when it's turned on, the graph doesn't display inline if I press C-c C-c again. In fact, I then have to press C-c C-x C-v *twice* (once to turn inline display off, and once 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 created?
Thanks.
Richard Stanton
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to get graphs to display inline (immediately upon creation)?
2012-09-10 2:39 How to get graphs to display inline (immediately upon creation)? Richard Stanton
@ 2012-09-10 5:12 ` Nick Dokos
2012-09-10 5:46 ` Richard Stanton
2012-09-10 5:51 ` Richard Stanton
0 siblings, 2 replies; 5+ messages in thread
From: Nick Dokos @ 2012-09-10 5:12 UTC (permalink / raw)
To: Richard Stanton; +Cc: emacs-orgmode@gnu.org
Richard Stanton <stanton@haas.berkeley.edu> wrote:
> I'm using Org-mode version 7.9.1 (release_7.9.1-154-g659be3 @ c:/emacs/site=
> -lisp/org-mode/lisp/)
>
> I'd like to use org mode to display inline graphs, but am having some troub=
> le. Here's a sample org file (with results block), which creates a single p=
> 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=
> cute the code block. However, all I get is the result block shown. I can us=
> e=20
>
> #+STARTUP: inlineimages
>
> to show the graph when I first load the org file, and I can press C-c C-x C=
> -v to turn on inline displaying if it's off, but even when it's turned on, =
> the graph doesn't display inline if I press C-c C-c again. In fact, I then =
> have to press C-c C-x C-v *twice* (once to turn inline display off, and onc=
> 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=
> ed?
>
Untested.
Maybe add org-redisplay-inline-images to org-babel-after-execute-hook?
Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to get graphs to display inline (immediately upon creation)?
2012-09-10 5:12 ` Nick Dokos
@ 2012-09-10 5:46 ` Richard Stanton
2012-09-10 5:51 ` Richard Stanton
1 sibling, 0 replies; 5+ messages in thread
From: Richard Stanton @ 2012-09-10 5:46 UTC (permalink / raw)
To: nicholas.dokos@hp.com; +Cc: emacs-orgmode@gnu.org
Yes!
Thanks very much. That seems to work fine.
> -----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 <stanton@haas.berkeley.edu> wrote:
>
> > I'm using Org-mode version 7.9.1 (release_7.9.1-154-g659be3 @
> > c:/emacs/site=
> > -lisp/org-mode/lisp/)
> >
> > I'd like to use org mode to display inline graphs, but am having some
> > troub= le. Here's a sample org file (with results block), which
> > creates a single p= 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= cute the code block. However, all I get is the result block
> > shown. I can us=
> > e=20
> >
> > #+STARTUP: inlineimages
> >
> > to show the graph when I first load the org file, and I can press C-c
> > C-x C= -v to turn on inline displaying if it's off, but even when it's
> > turned on, = the graph doesn't display inline if I press C-c C-c
> > again. In fact, I then = have to press C-c C-x C-v *twice* (once to
> > turn inline display off, and onc= 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= ed?
> >
>
> Untested.
> Maybe add org-redisplay-inline-images to org-babel-after-execute-hook?
>
> Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to get graphs to display inline (immediately upon creation)?
2012-09-10 5:12 ` Nick Dokos
2012-09-10 5:46 ` Richard Stanton
@ 2012-09-10 5:51 ` Richard Stanton
2012-09-18 14:28 ` Bastien
1 sibling, 1 reply; 5+ messages in thread
From: Richard Stanton @ 2012-09-10 5:51 UTC (permalink / raw)
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 message
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)?
>
> Yes!
>
> Thanks very much. That seems to work fine.
>
> > -----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 <stanton@haas.berkeley.edu> wrote:
> >
> > > I'm using Org-mode version 7.9.1 (release_7.9.1-154-g659be3 @
> > > c:/emacs/site=
> > > -lisp/org-mode/lisp/)
> > >
> > > I'd like to use org mode to display inline graphs, but am having
> > > some troub= le. Here's a sample org file (with results block), which
> > > creates a single p= 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= cute the code block. However, all I get is the result block
> > > shown. I can us=
> > > e=20
> > >
> > > #+STARTUP: inlineimages
> > >
> > > to show the graph when I first load the org file, and I can press
> > > C-c C-x C= -v to turn on inline displaying if it's off, but even
> > > when it's turned on, = the graph doesn't display inline if I press
> > > C-c C-c again. In fact, I then = have to press C-c C-x C-v *twice*
> > > (once to turn inline display off, and onc= 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= ed?
> > >
> >
> > Untested.
> > Maybe add org-redisplay-inline-images to org-babel-after-execute-hook?
> >
> > Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-18 14:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-10 2:39 How to get graphs to display inline (immediately upon creation)? Richard Stanton
2012-09-10 5:12 ` Nick Dokos
2012-09-10 5:46 ` Richard Stanton
2012-09-10 5:51 ` Richard Stanton
2012-09-18 14:28 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.