special editor support for indentation needed.

Eric S. Johansson esj at harvee.org
Fri Nov 14 16:08:29 EST 2008


Almar Klein wrote:
> Hi Eric,
> 
> First of all, I like your initiative.

there's nothing like self interest to drive one's initiative.  :-) 14 years with
speech recognition and counting.  I'm so looking to my 15th anniversary of being
injured next year....

another initiative is exporting the speech recognition environment to the Linux
context.  In a nutshell, he dictated to application on Windows, it tunnels over
the network to a Linux machine, and will allow you to cut and paste to and from
that Linux application.  I could definitely use some high quality volunteer
talent for this effort.   it would make a huge quality of life difference to
disabled developers.    This work would also be usable by the folks in the wine
project who are supporting  NaturallySpeaking.

> I'm not sure if I undestand you correctly, but can't you just
> increase indentation after each line that ends with a colon?
> That's how I do it in my editor. The user would then only need
> to specify when to decrease indentation.

here's an example of the problem:
class foo( object):
    def cat(self)
	self.x=1
	def dog
            self.x=2

this is legal Python but it's not what you need 99% of the time.  There is no
cue to the editor to tell it to outdent to give me what I really want which is:

class foo( object):
    def cat(self)
	self.x=1
    def dog
        self.x=2

so there should be a mechanism for saying "indent the level of the previous
definition".  For what it's worth, this would translate in speech recognition of
arm in vocola pseudocode to

new  method = <def indent>def ^(self):{enter}"""{enter}"""{enter}<srch backwards
and delete ^>

which would allow me to create a method definition and put me back at a place
where I can speak the method name.  There's other stuff in these be done like
allowing you to modify various features by names such as adding/deleting
arguments, modifying array indices etc.  If you are not careful, I'll talk about
command disambiguation through scope reduction and the related visual elements
in the working environment.

I really need a job doing this UI stuff.  :-)



More information about the Python-list mailing list