[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Python interactive navigation around nested functions
From: |
Dima Kogan |
Subject: |
Re: Python interactive navigation around nested functions |
Date: |
Mon, 20 Jun 2016 23:05:44 -0700 |
User-agent: |
mu4e 0.9.17; emacs 25.0.94.1 |
Dima Kogan <address@hidden> writes:
> I don't really LIKE it, though, so let me ponder.
OK. I pondered for 10 minutes. I think the current behavior is strange,
and I think the following would be much more natural:
1. If we're on a function-definition line, C-M-a should go up to the
previous definition, at the SAME OR HIGHER AST level
2. If we're NOT on a function-definition line, C-M-a should go up to the
previous definition, at a HIGHER AST level.
This would do what I would want, and I think is far more reasonable. The
current behavior has some side-effects, which can probably be called
"bugs" without controversy. Say you have this:
def bbb():
print 11
print 22
def ccc():
print 33
print 44
print 55
print 55
print 55
print 55
def ddd():
print 123
>From any of the "print 55" lines, C-M-h selects the whole "def ddd"
block, which I would not expect at all. If the ddd block isn't there,
then it selects all of the "ccc" block, which is wrong too: neither of
these contain the statement we started on. One could call this a
separate bug from the original complaint, but changing the C-M-a
definition makes this work naturally.
dima
Re: Python interactive navigation around nested functions, Dima Kogan, 2016/06/21
- Re: Python interactive navigation around nested functions,
Dima Kogan <=
- Re: Python interactive navigation around nested functions, Stefan Monnier, 2016/06/21
- Re: Python interactive navigation around nested functions, Dima Kogan, 2016/06/24
- Re: Python interactive navigation around nested functions, Clément Pit--Claudel, 2016/06/24
- Re: Python interactive navigation around nested functions, Andreas Röhler, 2016/06/26
- Re: Python interactive navigation around nested functions, Clément Pit--Claudel, 2016/06/26
- Re: Python interactive navigation around nested functions, Andreas Röhler, 2016/06/27
Re: Python interactive navigation around nested functions, Stefan Monnier, 2016/06/24
Re: Python interactive navigation around nested functions, Andreas Röhler, 2016/06/26
Re: Python interactive navigation around nested functions, Andreas Röhler, 2016/06/21
Re: Python interactive navigation around nested functions, Andreas Röhler, 2016/06/21