From: "Fabián Ezequiel Gallina" <fabian@anue.biz>
To: Ivan Andrus <darthandrus@gmail.com>
Cc: 11899@debbugs.gnu.org
Subject: bug#11899: 24.1.50; Weird names and unhelpful docstrings for some python function
Date: Fri, 13 Jul 2012 00:45:26 -0300 [thread overview]
Message-ID: <4FFF99D6.6040909@anue.biz> (raw)
In-Reply-To: <EB8D28EA-B077-4F43-9E47-8AC4D859F60A@gmail.com>
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:
>>>> python-nav-sentence-start
>>>> python-nav-sentence-end
>>>> python-nav-forward-sentence
>>>> python-nav-backward-sentence
>>>> 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:
do_this()
do_that()
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.
>
> -Ivan
I noticed that too, there's no need to open a ticket for it, I'll work
on that too while solving this ticket.
Thanks!
--
Fabián E. Gallina
Co-Founder of Anue
Skype: caffeineGalli
http://www.anue.biz/
next prev parent reply other threads:[~2012-07-13 3:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-10 14:33 bug#11899: 24.1.50; Weird names and unhelpful docstrings for some python function Ivan Andrus
2012-07-10 22:23 ` Stefan Monnier
2012-07-11 1:14 ` Fabián Ezequiel Gallina
2012-07-11 12:42 ` Ivan Andrus
2012-07-13 3:45 ` Fabián Ezequiel Gallina [this message]
2012-07-13 12:20 ` Stefan Monnier
2012-07-16 13:22 ` Fabián Ezequiel Gallina
2012-07-17 11:08 ` Ivan Andrus
2012-07-17 18:04 ` Fabián Ezequiel Gallina
2012-07-13 5:02 ` Chong Yidong
2012-07-14 2:16 ` Leo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FFF99D6.6040909@anue.biz \
--to=fabian@anue.biz \
--cc=11899@debbugs.gnu.org \
--cc=darthandrus@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).