[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11899: 24.1.50; Weird names and unhelpful docstrings for some python

From: Fabián Ezequiel Gallina
Subject: bug#11899: 24.1.50; Weird names and unhelpful docstrings for some python function
Date: Fri, 13 Jul 2012 00:45:26 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120616 Thunderbird/13.0.1

On 07/11/2012 09:42 AM, Ivan Andrus wrote:
On Jul 11, 2012, at 3:14 AM, Fabián Ezequiel Gallina wrote:
On 07/10/2012 07:23 PM, Stefan Monnier wrote:
have weird names in the sense that they don't move by sentences.
Can you give me an example of what do you expect and the current behavior so I 
can have a more specific example to work on? A simplified python file and short 
explanation would be enough.
I'm not complaining about the functionality here.  I just don't know what a 
"sentence" means in a python file.  I think what is meant is a python 
statement, but the docstrings should reflect that, or define what is meant by a sentence.
I agree here, the reason why I abused the term sentence for moving between statements is because there's no Emacs standard binding (nor concept) of moving between statements. Ideally python-nav-{backward,forward}-sentence must navigate blocks python code. Everything with an extra level of indentation after the block start must be considered part of the block (sentence). So given the following example:

    If something:

If the pointer is at the start of the if statement, and the user issues python-nav-forward-sentence he must be taken after the do_that() statement.

So what I'm going to do is to rename these existing functions to python-nav-{backward,forward}-statement and implement proper python-nav-{backward,forward}-sentence that would navigate blocks of code.

That said, I did just notice that M-a (python-nav-backward-sentence) gets 
"stuck" on the comment in the test below.  If I put a blank line after the 
comment then it doesn't.

print libgap('if 4>3 then\nprint("hi");\nfi')
# Abort/segfault
print libgap('SmallGroup(12,3)')

I can create a new bug for that if desired.

I noticed that too, there's no need to open a ticket for it, I'll work on that too while solving this ticket.


Fabián E. Gallina
Co-Founder of Anue
Skype: caffeineGalli

reply via email to

[Prev in Thread] Current Thread [Next in Thread]