emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Incorrect background color [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
@ 2022-07-01 18:56 Rudolf Adamkovič
  2022-07-02  4:44 ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Rudolf Adamkovič @ 2022-07-01 18:56 UTC (permalink / raw)
  To: emacs-orgmode

Hello everyone!

The Org Babel R documentation at

https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html

says that

> the background color defaults to "transparent"

but it defaults to white.

Just when I add ':bg transparent' to

#+BEGIN_SRC R :results graphics file :file test.svg

the plot becomes transparent.

P.S. I use the plain old "plot" function, with no fancy R packages.

Rudy
-- 
"Genius is 1% inspiration and 99% perspiration."
-- Thomas Alva Edison, 1932

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


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

* Re: [BUG] Incorrect background color [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
  2022-07-01 18:56 [BUG] Incorrect background color [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)] Rudolf Adamkovič
@ 2022-07-02  4:44 ` Ihor Radchenko
  2022-10-16 10:44   ` Ihor Radchenko
  2022-11-12 10:14   ` Jeremie Juste
  0 siblings, 2 replies; 6+ messages in thread
From: Ihor Radchenko @ 2022-07-02  4:44 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: emacs-orgmode

Rudolf Adamkovič <salutis@me.com> writes:

> The Org Babel R documentation at
>
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html
>
> says that
>
>> the background color defaults to "transparent"
>
> but it defaults to white.

Confirmed.

WORG page is not accurate here. The truth is that ob-R.el does not provide
any defaults for header args. Instead, R defaults are used. I suspect
that defaults for background color changed in R since the WORG page has
been written.

Best,
Ihor


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

* Re: [BUG] Incorrect background color [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
  2022-07-02  4:44 ` Ihor Radchenko
@ 2022-10-16 10:44   ` Ihor Radchenko
  2022-11-12 10:20     ` Jeremie Juste
  2022-11-12 10:14   ` Jeremie Juste
  1 sibling, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2022-10-16 10:44 UTC (permalink / raw)
  To: Ihor Radchenko, Jeremie Juste; +Cc: Rudolf Adamkovič, emacs-orgmode

Ihor Radchenko <yantar92@gmail.com> writes:

> Rudolf Adamkovič <salutis@me.com> writes:
>
>> The Org Babel R documentation at
>>
>> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html
>>
>> says that
>>
>>> the background color defaults to "transparent"
>>
>> but it defaults to white.
>
> Confirmed.
>
> WORG page is not accurate here. The truth is that ob-R.el does not provide
> any defaults for header args. Instead, R defaults are used. I suspect
> that defaults for background color changed in R since the WORG page has
> been written.

Jeremie, could you please take a look?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [BUG] Incorrect background color [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
  2022-07-02  4:44 ` Ihor Radchenko
  2022-10-16 10:44   ` Ihor Radchenko
@ 2022-11-12 10:14   ` Jeremie Juste
  1 sibling, 0 replies; 6+ messages in thread
From: Jeremie Juste @ 2022-11-12 10:14 UTC (permalink / raw)
  To: Ihor Radchenko, Rudolf Adamkovič; +Cc: emacs-orgmode


 On Sunday, 16 Oct 2022 at 10:44, Ihor Radchenko wrote:

 >>
 >> Confirmed.
 >>
 >> WORG page is not accurate here. The truth is that ob-R.el does not provide
 >> any defaults for header args. Instead, R defaults are used. I suspect
 >> that defaults for background color changed in R since the WORG page has
 >> been written.
 >
 > Jeremie, could you please take a look?

 Yes. Thanks for confirming the issue. I confirm that the white backgroud is the default and is R default.
 I could not trace back any recent change in R. So I suspect white was always the default.
 But I could well be wrong here.

 Note also that R parameters always takes precedence on the org-mode ones. As in the example below.

 #+BEGIN_SRC R :results graphics file :file test.svg :outputs both bg red
  par(bg="blue")
  plot(1:10, type = "n")
#+end_src

In opinion the actual org parameters are the right ones. But I'm open to suggestions.
Thanks also for updating the WORG page.

Best regards,
Jeremie



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

* Re: [BUG] Incorrect background color [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
  2022-10-16 10:44   ` Ihor Radchenko
@ 2022-11-12 10:20     ` Jeremie Juste
  2022-11-13  4:37       ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Jeremie Juste @ 2022-11-12 10:20 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Ihor Radchenko, Rudolf Adamkovič, emacs-orgmode


 Hello Ihor,

 On Sunday, 16 Oct 2022 at 10:44, Ihor Radchenko wrote:

 >>
 >> Confirmed.
 >>
 >> WORG page is not accurate here. The truth is that ob-R.el does not provide
 >> any defaults for header args. Instead, R defaults are used. I suspect
 >> that defaults for background color changed in R since the WORG page has
 >> been written.
 >
 > Jeremie, could you please take a look?

 Yes. Thanks for confirming the issue. I confirm that the white backgroud is the default and is R default.
 I could not trace back any recent change in R. So I suspect white was always the default.
 But I could well be wrong here.

 Note also that R parameters always takes precedence on the org-mode ones. As in the example below.

 #+BEGIN_SRC R :results graphics file :file test.svg :outputs both bg red
  par(bg="blue")
  plot(1:10, type = "n")
 #+end_src

In opinion the actual org parameters are the right ones. But I'm open to suggestions.
Thanks also for updating the WORG page.

Best regards,
Jeremie



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

* Re: [BUG] Incorrect background color [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
  2022-11-12 10:20     ` Jeremie Juste
@ 2022-11-13  4:37       ` Ihor Radchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Ihor Radchenko @ 2022-11-13  4:37 UTC (permalink / raw)
  To: Jeremie Juste; +Cc: Ihor Radchenko, Rudolf Adamkovič, emacs-orgmode

Jeremie Juste <jeremiejuste@gmail.com> writes:

>  >> WORG page is not accurate here. The truth is that ob-R.el does not provide
>  >> any defaults for header args. Instead, R defaults are used. I suspect
>  >> that defaults for background color changed in R since the WORG page has
>  >> been written.
>  >
>  > Jeremie, could you please take a look?
>
>  Yes. Thanks for confirming the issue. I confirm that the white backgroud is the default and is R default.
>  I could not trace back any recent change in R. So I suspect white was always the default.
>  But I could well be wrong here.
> ...
> Thanks also for updating the WORG page.

Thanks for the confirmation!
Also, it was Bastien who updated the page.
Fixed.
https://git.sr.ht/~bzg/worg/commit/5c24f6e33f20505ee161cd2c5fc93e39891d08ad

>  Note also that R parameters always takes precedence on the org-mode ones. As in the example below.
>
>  #+BEGIN_SRC R :results graphics file :file test.svg :outputs both bg red
>   par(bg="blue")
>   plot(1:10, type = "n")
>  #+end_src
>
> In opinion the actual org parameters are the right ones. But I'm open to suggestions.

I do not think that we can do anything about it and I do not think that
we do anything wrong.

Org can set options provided in header args as defaults, but the actual
code can do anything, including changing those defaults.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

end of thread, other threads:[~2022-11-13  4:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-01 18:56 [BUG] Incorrect background color [9.5.4 (release_9.5.4-3-g6dc785 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)] Rudolf Adamkovič
2022-07-02  4:44 ` Ihor Radchenko
2022-10-16 10:44   ` Ihor Radchenko
2022-11-12 10:20     ` Jeremie Juste
2022-11-13  4:37       ` Ihor Radchenko
2022-11-12 10:14   ` Jeremie Juste

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).