emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* R-generated images not showing
@ 2019-09-11 20:38 William Denton
  2019-09-11 21:06 ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: William Denton @ 2019-09-11 20:38 UTC (permalink / raw)
  To: emacs-orgmode

This problem started for me a little while ago:  images generated from R source 
blocks no longer appear even though I have images display turned on.

For example, this file:

# -----
#+begin_src R :results graphics file :file /tmp/src.png
x <- seq(-4, 4, length=200)
y <- dnorm(x, mean=0, sd=1)
plot(x,y, type = "l", lwd = 2, xlim = c(-3.5,3.5))
#+end_src

#+RESULTS:
[[file:/tmp/src.png]]
# -----

I don't see the image, I just see the text "file:/tmp/src.png".  When 
image-display is off (C-c C-x C-v) it becomes a link, and when I toggle it back 
on it's just plain text.

The file on disk really is there and is a valid image.

If I run the three R lines in an ESS window (M-x R) then the image pops up in 
its own window, as normal.

I ran "emacs -Q" and loaded up Org and enough Babel stuff to the source block to 
work, and the image appeared inline as it should!  So it's something to do with 
my config [1] but I can't figure out what.

Has anyone ever had this happen, or noticed it recently?  I'm compiling Emacs 
and Org from source and both are current.  I'm not sure what the easiest way to 
identify the problem is.

Bill

[1] https://github.com/wdenton/.emacs.d/blob/master/setup/setup-orgmode.el

--
William Denton :: Toronto, Canada   ---   Listening to Art: https://listeningtoart.org/
https://www.miskatonic.org/         ---   GHG.EARTH: http://ghg.earth/
Caveat lector.                      ---   STAPLR: http://staplr.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: R-generated images not showing
  2019-09-11 20:38 R-generated images not showing William Denton
@ 2019-09-11 21:06 ` Nick Dokos
  2019-09-13 14:41   ` William Denton
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2019-09-11 21:06 UTC (permalink / raw)
  To: emacs-orgmode

William Denton <wtd@pobox.com> writes:

> This problem started for me a little while ago:  images generated from R source 
> blocks no longer appear even though I have images display turned on.
>
> For example, this file:
>
> # -----
>
> #+begin_src R :results graphics file :file /tmp/src.png
> x <- seq(-4, 4, length=200)
> y <- dnorm(x, mean=0, sd=1)
> plot(x,y, type = "l", lwd = 2, xlim = c(-3.5,3.5))
> #+end_src
>
> #+RESULTS:
> [[file:/tmp/src.png]]
> # -----
>
> I don't see the image, I just see the text "file:/tmp/src.png".  When 
> image-display is off (C-c C-x C-v) it becomes a link, and when I toggle it back 
> on it's just plain text.
>
> The file on disk really is there and is a valid image.
>
> If I run the three R lines in an ESS window (M-x R) then the image pops up in 
> its own window, as normal.
>
> I ran "emacs -Q" and loaded up Org and enough Babel stuff to the source block to 
> work, and the image appeared inline as it should!  So it's something to do with 
> my config [1] but I can't figure out what.
>
> Has anyone ever had this happen, or noticed it recently?  I'm compiling Emacs 
> and Org from source and both are current.  I'm not sure what the easiest way to 
> identify the problem is.

The usual method is to bisect your setup-orgmode.el file: comment out
the bottom half and if that makes it work, then you know that the
problem is in the part that you commented out. Recursively, bisect
further.

I downloaded your setup-org.el and tried it out. There are two things
that I commend out: the (use-package org-bullets ...) stuff - the
`emacs -Q -l setup-orgmode.el' complained about use-package and I was
too lazy to add whatever is necessary to get it and the (add-hook
'org-mode-hook wrap-region-mode) stuff because I don't have
wrap-region-mode installed. With those two deletions, I see no
problem.  I doubt that the problem is with org-bullets, so try getting
rid of wrap-region-mode and see if that does the trick. Of course, it
may be that there is some interaction between your Org mode setup and
all the *other* setup that you do, but bisecting is still the way to
go.

>
> Bill
>
> [1] https://github.com/wdenton/.emacs.d/blob/master/setup/setup-orgmode.el
>
> --
> William Denton :: Toronto, Canada   ---   Listening to Art: https://listeningtoart.org/
> https://www.miskatonic.org/         ---   GHG.EARTH: http://ghg.earth/
> Caveat lector.                      ---   STAPLR: http://staplr.org/
>
>

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: R-generated images not showing
  2019-09-11 21:06 ` Nick Dokos
@ 2019-09-13 14:41   ` William Denton
  2019-09-13 14:45     ` William Denton
  0 siblings, 1 reply; 4+ messages in thread
From: William Denton @ 2019-09-13 14:41 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

On 11 September 2019, Nick Dokos wrote:

> The usual method is to bisect your setup-orgmode.el file: comment out
> the bottom half and if that makes it work, then you know that the
> problem is in the part that you commented out. Recursively, bisect
> further.

My problem report wasn't very good, I admit.  I was hoping someone might 
recognize the problem so I could avoid bisecting.  Thanks for having a look at 
my config and taking some time to do some testing.

It turns out I found the cause by accident!  I've been using

./configure --with-imagemagick

to configure Emacs before compiling it.  I tried it without that option, and now 
the problem has gone away and images are displaying as they should.

The details of how Org and images and ImageMagick work together are beyond me, 
but I hope noting this is useful.

Bill
--
William Denton :: Toronto, Canada   ---   Listening to Art: https://listeningtoart.org/
https://www.miskatonic.org/         ---   GHG.EARTH: http://ghg.earth/
Caveat lector.                      ---   STAPLR: http://staplr.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: R-generated images not showing
  2019-09-13 14:41   ` William Denton
@ 2019-09-13 14:45     ` William Denton
  0 siblings, 0 replies; 4+ messages in thread
From: William Denton @ 2019-09-13 14:45 UTC (permalink / raw)
  To: emacs-orgmode

On 13 September 2019, William Denton wrote:

> It turns out I found the cause by accident!  I've been using
>
> ./configure --with-imagemagick
>
> to configure Emacs before compiling it.  I tried it without that option, and 
> now the problem has gone away and images are displaying as they should.

Aha ... and now that I've caught up with other messages I see the source of this 
problem has been identified.

Bill
--
William Denton :: Toronto, Canada   ---   Listening to Art: https://listeningtoart.org/
https://www.miskatonic.org/         ---   GHG.EARTH: http://ghg.earth/
Caveat lector.                      ---   STAPLR: http://staplr.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-13 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-11 20:38 R-generated images not showing William Denton
2019-09-11 21:06 ` Nick Dokos
2019-09-13 14:41   ` William Denton
2019-09-13 14:45     ` William Denton

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).