On 09/25/2013 01:00 PM, Terry Brown wrote:
> On Wed, 25 Sep 2013 12:05:43 -0700 (PDT)
> SegundoBob <[email protected]> wrote:
> 
>> Using Rev 6048, Xubuntu 12.04, and Linux kernel 3.2.0-53-generic, every 
>> time I start Leo-Editor I get 3 identical error messages in the log pane:
> 
> I'm not seeing that in 6050, can you test that rev.?
> 
> Cheers -Terry
> 

I just tried Rev. 6051 and the 3 errors are the same as I reported for
Rev 6048.

I don't use abbreviations.  There are no abbreviation settings my
myLeoSettings.leo.  So far as I can tell, leoSettings.leo disables
abbreviations.

>From print-settings:

    abbreviations = [u'\n']
    abbreviationsplaceend = |>
    abbreviationsplacestart = <|
    abbreviationssubstend = }|}
    abbreviationssubstenv = [u'\n', u'"""\n', u'\n', u'**Important**:
scripting abbreviations are in effect only if the following\n',
u'settings are in effect::\n', u'    \n', u'    @bool
enable-abbreviations = True\n', u'    @bool abbreviations-subst-start =
True\n', u'    \n', u'and one (or both) of the following are in
effect::\n', u'    \n', u'    @bool scripting-at-script-nodes = True\n',
u'    @bool scripting-abbreviations = True\n', u'\n', u'This node
defines the environment in which substitution scripts are\n',
u'evaluated. For example, if this node contains `import time`, then
an\n', u'abbreviation like::\n', u'\n', u'    date;;={|{import
time;x=time.asctime()}|}\n', u'\n', u'can be written more simply
as::\n', u'\n', u'    date;;={|{x=time.asctime()}|}\n', u'\n', u'The
environment will contain the following pre-defined values:\n', u'\n',
u'- `c` and `g`, as usual.\n', u'- `values`: a dict. see ask() and get()
below.\n', u'- `_abr`, the abbreviation being expanded.\n', u'\n',
u'"""\n', u'\n', u'import os\n', u'import sys\n', u'import time\n',
u'import datetime\n', u'\n', u'\n', u'try:\n', u'    import pwd  # for
full name of user in templates\n', u'except:\n', u'    pwd = None\n',
u'\n', u'def ask(s, default=""):\n', u'    """Ask, always, for a value
for template field \'s\'"""\n', u'    x =
g.app.gui.runAskOkCancelStringDialog(c, s, s, default=default)\n', u'
 _values[s] = x\n', u'    return x\n', u'\n', u'def get(s,
default=""):\n', u'    """Ask for template field \'s\' only if not
already known"""\n', u'    if s in _values:\n', u'        return
_values[s]\n', u'    else:\n', u'        return ask(s,
default=default)\n', u'  \n', u'try:\n', u"    _user_name =
os.environ['LOGNAME']\n", u'    if pwd:\n', u"        _user_name =
pwd.getpwnam(name).pw_gecos.rstrip(',')\n", u'except KeyError:\n', u'
 _user_name = None\n', u'\n', u'def user_name():\n', u'    """get
user\'s full name if available"""\n', u'    global _user_name\n', u'
if not _user_name:\n', u"        _user_name =
ask('LOGNAME','LOGNAME')\n", u'    return _user_name\n', u'\n', u'def
file_name():\n', u'    """dafault name of this file if implied by
headline"""\n', u'    if c.p.h.endswith(".py"):\n', u'        return
g.os_path_split(c.p.h)[-1]\n', u'    return ".py"\n', u'\n', u'def
in_class():  # return "self, " if in a class definition\n', u'
"""return "self" if in a class definition (from headline)"""\n', u'
for nd in c.p.self_and_parents_iter():\n', u"        if
nd.h.startswith('class'):\n", u'            return "self, "\n', u'
return ""\n', u'\n', u'def param_doc(k=None):\n', u'    """make an
epydoc / rst style parameter documentation block"""\n', u'    if not
k:\n', u'        k = "Params, comma sep."\n', u"        indent = '
'\n", u"    else:  # assume in an __init__ def'n\n", u"        indent =
'        '\n", u'    if k in _values and _values[k]:\n', u'
return "\\n\\n%s:Parameters:\\n%s" % (indent, \'\\n\'.join(\n', u'
      ["%s- `%s`: <|describe %s|>" % (\n', u"                indent,
i.split('=',1)[0].strip(), i.split('=',1)[0].strip()\n", u"
) for i in _values[k].split(',')]))\n", u'    return ""\n', u'\n', u'def
long_word():\n', u'    """example of an abbreviation substitution which
inspects\n', u'    the current content of the body text, see `;;;`
example\n', u'    in @@data abbreviations-examples\n', u'    """\n', u'
   words = c.p.b.split()\n', u'    w = c.frame.body.bodyCtrl\n', u'    i
