bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] How to create profile in preferences file?


From: David B. Lamkins
Subject: Re: [Bug-apl] How to create profile in preferences file?
Date: Thu, 27 Nov 2014 12:37:06 -0800

Thank you, Jüergen.

It turns out that there is a problem with the implementation:

In main.cc::init_apl(), uprefs.parse_argv() is called after the calls to
uprefs.read_config_file(). As a result, read_config_file() never sees
the value set by the -p N command-line argument.

If I move the call to parse_argv() ahead of the calls to
read_config_file(), the Profile entries are recognized as per your
intent.

I didn't investigate the semantics of option processing. The -p N
parsing may need to be a special case in order for the command-line
options to override the preferences when parse_argv() is invoked from
its current position in the code. Perhaps it's sufficient to call
parse_argv() both before and after the calls to read_config_file().

On Thu, 2014-11-27 at 12:58 +0100, Juergen Sauermann wrote:
> Hi David,
> 
> the plan was this:
> 
>    <preferences in all profiles>
>    ...
> 
> Profile 1
> 
>    <preferences in first profile>
>     ...
> 
> Profile 2
> 
>    <preferences in second profile>
>    ...
> 
> The profile number 0 stands for "all profiles"
> 
> Not sure if I ever tested this.
> 
> /// Jürgen
> 
> 
> On 11/27/2014 08:19 AM, David B. Lamkins wrote:
> 
> > I'd like to create multiple profiles in the GNU APL preferences file and
> > and select one at runtime using the -p N command-line option. I
> > apologize if I've overlooked something in the documentation, but I can't
> > find an example of how this works.
> > 
> > 
> > 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]