On Wed, 18 Aug 2010 19:47:21 -0500
"Edward K. Ream" <[email protected]> wrote:

> > can not open dictionary file: C:\leo-editor\leo\core\..\plugins
> > \spellpyx.txt  
> 
> Something is very wrong with Leo's aspell code at present.  As an
> emergency measure I removed spellpyx.txt.  I'll fix this for 4.8.

Not sure if it's that, or something else, which has disabled the Spell tab in 
Leo trunk Ubuntu.  Needing spell checking, I re-located this script I wrote a 
couple of years ago when aspell was going through another integration rough 
spot.

linux only - it uses aspell in an xterm to fix things in the selected subtree.  
You can see some old stuff in there, now it's 'p.b = fin.read()', not 
'p.scriptSetBodyString(fin.read())' :-)

    import os
    
    def spellNode(p):
        if p.bodyString():
            fn = '/home/tbrown/spell.txt'
            fout = file(fn, 'w')
            fout.write(p.bodyString())
            fout.close()
            mt = os.path.getmtime(fn)
            os.system('xterm -font 9x15bold -e aspell -c %s' % fn)
            if os.path.getmtime(fn) != mt:
                fin = file(fn, 'r')
                p.scriptSetBodyString(fin.read())
                fin.close()
                p.setDirty(True)
                c.setChanged(True)
            
    try:
        spellNode(p.copy())
        for nd in p.subtree_iter(): spellNode(nd.copy())
    finally:
        c.redraw()

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to