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: Juergen Sauermann
Subject: Re: [Bug-apl] How to create profile in preferences file?
Date: Fri, 28 Nov 2014 14:52:25 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0

Hi David,

thanks for analyzing this. I have split the option parsing in two parts:
parse_argv_1() before reading the preference files and parse_argv_2()
after reading them. Command line options are supposed to override settings in the
preference files therefore most options shall be considered after reading the preference
files. SVN 512.

/// Jürgen


On 11/27/2014 09:37 PM, David B. Lamkins wrote:
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]