From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carlos Pita Newsgroups: gmane.emacs.bugs Subject: bug#19954: python.el: more consistent sexp navigation Date: Thu, 26 Feb 2015 14:26:04 -0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1424971653 9722 80.91.229.3 (26 Feb 2015 17:27:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Feb 2015 17:27:33 +0000 (UTC) To: 19954@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 26 18:27:21 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YR2DU-0000KF-BN for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Feb 2015 18:27:16 +0100 Original-Received: from localhost ([::1]:60127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR2DT-0000wB-MK for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Feb 2015 12:27:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR2DL-0000p1-Uk for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2015 12:27:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR2DI-00082I-4w for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2015 12:27:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR2DG-00081x-On; Thu, 26 Feb 2015 12:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YR2DG-00010C-CY; Thu, 26 Feb 2015 12:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: fgallina@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Feb 2015 17:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19954 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: fgallina@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14249716123834 (code B ref -1); Thu, 26 Feb 2015 17:27:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Feb 2015 17:26:52 +0000 Original-Received: from localhost ([127.0.0.1]:58882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YR2D5-0000zl-ND for submit@debbugs.gnu.org; Thu, 26 Feb 2015 12:26:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52763) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YR2D3-0000zY-DL for submit@debbugs.gnu.org; Thu, 26 Feb 2015 12:26:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR2Cs-0007vp-9A for submit@debbugs.gnu.org; Thu, 26 Feb 2015 12:26:43 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR2Cs-0007vj-70 for submit@debbugs.gnu.org; Thu, 26 Feb 2015 12:26:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR2Cn-00085M-Ce for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2015 12:26:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR2Ch-0007uW-PE for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2015 12:26:33 -0500 Original-Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:36199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR2Ch-0007tw-ID for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2015 12:26:27 -0500 Original-Received: by labgq15 with SMTP id gq15so12500754lab.3 for ; Thu, 26 Feb 2015 09:26:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=VOr4yptZBzr3HJpexUvNIxuoGqKZTC1T6eDaZSiPpLY=; b=Qdcp/nHetfxfhuFfrS82RkkqxSYxS8dt2LNP/3oGsVpftcvoJdsqRL26QnDCcKbaGU PW1HKvWFfPgdqceCEqtN7/IQ/IrhH8ooYhNxKYO+6gohy0sc4twpQjthl2ysei3wll+p ROmnDn0Zaj08ggN6ZovK0p5B6FlsTVNLuD6qXZ9ul+69j/Ij1wlRDu8adVy8lM0/t4wP JbTvtWiht+TU4HFY829JqSTMCm5ioMcQQMpj4ruglKbW23mzxQCRao0y89cqxet+KJDz InDELTAZnKiK3zzLhF8bn16efY6IEzDjdK0F7SSAwUyRVDYCINviCGTJ9ohSRXRq2K84 Ma9Q== X-Received: by 10.112.170.100 with SMTP id al4mr8844617lbc.42.1424971586042; Thu, 26 Feb 2015 09:26:26 -0800 (PST) Original-Received: by 10.112.6.74 with HTTP; Thu, 26 Feb 2015 09:26:04 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99842 Archived-At: X-Debbugs-CC: fgallina@gnu.org If this is a feature I recognize I don't understand the rationally behind it: [...] (and (not forward-p) (eq (syntax-class (syntax-after (1- (point)))) (car (string-to-syntax ")"))))) ;; Inside a paren or looking at it, lisp knows what to do. Say * is the point. The inconsistency I find is that C-M-left will do very different things while at the end of different lines: A) from sklearn.cross_validation import KFold* --> *from sklearn.cross_validation import KFold B) n = len(train.y)* --> n = len*(train.y) I think the intention is to nav at the "statement/block level" when the point is at the end of the line. The difference of behaviour between A and B can't be reconciled at any level: sexp, list, statement, block. My expectation would be: B') n = len(train.y)* --> *n = len(train.y) B'') n = len(train.y*) --> n = len(train.*y) Notice that this is even more conspicuous at the end of a block: C) for x in range(0, 10): x = 2 print("hello")* --> for x in range(0, 10): x = 2 print*("hello") D) for x in range(0, 10): print("hello") x = 2* --> *for x in range(0, 10): print("hello") x = 2 I vote for removing the (syntax-after (1- (point)) special case as IMO it only adds confussion to the already complex nav rules. Cheers -- Carlos