comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Preferences gone mad
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Preferences gone mad [message #73576] Thu, 18 November 2010 17:59
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Nov 18, 6:32 pm, Michael Galloy <mgal...@gmail.com> wrote:
>> Am I going mad? Am I missing something?
>
> Preference values can come from several locations, in order of priority:
>
>    1. the command line when starting IDL
>    2. an environment variable
>    3. the IDL distribution preference file
>    4. a user preference file
>    5. the default value
>
> IDL uses the value from the highest priority location. So, here, the
> environment variable is trumping the user preference file.
>
> The lesson: pick one method of setting preferences and stick to it. This
> is one reason why I have a slightly complicated system to set my path
> using preferences instead of using an environment variable.

As it turns out, I was going mad, and it was because I was missing
something.

I had not used an environment variable for the path in so many years I
forgot the priorities, and was assuming that the preferences were
appended to the environment value, not replaced by it. And the problem
showed up because I had set up an environment variable in the global
bashrc to put gpulib in the path for all users.

Thanks a lot, my sanity is restored.
Re: Preferences gone mad [message #73578 is a reply to message #73576] Thu, 18 November 2010 12:32 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 11/18/10 12:07 PM, Paulo Penteado wrote:
>
> It appears that a previously well behaved IDL installation has gone
> crazy with preference setting for one user. For other users on the
> same computer, things look normal. And the same seems to occur from
> the Workbench or the command line:
>
> IDL> p=pref_get('IDL_PATH')
> IDL> print,p
> +/usr/local/gpulib:<IDL_DEFAULT>
> IDL> p+=':+/some_directory/'
> IDL> print,p
> +/usr/local/gpulib:<IDL_DEFAULT>:+/some_directory/
> IDL> pref_set,'IDL_PATH',p,/commit
> IDL> print,pref_get('IDL_PATH')
> +/usr/local/gpulib:<IDL_DEFAULT>:+/some_directory/
> IDL> exit
>
> Then, from a new session:
>
> IDL> print,pref_get('IDL_PATH')
> +/usr/local/gpulib:<IDL_DEFAULT>
>
> Where did the new preference go?
>
> The preferences file was updated; it contains:
>
> IDL_PATH : +/usr/local/gpulib:<IDL_DEFAULT>:+/some_directory/
>
> The same happens if I change the path from the Workbench. It seems
> that IDL is ignoring the preferences file. I already removed the
> entire .idl directory, to let it be recreated, and it made no
> difference. The gpulib directory shows up because there is an IDL_PATH
> environment variable.
>
> Am I going mad? Am I missing something?

Preference values can come from several locations, in order of priority:

1. the command line when starting IDL
2. an environment variable
3. the IDL distribution preference file
4. a user preference file
5. the default value

IDL uses the value from the highest priority location. So, here, the
environment variable is trumping the user preference file.

The lesson: pick one method of setting preferences and stick to it. This
is one reason why I have a slightly complicated system to set my path
using preferences instead of using an environment variable.

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: NG Colorbar in IDL 8.0.1
Next Topic: plot of implicit function

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:29:23 PDT 2025

Total time taken to generate the page: 0.00462 seconds