On Nov 14, 9:01 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I don't understand. If you don't want to terminate the "if", why do > > you hit backspace? What is it that you would like to have happen? > > the goal is to make some aspects of indentation behave the same without > context > dependency. this goal exists for many features of programming assistance > because it's a prerequisite for lowering the vocal load for this aspect of > programming by voice > > I want three indentation adjustment tools. Indent to where a class should be, > indent to where a method should be, and outdent n levels (close block > (once|twice|thrice)). This is probably best shown by example although, I'm > not > guaranteeing my example will make it any clearer. :-) > > the current outdent capability conflates multiple outdent events. The outdent > events are, at a minimum,: > > Close block > close method > close class > > Another way to look at these events are start method, start class and close > block. Now using these events, let's compare a use case against the outdent > mechanism. > > starting with an example of a previous message, > > class pet (object): > """ > """ > def cat(self): > """ > """ > if food in bowl: > self.empty = True > > def dog(self): > > to start the dog method, after ending the Method, I would need to say > something > like: > > newline tab key Close block close block delta echo foxtrot dog left paren self > close paren colon... > > But if the method ended like: > > ... > > def cat(self): > """ > """ > self.empty = True > > def dog(self): > > I would only want to use a single "close block" to outdent. unfortunately, > this > context dependent behavior is frustratingly wrong when it comes to creating > speech driven macros to enter templates. it requires user intervention to > tell > you how may times to outdent and that's counterproductive at best and > physically > damaging at worst for a disabled user. > > any clearer? I still don't understand. It seems that you want to be able to do: "END_CLASS" to end the current class.
"END_DEF" to end the current function "END_BLOCK" to end anything else. This is possible with some emacs lisp but I don't see what this gains you over "BACK" "BACK" "BACK" where "BACK" sends a backspace to emacs. (Actually I'd define an "END" command which you could give at the end of the last line of a block. That would relieve you of the need to enter the newline and tab.) Yes, it requires a few extra utterances on occasion, but you don't have to worry about three new (multi-syllabic) verbs to recognize. Am I understanding your requirement correctly? -- http://mail.python.org/mailman/listinfo/python-list