From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#29608: python.el movement functions Date: Fri, 08 Dec 2017 12:56:44 -0500 Message-ID: <5refo5xfvn.fsf@fencepost.gnu.org> References: <87vahigsa9.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1512755867 2484 195.159.176.226 (8 Dec 2017 17:57:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 8 Dec 2017 17:57:47 +0000 (UTC) User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: 29608@debbugs.gnu.org To: Alex Branham Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 08 18:57:43 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNMu5-0000VB-SZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Dec 2017 18:57:41 +0100 Original-Received: from localhost ([::1]:38446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNMuB-0003ll-Oq for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Dec 2017 12:57:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNMtS-0003HH-W9 for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2017 12:57:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNMtS-0005IQ-A6 for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2017 12:57:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44125) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eNMtS-0005I4-7U for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2017 12:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eNMtR-00058S-Sp for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2017 12:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Dec 2017 17:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29608 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29608-submit@debbugs.gnu.org id=B29608.151275581419725 (code B ref 29608); Fri, 08 Dec 2017 17:57:01 +0000 Original-Received: (at 29608) by debbugs.gnu.org; 8 Dec 2017 17:56:54 +0000 Original-Received: from localhost ([127.0.0.1]:52806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNMtK-000585-KX for submit@debbugs.gnu.org; Fri, 08 Dec 2017 12:56:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNMtI-00057q-UJ for 29608@debbugs.gnu.org; Fri, 08 Dec 2017 12:56:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNMtC-00056g-OI for 29608@debbugs.gnu.org; Fri, 08 Dec 2017 12:56:47 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNMtB-00054f-D3; Fri, 08 Dec 2017 12:56:45 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1eNMtB-0002Jw-0P; Fri, 08 Dec 2017 12:56:45 -0500 X-Spook: diwn H5N1 Worm PGP Centro Shots fired Nuclear facility X-Ran: O4'8Q.R<:~>wJm@|h}G?c9@j+&>h~oT2YgQ~=dl)hw'tNET,_?QhE[p8&BO&FJNJYpyP~/ X-Hue: white X-Attribution: GM In-Reply-To: <87vahigsa9.fsf@gmail.com> (Alex Branham's message of "Thu, 07 Dec 2017 15:08:30 -0600") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140829 Archived-At: Alex Branham wrote: > Python movement statements do not always result in the behavior I'd > expect. Consider this python file (with (|) representing point): > > (|)for i in [1, 2, 3]: > print(i) > > I'd expect M-x python-nav-forward-statement to result in > > for i in [1, 2, 3]: > print(i) > (|) > > but instead you wind up with > > for i in [1, 2, 3]: > (|)print(i) The actual result seems reasonable to me? > and python-nav-forward-block (bound to M-e) is even worse. It results > in point not moving at all: > > (|)for i in [1, 2, 3]: > print(i) It seems that you disagree with python.el's definition of "statement" and "block". Eg the block definition seems to be: (defconst python-rx-constituents `((block-start . ,(rx symbol-start (or "def" "class" "if" "elif" "else" "try" "except" "finally" "for" "while" "with" ;; Python 3.5+ PEP492 (and "async" (+ space) (or "def" "for" "with"))) symbol-end))