​​
On Tue, Apr 14, 2015 at 12:08 PM, Ross Burnett <[email protected]> wrote:

> ​​
> A belated thanks, and there are 4 more unintended backslashes in the
> PIM/Using abbrev... documentation page.
>

​Thanks.  I'll fix these today.
​


> This still not working for me, but I am not giving up yet.
>
> In the leoSettings.leo node @data abbreviations-subst-env, it states
>
>> **Important**: scripting abbreviations are in effect only if the following
>>
>> settings are in effect::
>>
>>
>>
>>     @bool enable-abbreviations = True
>>
>>
>>> ​​
>>> @bool
>>> ​​
>>> abbreviations-subst-start = True
>>
>>
​Oops. The last line of the docs should be deleted.

Actually, ​abbreviations-subst-start must be a non-empty @string, not an
@bool. This is the reason you get a warning on startup.

As of rev ad78414, leoSettings.leo now defines:

   @string abbreviations-subst-start = {|{


to match:

@string abbreviations-subst-end = }|}

The mismatch in these two settings was very confusing, especially if you
read the erroneous docs carefully ;-)

I copied that whole @data abbreviations-subst-env node into myLeoSettings.
>



> However, if I include the @language python in the body, I get the
> following errors when restarting leo:
>
>>
>
> Traceback (most recent call last):
>
>
>>   File
>> "E:\Users\Ross\Docume~1\Github\leo-editor\leo\core\leoEditCommands.py",
>> line 539, in init_env
>
>     exec(result,c.abbrev_subst_env,c.abbrev_subst_env)
>
>
>>   File "<string>", line 1
>
>
>>     @language python
>
>
​I have no idea what is going on.  Your myLeoSettings.leo loads without a
problem for me.
​


> The @data abbreviations-subst-env node contains a def for 'ask''.  Isn't
> this necessary in order to run the example 'def' abbreviation correctly?
>
> When I use the 'def' example (i.e, I type in def;;), I do not get an 'ask'
> dialogue the way it shows in Terry's video, and the only replacement in
> effect is for 'return'.
>

​This is the result of ​

​@string abbreviations-subst-start not being set properly.

I still have the feeling that there are additional unknown settings I need
> in order for abbreviations to work properly.
>

​They work for me in your myLeoSettings.leo with
@string abbreviations-subst-start defined as above.

*Summary*

The troubles you had stemmed from problems in leoSettings.leo.  Rev ad78414
fixes them.  Here is the checkin log:

Fixed two confusing settings/comments related to abbreviations.

1. Corrected the comment in the node @data abbreviations-subst-env

2. The default for @string abbreviations-subst-start is now {|{, which
matches the corresponding }|}

Thanks for your help in improving Leo.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to