From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rasmus Newsgroups: gmane.emacs.bugs Subject: bug#20897: 25.0.50; [python] sexp-movement are confusing Date: Thu, 25 Jun 2015 18:46:46 +0200 Message-ID: <87wpyrka6h.fsf@gmx.us> References: <87616blr7a.fsf@gmx.us> <558C296B.7030807@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1435251089 27667 80.91.229.3 (25 Jun 2015 16:51:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jun 2015 16:51:29 +0000 (UTC) To: 20897@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 25 18:51:16 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 1Z8AMr-0007at-Ei for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jun 2015 18:51:13 +0200 Original-Received: from localhost ([::1]:56648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8AMq-0004bc-UZ for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jun 2015 12:51:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8AMn-0004bG-5h for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 12:51:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8AMh-0005sj-Ml for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 12:51:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8AMh-0005ry-51 for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 12:51:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z8AMg-0000yU-KK for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 12:51:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87616blr7a.fsf@gmx.us> Resent-From: Rasmus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jun 2015 16:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20897 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14352510303707 (code B ref -1); Thu, 25 Jun 2015 16:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Jun 2015 16:50:30 +0000 Original-Received: from localhost ([127.0.0.1]:57425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8AM8-0000xg-HD for submit@debbugs.gnu.org; Thu, 25 Jun 2015 12:50:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38807) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8AM4-0000xQ-Qq for submit@debbugs.gnu.org; Thu, 25 Jun 2015 12:50:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8ALy-00053v-KM for submit@debbugs.gnu.org; Thu, 25 Jun 2015 12:50:19 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:37684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8ALy-00053r-Ht for submit@debbugs.gnu.org; Thu, 25 Jun 2015 12:50:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8ALx-0003xp-Bn for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 12:50:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8ALu-00051T-5J for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 12:50:17 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:36141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8ALt-00050w-UI for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 12:50:14 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z8AIf-0003eS-4c for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 18:46:53 +0200 Original-Received: from 90.163.164.75 ([90.163.164.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Jun 2015 18:46:53 +0200 Original-Received: from rasmus by 90.163.164.75 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Jun 2015 18:46:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 90.163.164.75 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:6dnYR63blCYa1rB08HVKQUBLqwA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:104344 Archived-At: Hi, Andreas Röhler writes: >> Sexp movement in python.el are very confusing to me. I know that logical >> sexp movements outside lisp are subjective, > > Not more as anything else editor-related. Languages are composed by > elements, which a syntax may describe. Even if an editor must not be > the slave of a syntax, it should be aware of. That is probably true. I really just want to be able to bent python.el to work with my internal "fast" logic which controls how I type on keyboard. >> and I know that the behavior >> isn't wrong. > > It behaves arbitrary WRT Python syntax, that's wrong. OK. I'm not sure. I can somehow imagine parentheses that would justify the movements cf. below. But in lisp it would not go from one "nesting" to another, which is essentially what bugs me. > Python is composed by expressions. > If inside an expression C-M-f should to to its end. > > From end to next end same level if existing - or level up, or next > top-level-form, or nil at EOB > > Backward and forward needs to be consistent. I'm not sure I understand. The way I think about it is like the following. If I'm at point 2 and move backward I really want to be a point 1. But in python point 0 and 1 is the same, so it assumes the outer level which has end point 4. But I at most want to go to point 3, closing the "nearest" "sexp". 01 2 3 vv v V ((defun name (arg)) ...) ^ 4 Rasmus -- Don't panic!!!