Barry Warsaw wrote: > On Mar 05, 2010, at 07:00 PM, Andreas Roehler wrote: > >> question is: how to edit small units in python-code? >> >> Let's consider piece below from Dive Into Python: >> >> result = roman71.fromRoman(numeral) >> >> Beside of operators three python-words are here: >> >> result / roman71 / fromRoman(numeral) >> >> which should possible be picked with one command/key. >> Resp. copied, deleted, maybe transposed etc. > > Aren't there already key bindings for these. E.g. > > M-f == py-forward-into-nomenclature
that's ok Python-units, `python-expressions' finally, behaves different: 1) it selects and highlights the item 2) stops at the beginning, resp. the last char of item 3) takes the item into the kill-ring when interactively called 4) provides a series of related commands, reports, hiding etc. > M-C-f == forward-sexp Shows occasionally unpredictable behaviour, for example def __init__(self, d={}): __________________________|______ self._keys = d.keys() dict.__init__(self, d) If cursor is under closing brace forward-sexp: Scan error: "Containing expression ends prematurely", 565, 566 `ar-forward-python-expression-atpt' in contrast would move to the closing `)' with first step, than to the next `self' etc. BTW seems I have to clean up my launchpad-repo For the curious, in order to get everything needed, two checkouts seem necessary: bzr branch lp:~a-roehler/s-x-emacs-werkstatt/thingatpt-python-expressions.el bzr branch lp:~a-roehler/s-x-emacs-werkstatt/beg-end.el Andreas > > Well you need two keystrokes to get all of 'fromRoman(numeral)' or of course > you could just use > > C-e == move-end-of-line > > At least, it's never seemed there was anything lacking to me. > > -Barry > > > ------------------------------------------------------------------------ > > _______________________________________________ > Python-mode mailing list > Python-mode@python.org > http://mail.python.org/mailman/listinfo/python-mode _______________________________________________ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode