[ESS] ESS with Julia built from source breaks plotting

Vincent Goulet vincent.goulet at dgfc.ulaval.ca
Tue Apr 2 06:25:37 CEST 2013


Le 2013-03-30 à 21:40, Kasper Daniel Hansen <kasperdanielhansen at gmail.com> a écrit :

> If you are running Emacs as a GUI application (for example Emacs.app
> or Aquamacs) you should be aware that settings in say
> .bashrc/.bash_profile does not affect GUI applications.  This is true
> for all GUI applications on OS X.

FWIW, my Emacs distribution for OS X has a small patch to import the value of environment variables (by default $PATH, $MANPATH and $LANG) defined in a user's shell.

I've always found this more "portable" than fiddling with plist files, specially for novice users.

v.

> 
> This is avery common reason for why things work in Terminal, but not
> in Emacs or R.app (or some other GUI).
> 
> If you need to set PATH or other things you need to use
> environment.plist (Google it) or set it from inside of Emacs.  For
> example, you can set the PATH environment variable by
> 
> (setenv "PATH" (concat (getenv "PATH")
>                       ":/usr/texbin:~/Bin:/usr/local/bin"))
> 
> (in your .emacs / .init.el etc)
> 
> Best,
> Kasper
> 
> 
> On Sat, Mar 30, 2013 at 9:57 AM, Gustavo Lacerda <guse at optimizelife.com> wrote:
>> hi Vitalie,
>> 
>> I just ran this test again, making sure to run julia-release-basic.
>> 
>> * ESS: FAIL
>> * regular OSX terminal: SUCCESS
>> * Emacs shell: FAIL (same error as ESS, see bottom of this email)
>> 
>> My best guess would be that there's something wrong with the Emacs
>> environment.  Re: reproducibility, see below for the code I ran.  The
>> errors appear when I call 'file'.
>> 
>> Until yesterday this was failing everywhere, but after I compiled a
>> new version of Cairo/Pango/gtk2, it started working on the OSX
>> terminal.  Thus I suspect that Emacs is pointing to the old version.
>> 
>> Gustavo
>> 
>> 
>> require("Winston")
>> using Winston
>> x = linspace( 0, 3pi, 100 )
>> c = cos(x)
>> s = sin(x)
>> p = FramedPlot()
>> setattr(p, "title", "title!")
>> setattr(p, "xlabel", "\Sigma x^2_i")
>> setattr(p, "ylabel", "\Theta_i")
>> add(p, FillBetween(x, c, x, s) )
>> add(p, Curve(x, c, "color", "red") )
>> add(p, Curve(x, s, "color", "blue") )
>> file(p, "example1.png")
>> 
>> -------------------------------
>> 
>> ERRORS:
>> 
>> (process:29761): GLib-GObject-CRITICAL **: gpointer
>> g_object_ref(gpointer): assertion `G_IS_OBJECT (object)' failed
>> 
>> (process:29761): GLib-GObject-CRITICAL **: gpointer
>> g_object_get_qdata(GObject *, GQuark): assertion `G_IS_OBJECT
>> (object)' failed
>> 
>> (process:29761): GLib-GObject-CRITICAL **: void
>> g_object_set_qdata_full(GObject *, GQuark, gpointer, GDestroyNotify):
>> assertion `G_IS_OBJECT (object)' failed
>> 
>> (process:29761): Pango-CRITICAL **: void
>> pango_fontset_foreach(PangoFontset *, PangoFontsetForeachFunc,
>> gpointer): assertion `PANGO_IS_FONTSET (fontset)' failed
>> 
>> (process:29761): Pango-CRITICAL **: void
>> pango_fontset_foreach(PangoFontset *, PangoFontsetForeachFunc,
>> gpointer): assertion `PANGO_IS_FONTSET (fontset)' failed
>> 
>> (process:29761): Pango-WARNING **: failed to choose a font, expect
>> ugly output. engine-type='PangoRenderCoreText', script='common'
>> 
>> (process:29761): GLib-GObject-CRITICAL **: gpointer
>> g_object_ref(gpointer): assertion `G_IS_OBJECT (object)' failed
>> 
>> (process:29761): Pango-WARNING **: couldn'
>> 
>> 
>> 
>> 
>> On Sat, Mar 30, 2013 at 5:13 AM, Vitalie Spinu <spinuvit at gmail.com> wrote:
>>> 
>>> Hi Gustavo,
>>> 
>>> Please try from no-readline terminal, aka julia-release-basic. If it
>>> work there then it is indeed an ESS problem, if not then you should
>>> report it to julia-dev.
>>> 
>>> In the former case, could you please provide a self contained
>>> reproducible example?
>>> 
>>> Thanks,
>>>    Vitalie
>>> 
>>>>> Gustavo Lacerda <guse at optimizelife.com>
>>>>> on Fri, 29 Mar 2013 22:13:30 -0400 wrote:
>>> 
>>>> hi,
>>>> I just built julia 0.2 from source, and have been using it with ESS.
>>>> Unfortunately, Winston (plotting package) doesn't work when I run
>>>> Julia from Emacs.  It *does* work when I run it from a regular
>>>> terminal.
>>> 
>>>> This is my .emacs:
>>>> (setq inferior-julia-program-name
>>>> "~/projects/julia/usr/bin/julia-release-basic")
>>>> (add-to-list 'load-path "~/projects/julia/contrib/")
>>> 
>>>> How would you go about ensuring that the Emacs/ESS environment is the
>>>> same as the terminal environment?
>>> 
>>>> Gustavo
>>> 
>>>> ______________________________________________
>>>> ESS-help at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/ess-help
>> 
>> ______________________________________________
>> ESS-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help
> 
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list