= w.getInsertPoint() - len(_abr)\n', u'    b = c.p.b\n', u'    s =
[]\n', u'    while i and b[i].isalpha():\n', u'        s[0:0] = b[i]\n',
u'        i -= 1\n', u"    s = ''.join(s)\n", u'    for i in words:\n',
u'        if i.startswith(s) and i != s:\n', u'            return
i[len(s):]\n', u"    return ''\n", u'\n', u'def close_xml():\n', u'
"""simple, but usually right, code to close open XML tags"""\n', u'    w
= c.frame.body.bodyCtrl\n', u'    i = w.getInsertPoint() - len(_abr)\n',
u'    b = c.p.b\n', u'    skips = 1\n', u'    while i and skips:\n', u'
       s = []\n', u"        while i and b[i] != '>':\n", u'            i
-= 1\n', u'        i -= 1\n', u"        while i and (b[i] != '<' or (s
and b[i] == '<' and s[0] == '/')):\n", u'            s[0:0] = b[i]\n',
u'            i -= 1\n', u"            if s and s[0] == '<' and len(s) >
1 and s[1] == '/':\n", u'                skips += 1  # a closed tag
indicates search one more tag\n', u'        skips -= 1\n', u"    s =
''.join([i if i.isalpha() else ' ' for i in s])\n", u'    if
s.strip():\n', u'        return "</%s>" % (s.split(None, 1)[0])\n', u'
  else:\n', u'        return "</"\n', u'\n', u'def django_tag():\n', u'
   """expand {block content} to \n', u'       {% block content %}\\n{%
end_block content %} with proper\n', u'       indentation (for Django
web templates)"""\n', u'    from PyQt4 import QtCore\n', u'    w =
c.frame.body.bodyCtrl\n', u'    i = w.getInsertPoint() - len(_abr)\n',
u'    b = c.p.b\n', u'    s = []\n', u"    while i and b[i] != '{':\n",
u'        s[0:0] = b[i]\n', u'        i -= 1\n', u'    start = i\n', u"
   s = ''.join(s)\n", u'    indent = 0\n', u"    while i and b[i] !=
'\\n':\n", u'        indent += 1\n', u'        i -= 1\n', u'    if
indent:\n', u'        indent -= 1\n', u'    def later(c=c,
indent=indent, b=b, s=s, _abr=_abr):\n', u'        c.p.b = "%s{%% %s
%%}\\n    %s\\n%s{%% end%s %%}%s" % (\n', u"            b[:start], s, '
'*indent, ' '*indent, s, b[start+len(s)+len(_abr):]\n", u'        )\n',
u'    QtCore.QTimer.singleShot(0, later)\n']
    abbreviationssubststart = None

    enableabbreviations = False
    globalabbreviations = [u'\n']
    globaldynamicabbrevs = True
    scriptingabbreviations = False
---------

Is globaldynamicabbrevs the problem?

-- 
Segundo Bob
[email protected]

-- 
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/groups/opt_out.

Reply via email to