From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 11:54:26 2015 Received: (at submit) by debbugs.gnu.org; 25 Jun 2015 15:54:26 +0000 Received: from localhost ([127.0.0.1]:57396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z89Tr-00083l-Th for submit@debbugs.gnu.org; Thu, 25 Jun 2015 11:54:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45963) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z89To-00083V-IQ for submit@debbugs.gnu.org; Thu, 25 Jun 2015 11:54:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z89Tb-0000fv-8i for submit@debbugs.gnu.org; Thu, 25 Jun 2015 11:54:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z89Tb-0000fi-5v for submit@debbugs.gnu.org; Thu, 25 Jun 2015 11:54:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z89TY-0001OC-4t for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 11:54:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z89TT-0000cZ-Tb for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 11:54:04 -0400 Received: from mout.gmx.net ([212.227.17.22]:59273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z89TT-0000bU-Ka for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 11:53:59 -0400 Received: from x200s ([90.163.164.75]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MVayZ-1ZaXCG1vJ9-00Z20m for ; Thu, 25 Jun 2015 17:53:58 +0200 From: Rasmus To: bug-gnu-emacs@gnu.org Subject: 25.0.50; [python] sexp-movement are confusing Date: Thu, 25 Jun 2015 17:53:45 +0200 Message-ID: <87616blr7a.fsf@gmx.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:sTBNAP0I7wmiLNXgNrDLEOIZvkQQLGnK+Xfkeoh2YBVmDQXGJ0v 06bSmJqpD9+ChqwFBhi042rxCaL4ZB0zUve5ylahe43vZXo6S9LdixIszhyX2JtU+TMtsvf NjJs3KJZzNTpiVsVuqRFAbhvMN0P8i1uAferGGe2402JThnUW7XWP0dh9obLXH9/tAh4S/p QW3eXFQXPdDIVQTPWYsLA== X-UI-Out-Filterresults: notjunk:1;V01:K0:eZaZjOAXwis=:yJGwdlmw1PGo97VOaYnEeR AI0nY/Jy5mPCu2ys5znsbIbE9MFi8NtjACXgJFnvRhU/lp3egaewhDQwhrLW5Vq10Zus6+xH0 kJOgveCmf29B8LxuAr3GdsLwUCrEWx9+VkqbWydgqp8pi/a9k3386jnR1xt+WZfIlNSonFMAN PKPcHk59/0zOd4+AybyNXoj8pF7Xc7e4EqFXAd0/e/tneU1KGc4onQtr+GziNn4Ls3qpg+KiZ EfU+LyShec8oi8+PeWCDxKEqx1lBMITAQjQBL2+kwgfDmPq4lmBWQziqGhnoIbVS+/onFmkbz LsHE1wCW66u3VmSx+jnY2AjqUGW43rG2KYWHqVuE2yjVVQezIlObRRjCTIM8oC501cG+feW1L PDF2j95qFHEKwWGWTi7RIbxECwkAPx9e9pTZsgRTWHCXGntCRB8+QPIVzcSZzQKPC5qDWIF7+ Uvrqlac8Yr8JZHYP4N36EeXmEcWFt9PkAAPkmXVXaq5v3tEzv5tc9TIyhBSdEQbFqNDqwJGtR WDF54j/QrYSsOWckNR5iVPiSw14YErQQhK22ReJzk1zdnRiAHZheLyhWyAU/J6nCmQZMTU05B IEURs5gK5kADWzmzb2wcidEIY2XzJrxq1yp+vizPQEtjXu1ej0hmTYFQQPOfDENuLmrN/KCuD qusIhrid/nOC6mrD4Ap3hccwmCf6IvVqVZEmVjncwnu/nz6chUaRY7MDPwpPW/Nm51ks= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Hi, Sexp movement in python.el are very confusing to me. I know that logical sexp movements outside lisp are subjective, and I know that the behavior isn't wrong. I understand why it does what it does. The behavior is just confusing when I use it an practice. Example, starting from emacs -q: Open test.py Insert something like this, ignoring point denoted by "{v,^} {1,...,5}". 4 5 6 v v v def foo(x): """return x as one""" x = 1; return(x) ^ ^ ^ 2 3 1 Consider points 1,...,5. At point 2 forward-sexp will go to point 1, at point 3 backward-sexp will go to point 2. At point 1, sexp-backward will go to 4 rather than point 2 (as I would expect). Likewise, at point 4, forward sexp goes to point 1 rather than 5. At point five, everything is as I would expect, and {forward,backward}-sexp goes to 6 and 4. A switch to prefer a closer opening/closing of the "sexp" at point would be great. Thanks, Rasmus In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.4) of 2015-06-21 on x200s Repository revision: 821a3633564f36857968c7fe2b8bb6681a895905 Windowing system distributor `The X.Org Foundation', version 11.0.11702000 Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --pdfdir=/usr/share/doc/emacs/pdf --with-sound=alsa --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 Important settings: value of $LC_MONETARY: en_DK.utf8 value of $LC_NUMERIC: en_DK.utf8 value of $LC_TIME: en_DK.utf8 value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Group Minor modes in effect: magit-auto-revert-mode: t recentf-mode: t shell-dirtrack-mode: t pdf-occur-global-minor-mode: t gnus-topic-mode: t hl-line-mode: t cursor-sensor-mode: t gnus-undo-mode: t nyan-mode: t global-company-mode: t company-mode: t diff-auto-refine-mode: t ido-everywhere: t global-auto-revert-mode: t which-function-mode: t winner-mode: t delete-selection-mode: t show-paren-mode: t electric-pair-mode: t savehist-mode: t save-place-mode: t tooltip-mode: t global-eldoc-mode: t electric-layout-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t global-visual-line-mode: t visual-line-mode: t transient-mark-mode: t Recent messages: Reading active file via nnnil...done Reading active file via nndraft...done Checking new news...done nnimap read 0k from mail Checking new news... Reading active file via nnnil...done Reading active file via nndraft...done Checking new news...done funcall-interactively: Buffer is read-only: # Quit Load-path shadows: /home/rasmus/.emacs.d/lisp/abbrev hides /usr/share/emacs/25.0.50/lisp/abbrev /usr/share/emacs/site-lisp/org/ox-texinfo hides /usr/share/emacs/25.0.50/lisp/org/ox-texinfo /usr/share/emacs/site-lisp/org/ox-publish hides /usr/share/emacs/25.0.50/lisp/org/ox-publish /usr/share/emacs/site-lisp/org/ox-org hides /usr/share/emacs/25.0.50/lisp/org/ox-org /usr/share/emacs/site-lisp/org/ox-odt hides /usr/share/emacs/25.0.50/lisp/org/ox-odt /usr/share/emacs/site-lisp/org/ox-md hides /usr/share/emacs/25.0.50/lisp/org/ox-md /usr/share/emacs/site-lisp/org/ox-man hides /usr/share/emacs/25.0.50/lisp/org/ox-man /usr/share/emacs/site-lisp/org/ox-latex hides /usr/share/emacs/25.0.50/lisp/org/ox-latex /usr/share/emacs/site-lisp/org/ox-icalendar hides /usr/share/emacs/25.0.50/lisp/org/ox-icalendar /usr/share/emacs/site-lisp/org/ox-html hides /usr/share/emacs/25.0.50/lisp/org/ox-html /usr/share/emacs/site-lisp/org/ox hides /usr/share/emacs/25.0.50/lisp/org/ox /usr/share/emacs/site-lisp/org/ox-beamer hides /usr/share/emacs/25.0.50/lisp/org/ox-beamer /usr/share/emacs/site-lisp/org/ox-ascii hides /usr/share/emacs/25.0.50/lisp/org/ox-ascii /usr/share/emacs/site-lisp/org/org-w3m hides /usr/share/emacs/25.0.50/lisp/org/org-w3m /usr/share/emacs/site-lisp/org/org-timer hides /usr/share/emacs/25.0.50/lisp/org/org-timer /usr/share/emacs/site-lisp/org/org-table hides /usr/share/emacs/25.0.50/lisp/org/org-table /usr/share/emacs/site-lisp/org/org-src hides /usr/share/emacs/25.0.50/lisp/org/org-src /usr/share/emacs/site-lisp/org/org-rmail hides /usr/share/emacs/25.0.50/lisp/org/org-rmail /usr/share/emacs/site-lisp/org/org-protocol hides /usr/share/emacs/25.0.50/lisp/org/org-protocol /usr/share/emacs/site-lisp/org/org-plot hides /usr/share/emacs/25.0.50/lisp/org/org-plot /usr/share/emacs/site-lisp/org/org-pcomplete hides /usr/share/emacs/25.0.50/lisp/org/org-pcomplete /usr/share/emacs/site-lisp/org/org-mouse hides /usr/share/emacs/25.0.50/lisp/org/org-mouse /usr/share/emacs/site-lisp/org/org-mobile hides /usr/share/emacs/25.0.50/lisp/org/org-mobile /usr/share/emacs/site-lisp/org/org-mhe hides /usr/share/emacs/25.0.50/lisp/org/org-mhe /usr/share/emacs/site-lisp/org/org-macs hides /usr/share/emacs/25.0.50/lisp/org/org-macs /usr/share/emacs/site-lisp/org/org-macro hides /usr/share/emacs/25.0.50/lisp/org/org-macro /usr/share/emacs/site-lisp/org/org-list hides /usr/share/emacs/25.0.50/lisp/org/org-list /usr/share/emacs/site-lisp/org/org-irc hides /usr/share/emacs/25.0.50/lisp/org/org-irc /usr/share/emacs/site-lisp/org/org-inlinetask hides /usr/share/emacs/25.0.50/lisp/org/org-inlinetask /usr/share/emacs/site-lisp/org/org-info hides /usr/share/emacs/25.0.50/lisp/org/org-info /usr/share/emacs/site-lisp/org/org-indent hides /usr/share/emacs/25.0.50/lisp/org/org-indent /usr/share/emacs/site-lisp/org/org-id hides /usr/share/emacs/25.0.50/lisp/org/org-id /usr/share/emacs/site-lisp/org/org-habit hides /usr/share/emacs/25.0.50/lisp/org/org-habit /usr/share/emacs/site-lisp/org/org-gnus hides /usr/share/emacs/25.0.50/lisp/org/org-gnus /usr/share/emacs/site-lisp/org/org-footnote hides /usr/share/emacs/25.0.50/lisp/org/org-footnote /usr/share/emacs/site-lisp/org/org-feed hides /usr/share/emacs/25.0.50/lisp/org/org-feed /usr/share/emacs/site-lisp/org/org-faces hides /usr/share/emacs/25.0.50/lisp/org/org-faces /usr/share/emacs/site-lisp/org/org-eshell hides /usr/share/emacs/25.0.50/lisp/org/org-eshell /usr/share/emacs/site-lisp/org/org-entities hides /usr/share/emacs/25.0.50/lisp/org/org-entities /usr/share/emacs/site-lisp/org/org-element hides /usr/share/emacs/25.0.50/lisp/org/org-element /usr/share/emacs/site-lisp/org/org hides /usr/share/emacs/25.0.50/lisp/org/org /usr/share/emacs/site-lisp/org/org-docview hides /usr/share/emacs/25.0.50/lisp/org/org-docview /usr/share/emacs/site-lisp/org/org-datetree hides /usr/share/emacs/25.0.50/lisp/org/org-datetree /usr/share/emacs/site-lisp/org/org-ctags hides /usr/share/emacs/25.0.50/lisp/org/org-ctags /usr/share/emacs/site-lisp/org/org-crypt hides /usr/share/emacs/25.0.50/lisp/org/org-crypt /usr/share/emacs/site-lisp/org/org-compat hides /usr/share/emacs/25.0.50/lisp/org/org-compat /usr/share/emacs/site-lisp/org/org-colview hides /usr/share/emacs/25.0.50/lisp/org/org-colview /usr/share/emacs/site-lisp/org/org-clock hides /usr/share/emacs/25.0.50/lisp/org/org-clock /usr/share/emacs/site-lisp/org/org-capture hides /usr/share/emacs/25.0.50/lisp/org/org-capture /usr/share/emacs/site-lisp/org/org-bibtex hides /usr/share/emacs/25.0.50/lisp/org/org-bibtex /usr/share/emacs/site-lisp/org/org-bbdb hides /usr/share/emacs/25.0.50/lisp/org/org-bbdb /usr/share/emacs/site-lisp/org/org-attach hides /usr/share/emacs/25.0.50/lisp/org/org-attach /usr/share/emacs/site-lisp/org/org-archive hides /usr/share/emacs/25.0.50/lisp/org/org-archive /usr/share/emacs/site-lisp/org/org-agenda hides /usr/share/emacs/25.0.50/lisp/org/org-agenda /usr/share/emacs/site-lisp/org/ob-tangle hides /usr/share/emacs/25.0.50/lisp/org/ob-tangle /usr/share/emacs/site-lisp/org/ob-table hides /usr/share/emacs/25.0.50/lisp/org/ob-table /usr/share/emacs/site-lisp/org/ob-sqlite hides /usr/share/emacs/25.0.50/lisp/org/ob-sqlite /usr/share/emacs/site-lisp/org/ob-sql hides /usr/share/emacs/25.0.50/lisp/org/ob-sql /usr/share/emacs/site-lisp/org/ob-shen hides /usr/share/emacs/25.0.50/lisp/org/ob-shen /usr/share/emacs/site-lisp/org/ob-screen hides /usr/share/emacs/25.0.50/lisp/org/ob-screen /usr/share/emacs/site-lisp/org/ob-scheme hides /usr/share/emacs/25.0.50/lisp/org/ob-scheme /usr/share/emacs/site-lisp/org/ob-scala hides /usr/share/emacs/25.0.50/lisp/org/ob-scala /usr/share/emacs/site-lisp/org/ob-sass hides /usr/share/emacs/25.0.50/lisp/org/ob-sass /usr/share/emacs/site-lisp/org/ob-ruby hides /usr/share/emacs/25.0.50/lisp/org/ob-ruby /usr/share/emacs/site-lisp/org/ob-R hides /usr/share/emacs/25.0.50/lisp/org/ob-R /usr/share/emacs/site-lisp/org/ob-ref hides /usr/share/emacs/25.0.50/lisp/org/ob-ref /usr/share/emacs/site-lisp/org/ob-python hides /usr/share/emacs/25.0.50/lisp/org/ob-python /usr/share/emacs/site-lisp/org/ob-plantuml hides /usr/share/emacs/25.0.50/lisp/org/ob-plantuml /usr/share/emacs/site-lisp/org/ob-picolisp hides /usr/share/emacs/25.0.50/lisp/org/ob-picolisp /usr/share/emacs/site-lisp/org/ob-perl hides /usr/share/emacs/25.0.50/lisp/org/ob-perl /usr/share/emacs/site-lisp/org/ob-org hides /usr/share/emacs/25.0.50/lisp/org/ob-org /usr/share/emacs/site-lisp/org/ob-octave hides /usr/share/emacs/25.0.50/lisp/org/ob-octave /usr/share/emacs/site-lisp/org/ob-ocaml hides /usr/share/emacs/25.0.50/lisp/org/ob-ocaml /usr/share/emacs/site-lisp/org/ob-mscgen hides /usr/share/emacs/25.0.50/lisp/org/ob-mscgen /usr/share/emacs/site-lisp/org/ob-maxima hides /usr/share/emacs/25.0.50/lisp/org/ob-maxima /usr/share/emacs/site-lisp/org/ob-matlab hides /usr/share/emacs/25.0.50/lisp/org/ob-matlab /usr/share/emacs/site-lisp/org/ob-makefile hides /usr/share/emacs/25.0.50/lisp/org/ob-makefile /usr/share/emacs/site-lisp/org/ob-lob hides /usr/share/emacs/25.0.50/lisp/org/ob-lob /usr/share/emacs/site-lisp/org/ob-lisp hides /usr/share/emacs/25.0.50/lisp/org/ob-lisp /usr/share/emacs/site-lisp/org/ob-lilypond hides /usr/share/emacs/25.0.50/lisp/org/ob-lilypond /usr/share/emacs/site-lisp/org/ob-ledger hides /usr/share/emacs/25.0.50/lisp/org/ob-ledger /usr/share/emacs/site-lisp/org/ob-latex hides /usr/share/emacs/25.0.50/lisp/org/ob-latex /usr/share/emacs/site-lisp/org/ob-keys hides /usr/share/emacs/25.0.50/lisp/org/ob-keys /usr/share/emacs/site-lisp/org/ob-js hides /usr/share/emacs/25.0.50/lisp/org/ob-js /usr/share/emacs/site-lisp/org/ob-java hides /usr/share/emacs/25.0.50/lisp/org/ob-java /usr/share/emacs/site-lisp/org/ob-io hides /usr/share/emacs/25.0.50/lisp/org/ob-io /usr/share/emacs/site-lisp/org/ob-haskell hides /usr/share/emacs/25.0.50/lisp/org/ob-haskell /usr/share/emacs/site-lisp/org/ob-gnuplot hides /usr/share/emacs/25.0.50/lisp/org/ob-gnuplot /usr/share/emacs/site-lisp/org/ob-fortran hides /usr/share/emacs/25.0.50/lisp/org/ob-fortran /usr/share/emacs/site-lisp/org/ob-exp hides /usr/share/emacs/25.0.50/lisp/org/ob-exp /usr/share/emacs/site-lisp/org/ob-eval hides /usr/share/emacs/25.0.50/lisp/org/ob-eval /usr/share/emacs/site-lisp/org/ob-emacs-lisp hides /usr/share/emacs/25.0.50/lisp/org/ob-emacs-lisp /usr/share/emacs/site-lisp/org/ob hides /usr/share/emacs/25.0.50/lisp/org/ob /usr/share/emacs/site-lisp/org/ob-dot hides /usr/share/emacs/25.0.50/lisp/org/ob-dot /usr/share/emacs/site-lisp/org/ob-ditaa hides /usr/share/emacs/25.0.50/lisp/org/ob-ditaa /usr/share/emacs/site-lisp/org/ob-css hides /usr/share/emacs/25.0.50/lisp/org/ob-css /usr/share/emacs/site-lisp/org/ob-core hides /usr/share/emacs/25.0.50/lisp/org/ob-core /usr/share/emacs/site-lisp/org/ob-comint hides /usr/share/emacs/25.0.50/lisp/org/ob-comint /usr/share/emacs/site-lisp/org/ob-clojure hides /usr/share/emacs/25.0.50/lisp/org/ob-clojure /usr/share/emacs/site-lisp/org/ob-C hides /usr/share/emacs/25.0.50/lisp/org/ob-C /usr/share/emacs/site-lisp/org/ob-calc hides /usr/share/emacs/25.0.50/lisp/org/ob-calc /usr/share/emacs/site-lisp/org/ob-awk hides /usr/share/emacs/25.0.50/lisp/org/ob-awk /usr/share/emacs/site-lisp/org/ob-asymptote hides /usr/share/emacs/25.0.50/lisp/org/ob-asymptote /usr/share/emacs/site-lisp/org/org-loaddefs hides /usr/share/emacs/25.0.50/lisp/org/org-loaddefs /usr/share/emacs/site-lisp/org/org-version hides /usr/share/emacs/25.0.50/lisp/org/org-version /usr/share/emacs/site-lisp/org/org-install hides /usr/share/emacs/25.0.50/lisp/org/org-install /home/rasmus/.emacs.d/elpa/emms-20150519.736/tq hides /usr/share/emacs/25.0.50/lisp/emacs-lisp/tq Features: (shadow emacsbug json-mode json-reformat json-snatcher canlock eieio-opt speedbar sb-image ezimage dframe cal-iso cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew holidays hol-loaddefs proced browse-url sh-script smie executable web-mode autoload lisp-mnt url-handlers tramp-cache magit-key-mode warnings magit view tramp tramp-compat tramp-loaddefs trampver git-rebase-mode git-commit-mode log-edit pcvs-util ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff js skewer-html skewer-mode cache-table js2-mode simple-httpd sgml-mode rect recentf tree-widget misearch multi-isearch add-log python find-dired grep dired-aux gnus-dired ffap face-remap emms-player-mpv emms-info-libtag emms-librefm-stream emms-librefm-scrobbler emms-playlist-limit emms-volume emms-volume-amixer emms-i18n emms-history emms-score emms-stream-info emms-metaplaylist-mode emms-bookmarks emms-cue emms-mode-line-icon emms-browser emms-playlist-sort emms-last-played emms-player-xine emms-player-mpd emms-playing-time emms-lyrics emms-url emms-streams emms-tag-editor emms-mark emms-mode-line emms-cache emms-info-ogginfo emms-info-mp3info emms-info later-do emms-playlist-mode emms-player-vlc emms-player-mplayer emms-player-simple emms-source-playlist emms-source-file locate emms-setup emms emms-compat quail footnote autocap cookie1 flow-fill gnus-notifications gnus-fun notifications dbus xml cal-move org-bullets cdlatex texmathp reftex reftex-vars tabify org-table image-file org-rmail org-mhe org-irc org-info org-gnus org-docview doc-view org-bibtex bibtex org-bbdb org-element avl-tree org-w3m org-capture ido-completing-read+ smex pdf-sync pdf-annot bbdb-anniv diary-lib diary-loaddefs org-inlinetask org-indent org-location-google-maps org-agenda google-maps google-maps-static google-maps-geocode google-maps-base json org org-macro org-footnote org-pcomplete org-list org-faces org-entities org-version ob-shell readline-complete shell pcomplete ob-awk ob-org ob-octave ob-python ob-C ob-emacs-lisp ob-fortran cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-latex ob-R ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs pdf-outline noutline outline pdf-links pdf-history pdf-occur ibuf-ext ibuffer tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch let-alist pdf-misc pdf-tools compile comint cus-edit cus-start cus-load pdf-view jka-compr pdf-cache pdf-info tq pdf-util image-mode url-http url-gw url-auth gnus-gravatar gravatar url-cache url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse url-vars gnus-picon sort smiley ansi-color gnus-cite mm-archive mail-extr gnus-async gnus-bcklg qp gnus-ml disp-table gnus-topic hl-line cursor-sensor epa-file epa derived epg gnutls utf-7 network-stream nsm starttls nnnil gnus-demon gnus-harvest bbdb-com crm bbdb bbdb-site timezone mailalias nnir smtpmail-async smtpmail auth-source sendmail async gnus-delay gnus-draft gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime password-cache dig mailcap gnus-sum nndraft nnmh gnus-group gnus-undo gnus-start gnus-cloud nnimap tls utf7 netrc parse-time gnus-spec nnmail gnus-int gnus-range mail-source message idna dired-x dired format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win nnoo gnus gnus-ems nnheader gnus-util mail-utils mm-util help-fns mail-prsvr wid-edit gnus-switch nyan-mode server paredit checkdoc help-mode flyspell ispell cap-words superword subword company-files company-oddmuse company-keywords company-etags etags xref cl-seq eieio byte-opt bytecomp byte-compile cl-extra seq cconv eieio-core company-gtags company-dabbrev-code company-dabbrev company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb company-c-headers rx company-jedi thingatpt jedi-core python-environment epc ctable concurrent deferred cl company vc vc-dispatcher vc-git diff-mode easy-mmode bookmark pp ido autorevert filenotify which-func imenu winner ring windmove delsel paren elec-pair savehist saveplace cl-macs time-date edmacro kmacro cl-loaddefs pcase cl-lib gv finder-inf tex-site advice info easymenu package epg-config mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 3221294 73586) (symbols 48 71726 114) (miscs 40 13038 7141) (strings 32 230866 27519) (string-bytes 1 12018724) (vectors 16 90831) (vector-slots 8 2165399 85080) (floats 8 4055 3190) (intervals 56 43823 10399) (buffers 976 278) (heap 1024 145052 17505)) -- Dung makes an excellent fertilizer From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 12:16:59 2015 Received: (at submit) by debbugs.gnu.org; 25 Jun 2015 16:16:59 +0000 Received: from localhost ([127.0.0.1]:57408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z89pj-0000A5-4D for submit@debbugs.gnu.org; Thu, 25 Jun 2015 12:16:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53795) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z89ph-00009r-Gf for submit@debbugs.gnu.org; Thu, 25 Jun 2015 12:16:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z89pb-0003I7-8n for submit@debbugs.gnu.org; Thu, 25 Jun 2015 12:16:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z89pb-0003Hz-6R for submit@debbugs.gnu.org; Thu, 25 Jun 2015 12:16:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z89pZ-0004JW-ON for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 12:16:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z89pV-0003EX-LT for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 12:16:49 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:61798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z89pV-0003DW-CW for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 12:16:45 -0400 Received: from [192.168.178.31] ([77.6.204.184]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0M6mdY-1Yu5QO2acW-00wXHR for ; Thu, 25 Jun 2015 18:16:44 +0200 Message-ID: <558C296B.7030807@easy-emacs.de> Date: Thu, 25 Jun 2015 18:16:43 +0200 From: =?ISO-8859-15?Q?Andreas_R=F6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: Re: bug#20897: 25.0.50; [python] sexp-movement are confusing References: <87616blr7a.fsf@gmx.us> In-Reply-To: <87616blr7a.fsf@gmx.us> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Ws8NNHZkx417nXA6wfFSfAulyx4N/PZ6apT1zYhuOdVox7xUFpw rn72C872vSenduq6t0MYb9GX+KgT0z7T2IXvK956Zcs3+kmgQWCkuaxqE43s0xs1eSfM1cs 0RinwZTFgOC4ESpQVacEEUX5rgIL2GAXesbxTL/vT3Wx4gpj7NclpUGIbphAloq1nReDK+d s3uFndr7rKdhfQ5/XfW9w== X-UI-Out-Filterresults: notjunk:1;V01:K0:msuYzCY6Jms=:dXk8CvVcySG8jk4BEbMMiF UT5pt7Xw89lxQM98x2Kh8de9Zeq+PLMUD1z8CmFrik9TfbgP8x5pOixEFUKn6TIYUfWFMEZx4 xwzzEJWUFO/qVraxiSKpZKI3S3UuLXWAfWUfy5l64/x39yLkHw9VZ1wfecgrRNFGj3j9AM3uK edzuLru0LMcj392lKz95xS5skAzW1KD84uOH93M+8CBFNYYynZpX/BCGBBz91iYE8yVML0jYF cMH2zA2H0p9PvHRkGltWqFvwmipVvuI4BdvIXmH1p35VL7HhUKKywDfitfuDmlfO+JdYOJLRK nFzwGxGddWUaYlQX1AJMDtlbp7p65bbztElloCYGHfXbIkNjv+HHrCtjPZwMonCxpmkoVYlEb Bi8Bw/UwmC138WrCojp6YqwmugYgYYF1QOaqD7rEN09JjRBgSrAsIsKs32voWqES5bY75Fqb2 we+/UlHXQ3bOfSMNmoGH1Xp/2feyjIG7avDQ5fcPtIehJnSCZB20sOdfpRT4sPDIgKLU0RTSh LnKN+GZg/5k8l/9R61SZo7etxapMmcW4UCTz8dBk7tJmYgW9Y//0DapNY9bnyT/KEZf+F81sf yjxOzuPfBROFAL3+UfaLCdwwi3QjyvZUJvqxz5ILz2hAMWryeg5k7LSAijMvdZft72Gwvf5tZ dti1UtuRdJGb4KeayNhQdjEyZmexKJ/KDuba0Yj8PZU/kgQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Am 25.06.2015 um 17:53 schrieb Rasmus: > Hi, > > 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. > and I know that the behavior > isn't wrong. It behaves arbitrary WRT Python syntax, that's wrong. > I understand why it does what it does. The behavior is just > confusing when I use it an practice. > > Example, starting from emacs -q: > > Open test.py > > Insert something like this, ignoring point denoted by "{v,^} {1,...,5}". > > 4 5 6 > v v v > def foo(x): > """return x as one""" > > x = 1; > > return(x) > ^ ^ ^ > 2 3 1 > > Consider points 1,...,5. At point 2 forward-sexp will go to point 1, at > point 3 backward-sexp will go to point 2. At point 1, sexp-backward will > go to 4 rather than point 2 (as I would expect). Likewise, at point 4, > forward sexp goes to point 1 rather than 5. At point five, everything is > as I would expect, and {forward,backward}-sexp goes to 6 and 4. > > A switch to prefer a closer opening/closing of the "sexp" at point would > be great. > > Thanks, > Rasmus > [ ... ] 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 12:50:29 2015 Received: (at submit) by debbugs.gnu.org; 25 Jun 2015 16:50:30 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.5 required=5.0 tests=BAYES_50,FREEMAIL_FROM, FSL_HELO_BARE_IP_2,RCVD_NUMERIC_HELO autolearn=disabled version=3.3.2 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 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 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 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 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 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 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/ To: bug-gnu-emacs@gnu.org From: Rasmus Subject: Re: bug#20897: 25.0.50; [python] sexp-movement are confusing Date: Thu, 25 Jun 2015 18:46:46 +0200 Lines: 51 Message-ID: <87wpyrka6h.fsf@gmx.us> References: <87616blr7a.fsf@gmx.us> <558C296B.7030807@easy-emacs.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) 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!!! From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 13:24:03 2015 Received: (at submit) by debbugs.gnu.org; 25 Jun 2015 17:24:04 +0000 Received: from localhost ([127.0.0.1]:57430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8Asc-0001mH-8K for submit@debbugs.gnu.org; Thu, 25 Jun 2015 13:24:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50633) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8Asa-0001ly-Jc for submit@debbugs.gnu.org; Thu, 25 Jun 2015 13:24:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8AsU-00053D-Cc for submit@debbugs.gnu.org; Thu, 25 Jun 2015 13:23:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8AsU-000539-9X for submit@debbugs.gnu.org; Thu, 25 Jun 2015 13:23:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8AsS-00037I-T5 for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 13:23:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8AsO-00051S-Mx for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 13:23:52 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:56301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8AsO-00051J-Dj for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 13:23:48 -0400 Received: from [192.168.178.31] ([77.6.204.184]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0LrbdF-1YwW8k2s0b-013QS5 for ; Thu, 25 Jun 2015 19:23:47 +0200 Message-ID: <558C3922.7090506@easy-emacs.de> Date: Thu, 25 Jun 2015 19:23:46 +0200 From: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: Re: bug#20897: 25.0.50; [python] sexp-movement are confusing References: <87616blr7a.fsf@gmx.us> <558C296B.7030807@easy-emacs.de> <87wpyrka6h.fsf@gmx.us> In-Reply-To: <87wpyrka6h.fsf@gmx.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:2D5pM6cCUg/yFhrGhsuX3nECXv5ndXmu0z7fpjFMKT7ZnelflxZ b53vx/3eSMNqbyr4X5LNiDTWcSWOqFLfkfwjXeOdY/IEuCEjTeD9E3STdcTQMrYSZzETG/O 7ftTbWjeQ2U1XsOdJlbesvN64lV2tN+E8irMBhq+CobSHxmZ3ydPmYAOS4RkAmKoC1pmpud kqzW7RZcaZF/sfb2gc6vw== X-UI-Out-Filterresults: notjunk:1;V01:K0:UqdgIjA9i/w=:bLML8GTwW1NfBnvLd0iPQg FJm2vp/zo4M5ebYFYmF/HPnhOb4sTsgqJJv2Y6iFxYNc3bMqkJUuffqjremkORAnFaqp+wgPI 7vZ5xP2SUsl4T4jUgg9H/MaMU/OAdIUAlw51mRQ0CTTcOILfZPAkaZnZ+NeL7ZA/hKZPWB0o4 5HgmBj+M/MjS1nvCsAAgd3sgYV+Zz24IPulbK0HQ8R9wC1kOuYWc+rxuMFQYja09wbjayqoJO vTMNGkIlwYwW7vWyjCwtytrupbyx/gJZiPHaq9T5QF3418c7Y9yHPj6crGcEdN1HGIEpjrvrd gMq/+UILgIwElwob7ujGWgBv4h5MuFL8PjyaW4h7jLgL/7A7ompkRBPcnRHHy1+N9nhgGDwVw c7ym7IKUqS9YHBprnserTWU46+GPAPG/N96KtkTQwqGZZ+IJ65e/yckYReewEKmB/gafyHwNB iDX1tVvhTrI7xxYE46ZgHMjF+40Db9F+5pjS8VIIQP5tBZd+aIt/UH7GoEoJCzQ6/4+bk6qsh bXIQQKjb0tycwi0fWac7nFzRilTntFSqvPJUAsbm8i6CH5TZhYJWepCcA54YglgnHh9kVwM2N xAYUEb3JxAaWKIuV5lRNMYTuMIkXuZy0sRfW+rILA9eZ2vz6vVQgs8L1wiifoX/Ca7sHOdMSB Y7IkQkq4zSgLNofBtcwvfL3vFbtNdAx/lht4HLFs2eC4uUw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Am 25.06.2015 um 18:46 schrieb Rasmus: > 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. Don't think so WRT picture below. From end of symbol "defun" it move back to beginning "d". Because "defun" is an element of the list. Next C-M-b should go up backward - but fails. A design flaw IMO. > 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 > Not sure if I understand the double paren at picture. Rules are simple anyway: Either there is an element of same level, reach that. Or go up. Or go the end. You could try py-forward-expression, py-backward-expression. Just to study the behavior. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 21:48:35 2015 Received: (at 20897) by debbugs.gnu.org; 26 Jun 2015 01:48:36 +0000 Received: from localhost ([127.0.0.1]:57655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8Ikt-0007Be-Es for submit@debbugs.gnu.org; Thu, 25 Jun 2015 21:48:35 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:50781) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8Ikq-0007BV-H0 for 20897@debbugs.gnu.org; Thu, 25 Jun 2015 21:48:33 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t5Q1mU8C024647; Thu, 25 Jun 2015 21:48:31 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id A215BAE182; Thu, 25 Jun 2015 21:48:30 -0400 (EDT) From: Stefan Monnier To: Andreas =?windows-1252?Q?R=F6hler?= Subject: Re: bug#20897: 25.0.50; [python] sexp-movement are confusing Message-ID: References: <87616blr7a.fsf@gmx.us> <558C296B.7030807@easy-emacs.de> Date: Thu, 25 Jun 2015 21:48:30 -0400 In-Reply-To: <558C296B.7030807@easy-emacs.de> ("Andreas =?windows-1252?Q?R?= =?windows-1252?Q?=F6hler=22's?= message of "Thu, 25 Jun 2015 18:16:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5348=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5348> : inlines <3288> : streams <1461519> : uri <1969377> X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 20897 Cc: 20897@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) > If inside an expression C-M-f should to to its end. No, as explained elsewhere, C-M-f's binding is a binding that goes to the end of the expression that immediately *follows* point. If we're *inside* a sexp, the way to jump to its end is up-list. I understand you want/like to jump to the end of the enclosing expression, and that's fine, but this is not what C-M-f should do by default. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 22:03:51 2015 Received: (at 20897) by debbugs.gnu.org; 26 Jun 2015 02:03:51 +0000 Received: from localhost ([127.0.0.1]:57663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8Ize-0007ZE-QC for submit@debbugs.gnu.org; Thu, 25 Jun 2015 22:03:51 -0400 Received: from dancol.org ([96.126.100.184]:50075) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8Izb-0007Z4-5l for 20897@debbugs.gnu.org; Thu, 25 Jun 2015 22:03:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=f+FgauRTG2QIUbzsGO1Mb31Fz+T9BQwVQpn3QHqTXEM=; b=Fzkn3A4vw4vg5HZhBMw8oDTRMPgYgBAFuFrqYU2OIn6KMoUuyLAuTwaBVHfZTIdlFtKVmkjEjmEQc+GQBGDOzkQtzcsnMaFJkKlq9qmQMI+HgeyuG+mb7tdp97/DaKA+xPdmIJ9jyiVeHSFuBSuV+1ubVkZQhR6fN5nBg5udC+spjRI7JN9sMGDT6mQGpiyDaPJf7e4RpqEy+DKB6d95Tw/J2dqSmy2MePUonVq//2SdOjisVeK9mEJ0xunSxB/fZ5z4HJTw+fRzRKD4hwbJ2b2N0y7wpQEGnBFku5ncp7di23Y59vhDraTc8MCLlmxv1nAH6dce+BceVbYEWsI3eg==; Received: from [2620:10d:c081:1110:8000::24bb] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1Z8IzX-000277-Ms; Thu, 25 Jun 2015 19:03:43 -0700 Message-ID: <558CB2F8.4060600@dancol.org> Date: Thu, 25 Jun 2015 22:03:36 -0400 From: Daniel Colascione User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Stefan Monnier , =?windows-1252?Q?Andreas_?= =?windows-1252?Q?R=F6hler?= Subject: Re: bug#20897: 25.0.50; [python] sexp-movement are confusing References: <87616blr7a.fsf@gmx.us> <558C296B.7030807@easy-emacs.de> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ChwHFLcDcTs69jvH9oHC1OebF2d3G6w1M" X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 20897 Cc: 20897@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ChwHFLcDcTs69jvH9oHC1OebF2d3G6w1M Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 06/25/2015 09:48 PM, Stefan Monnier wrote: >> If inside an expression C-M-f should to to its end. >=20 > No, as explained elsewhere, C-M-f's binding is a binding that goes to > the end of the expression that immediately *follows* point. If we're > *inside* a sexp, the way to jump to its end is up-list. >=20 > I understand you want/like to jump to the end of the enclosing > expression, and that's fine, but this is not what C-M-f should do > by default. "Right" or "wrong" aside, Python's current default behavior is just inconsistent with other modes for infix-expression languages. I tried for a long time to use the default behavior --- maybe there was some efficiency advantage that would take time to appear --- but I ended up just giving up and making python-mode work like other modes. --ChwHFLcDcTs69jvH9oHC1OebF2d3G6w1M Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJVjLL4AAoJEN4WImmbpWBlOIcP/0fkQmlW06Jvm5rqRe8JYf9U Ci/umhWK/F4VfCwmc5ZHVToOrjVFQXHiimNbEd6hR3cR2dahOB+yVoLISavqEH8H LnuGwYUYKkvogIhZqO/OGc9YSfjDpalzXyG+XiGEzLce+vEXKqo3Wu0YcxwNu1cD 8FsCoukf385MgLroKEDzk8rffsEbmpkUDdEXNNjXKRguxVzIP5wi6x2ghAKph+hK ipmVHgd0QFrJlwFRzGQZ/66peNO8oJHYJqGosBmdEU8a8hLz+R7yVTkd6uV9opK1 n+LzgtUCaPotbwMK/4TXtdp50/oGgN6o49ZhnRyMq+QMlsNqR+FchZAfqZ/1CyZY StqNUPootli29VzVltVS+U2HeKcQRe11JNvqJYNljqSbfBPaxpJFdVt6GeKLdXB6 2IrwdKfZ3g7CeZCTs+h9dKS19+husC8kJmdHoIoLFe6QgrlTQBjxQQkJ+So0X9cB ANImhxWYAaDMEgrIRxP5fT+QJ4/A6QRt517KFr/f0gb9GcPvTtQVK0E4eL3iQT8A bVOupI3NTMnQbyn7Fjb1DaAi68QzPk1TDWCr/NnmA7iANSG+GdmzDdf5J/FPOzLS VHDM20dUAzWV4yGSsrjA5ONG+Hbb1RcRQuEY7htc7bTnn2Lue44gwn3edYgvB/Lr h73RGyifBKn19UoqGMec =4vBR -----END PGP SIGNATURE----- --ChwHFLcDcTs69jvH9oHC1OebF2d3G6w1M-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 26 00:19:21 2015 Received: (at 20897) by debbugs.gnu.org; 26 Jun 2015 04:19:22 +0000 Received: from localhost ([127.0.0.1]:57691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8L6n-0002Gv-AC for submit@debbugs.gnu.org; Fri, 26 Jun 2015 00:19:21 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:56488) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8L6k-0002Gc-Bb for 20897@debbugs.gnu.org; Fri, 26 Jun 2015 00:19:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A1FgA731xV/3+MCkxcgxCEAoVVu0CEfoJNBAICgTw7EgEBAQEBAQGBCkEFg10BAQRWIxALDiYSFBgNJIg/zyMBAQEBAQUBAQEBHos6hQUHhC0BBLM/gUUjhBQigngBAQE X-IPAS-Result: A0A1FgA731xV/3+MCkxcgxCEAoVVu0CEfoJNBAICgTw7EgEBAQEBAQGBCkEFg10BAQRWIxALDiYSFBgNJIg/zyMBAQEBAQUBAQEBHos6hQUHhC0BBLM/gUUjhBQigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="128387843" Received: from 76-10-140-127.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([76.10.140.127]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 26 Jun 2015 00:19:11 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 80C1AAE1E4; Fri, 26 Jun 2015 00:19:11 -0400 (EDT) From: Stefan Monnier To: Daniel Colascione Subject: Re: bug#20897: 25.0.50; [python] sexp-movement are confusing Message-ID: References: <87616blr7a.fsf@gmx.us> <558C296B.7030807@easy-emacs.de> <558CB2F8.4060600@dancol.org> Date: Fri, 26 Jun 2015 00:19:11 -0400 In-Reply-To: <558CB2F8.4060600@dancol.org> (Daniel Colascione's message of "Thu, 25 Jun 2015 22:03:36 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 20897 Cc: Andreas =?windows-1252?Q?R=F6hler?= , 20897@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > "Right" or "wrong" aside, Python's current default behavior is just > inconsistent with other modes My comment was only about the part of Andreas's text which I quoted. It is actually unrelated to this bug-report. Sorry 'bout that, Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 26 02:03:34 2015 Received: (at 20897) by debbugs.gnu.org; 26 Jun 2015 06:03:34 +0000 Received: from localhost ([127.0.0.1]:57703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8Mjd-0005es-Pl for submit@debbugs.gnu.org; Fri, 26 Jun 2015 02:03:34 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:60747) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8Mjc-0005ef-3J for 20897@debbugs.gnu.org; Fri, 26 Jun 2015 02:03:33 -0400 Received: from [192.168.178.31] ([77.6.211.246]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0Lghtu-1YlfIW45mY-00oH3X; Fri, 26 Jun 2015 08:03:11 +0200 Message-ID: <558CEB10.8090405@easy-emacs.de> Date: Fri, 26 Jun 2015 08:02:56 +0200 From: =?windows-1252?Q?Andreas_R=F6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Daniel Colascione , Stefan Monnier Subject: Re: bug#20897: 25.0.50; [python] sexp-movement are confusing References: <87616blr7a.fsf@gmx.us> <558C296B.7030807@easy-emacs.de> <558CB2F8.4060600@dancol.org> In-Reply-To: <558CB2F8.4060600@dancol.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:vHcfMXWxcDqoDirlYfchBaPocS+9xf0Z/sjYi9VLTBBfKoAVhV6 ZLiiEsHfT0ttHt8Fs7mdHVomuK8wgD/5vP2+vVrcuje5ULyptfIEWDCqaLpPkAWncoWcZ0v rTqJV8VfosEUwmKE1dgj+6058X/GsKlBGP/y6x/uehzD1ssqYdwhCrzBZLeuWJfe1LLDbeG KhvK4TZjEAH59nqNH1wkQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:9QJ/2Zl+GXk=:Uklvc3bGfyEKjsHW6DaDs3 /o79qPhmWqDfpPGG1zjqE9fcKu5Nr3snB6wNL8WKHnYI07eTf36JY7w/BP2BUKFuP2cwyQBvA gcHtbrUB6s4/uIsxibB1lbL6PevE1W+CWJLxfvV6oODq/WWk7DWpLtVquWlKoIiA11UhyV/Uk qfQ9FTRh2vT7KI+QaYoLbT7yiMuv99w3nQpc/XPkbo35FCnMYUQxnoMTRcQKqIwCl2LPZo0S1 xHgmnzWbW0MGhJ7IBB3z66G5OYZKjmkaH1ZicEaJarMpmUWyHOkabvqT0qp4rmcNZpYFShOK+ xlvRsmfPT8cM51ezGZPAH++XMMyeXJsSVwuOLrlzjo9MXgJbdjQCc52ssWXy3SArA+xUGqBS/ Kf7/9CKqcc884jHUOLbHGNeGPw0WopC1Ac7E398b+EoaPsrTvIkXUXmQpVaxrphrjkq0rW0Sb MdyreHK2LEO64/zwlFLhhHNjjuX1xnFrdAcq/2LPd0PxfEpTszJ9oEDNLWKXt5n4aDY7hjyjg IMK1tM0yau8m7s5vomf8cfyxwycSn+1ry8q3xWSwwuY5dz98CSPgvUDroXxQAqT7mxTltxxnU v7j8ySJMk3aPsNQh7KITasWwm4Cabkdhnw9a3bvVmCRr/QuEl71zTjEmJAOPcJUQVWPNZjrvV 6i36fQ4Gq2aqiMaplYMdHeuEZqDCZfnHGoRTnsnge0IGMxAYRU4hvZfVRPBYt3YJ2O6CrC6qn Vbo5g/ZsZlx/vX7fOnPWVgGNs4ZM5JNdIZsdKDwiQQ7t3mRKFZgAnlH5etI= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20897 Cc: 20897@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Am 26.06.2015 um 04:03 schrieb Daniel Colascione: > On 06/25/2015 09:48 PM, Stefan Monnier wrote: >>> If inside an expression C-M-f should to to its end. >> No, as explained elsewhere, C-M-f's binding is a binding that goes to >> the end of the expression that immediately *follows* point. If we're >> *inside* a sexp, the way to jump to its end is up-list. >> >> I understand you want/like to jump to the end of the enclosing >> expression, and that's fine, but this is not what C-M-f should do >> by default. > "Right" or "wrong" aside, Python's current default behavior is just > inconsistent with other modes for infix-expression languages. I tried > for a long time to use the default behavior --- maybe there was some > efficiency advantage that would take time to appear --- but I ended up > just giving up and making python-mode work like other modes. > If you could try python-mode.el's py-forward/backward-expression commands, that would be much appreciated. Won't be surprised, should some bug show-up there too - just don't see any at the moment. Thanks all, Andreas From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 26 02:17:28 2015 Received: (at 20897) by debbugs.gnu.org; 26 Jun 2015 06:17:28 +0000 Received: from localhost ([127.0.0.1]:57707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8Mx6-0005y4-09 for submit@debbugs.gnu.org; Fri, 26 Jun 2015 02:17:28 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:58476) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8Mx3-0005xr-8I for 20897@debbugs.gnu.org; Fri, 26 Jun 2015 02:17:25 -0400 Received: from [192.168.178.31] ([77.6.211.246]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0Lgc4H-1YlO813U1N-00nwgs; Fri, 26 Jun 2015 08:17:16 +0200 Message-ID: <558CEE6A.1020000@easy-emacs.de> Date: Fri, 26 Jun 2015 08:17:14 +0200 From: =?windows-1252?Q?Andreas_R=F6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Daniel Colascione , Stefan Monnier Subject: Re: bug#20897: 25.0.50; [python] sexp-movement are confusing References: <87616blr7a.fsf@gmx.us> <558C296B.7030807@easy-emacs.de> <558CB2F8.4060600@dancol.org> In-Reply-To: <558CB2F8.4060600@dancol.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:mR7RUrM+ccC3dFm46LOiV8PbntC2nwvT6apqTwGr4c5APYqjOzH meBniWCM2ugFKUec4gRLsRVwY7lbdJSyJKFwCrAzKOfYUhzw+6kuUkp8Pis9/u0Do7AJ85C KP42JAFN31nvRuj3ONxH2jKfe3s5EUdQhTArrd8eC18N7Nd1L7l+NxAxSWhHmJnnvSBrlno vGmFQC5cDj95foyNKSnwQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:YW8bSxz+lNY=:GVFEU3f+rraticg/d4HmFB SlzzVwZ/UGQRNQv9HWPPvX//Fav7CXDbtEVm8igR9OxibGFDAVniUBhVZdZPlXHnHE+qiV+c8 5Vaj3NMnPqJGYENMS5Md3LfnY87ch6EC7hnyjTQIlYrgSV/QPW4FI/ZEh+P0yohXXc9yHwzmQ 2lGngLjKJps6GwNnD+Q4MU7SkMOV2VjWOD31wPncLqtILZi5qO9vTCvKSdTWytepX30nu7Le9 s5hVlOKXMrBvgjJ4AKiA5FuXB/Ng7u4mtimpUnifACdTohoRr6yUNO1ioDqtwbrXBuFTowmCK me+YvfZkfxg2D5/xBe1c8xJ2zALRQDGH5yx8IqntT6+aJl1dHCZ+agrfxMvWsiJJulEHgCXeZ PD9GTz5sPWW42U4iJgD5psc3tlSkDIw/tJJJtcpkFXUeWfZ1LzbrS5WDzeXqsQsyUwzmHSmJ6 tiVuKpOOVbs5ImBQ5Knv/zmI1le+wscW2TSzojordb8+0qlJ6dK18Gr2Lt4TwI6dCEy9GUXIX eRLK3ZhMamBhXNaWTeNLwVMmLhqxC9oNkZ0O9SuNI31I247x/RJzPcwt6g8DSHj4/cX5n4xwA bgEKEY3jdcToSIMo9OPNybl/Ce52Rmb8EsEk1ZylscmArUwWHZNKHnF7Cz3ts/hvwJH/AGdzP B9VARJqipEVYuhkMdTID83+MNqiOmPVMtm98e6aVP1HwrrQ== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20897 Cc: 20897@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Am 26.06.2015 um 04:03 schrieb Daniel Colascione: > On 06/25/2015 09:48 PM, Stefan Monnier wrote: >>> If inside an expression C-M-f should to to its end. >> No, as explained elsewhere, C-M-f's binding is a binding that goes to >> the end of the expression that immediately *follows* point. If we're >> *inside* a sexp, the way to jump to its end is up-list. >> >> I understand you want/like to jump to the end of the enclosing >> expression, and that's fine, but this is not what C-M-f should do >> by default. > "Right" or "wrong" aside, Python's current default behavior is just > inconsistent with other modes for infix-expression languages. I tried > for a long time to use the default behavior --- maybe there was some > efficiency advantage that would take time to appear --- but I ended up > just giving up and making python-mode work like other modes. > Just to give an example syntax-oriented doesn't mean being enslaved by syntax: operators in Python are expressions, but sexp should jump over, as symbol-at-point is available. In case some more specific is needed, py-partial-expression is delivered. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 03 16:11:16 2022 Received: (at 20897) by debbugs.gnu.org; 3 Feb 2022 21:11:16 +0000 Received: from localhost ([127.0.0.1]:58078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFjNr-0005LL-Ot for submit@debbugs.gnu.org; Thu, 03 Feb 2022 16:11:15 -0500 Received: from quimby.gnus.org ([95.216.78.240]:55304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFjNq-0005L5-7b for 20897@debbugs.gnu.org; Thu, 03 Feb 2022 16:11:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PN0WeVS0/IleebnDtbCc/ZT60papEP6rQM/xoIeDGIY=; b=AnJQQvziFgJy9M1jxlx43fCY5Y hcdAs7LEGxbk6q7AJLOpJAuOQI+sMRN49owdpqS+lLnC5smiNmiE8qmgUjyq+1PLlre/+nd5gVqet EeFvo6pJm7Pa6LPc18OMnztDhsjXscsBq9EYlXNdFq+OXsTvXi8J56ajMpkY1f1bDuC0=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFjNg-0004Zc-MJ; Thu, 03 Feb 2022 22:11:07 +0100 From: Lars Ingebrigtsen To: Rasmus Subject: Re: bug#20897: 25.0.50; [python] sexp-movement are confusing References: <87616blr7a.fsf@gmx.us> X-Now-Playing: New Fads's _Love It All_: "Every Once In A While" Date: Thu, 03 Feb 2022 22:11:04 +0100 In-Reply-To: <87616blr7a.fsf@gmx.us> (rasmus@gmx.us's message of "Thu, 25 Jun 2015 17:53:45 +0200") Message-ID: <878rurlkpj.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Rasmus writes: > Open test.py > > Insert something like this, ignoring point denoted by "{v,^} {1,...,5}". > > 4 5 6 > v v v > def foo(x): > """return x as one""" > > x = 1; > > return(x) > ^ ^ ^ > 2 3 1 > > Conside [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20897 Cc: 20897@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Rasmus writes: > Open test.py > > Insert something like this, ignoring point denoted by "{v,^} {1,...,5}". > > 4 5 6 > v v v > def foo(x): > """return x as one""" > > x = 1; > > return(x) > ^ ^ ^ > 2 3 1 > > Consider points 1,...,5. At point 2 forward-sexp will go to point 1, at > point 3 backward-sexp will go to point 2. At point 1, sexp-backward will > go to 4 rather than point 2 (as I would expect). Likewise, at point 4, > forward sexp goes to point 1 rather than 5. At point five, everything is > as I would expect, and {forward,backward}-sexp goes to 6 and 4. (I'm going through old bug reports that unfortunately weren't resolved at the time.) Point movement at 2 has been fixed -- it now goes to 3 (in Emacs 29), not 1. As for the other points here -- that C-M- at 4 shouldn't move to 1 -- I think that would be pretty surprising. That is, these commands (try to) move by semantic unit, which is ambiguous in languages like Python, so people have differing opinions. But as far as I can tell, python-mode here works as designed, so I'm therefore closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 03 16:11:26 2022 Received: (at control) by debbugs.gnu.org; 3 Feb 2022 21:11:26 +0000 Received: from localhost ([127.0.0.1]:58081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFjO2-0005Lk-0Q for submit@debbugs.gnu.org; Thu, 03 Feb 2022 16:11:26 -0500 Received: from quimby.gnus.org ([95.216.78.240]:55318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFjO0-0005LV-QX for control@debbugs.gnu.org; Thu, 03 Feb 2022 16:11:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mL/aHuPPAV8tkGtYkXa7Ka/m/Rmm77Q3jzO77jInvbo=; b=V1zrsQpzSboW+DJtSscc4BdDRD 58B/8PRZemC6FFou3UTUDD+DDYRrvLwti1Hk9R4FBBvilTVp4uyXTnYJcucl6Ljz0xo1A9GPWD5uI LSQaKwtHP3ZABwXo6V1bl0iw2QutVjTeeR6MJC2AQppWaGBRoWdeSPUCzCGEBYIq+gpc=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFjNs-0004Zk-HT for control@debbugs.gnu.org; Thu, 03 Feb 2022 22:11:19 +0100 Date: Thu, 03 Feb 2022 22:11:14 +0100 Message-Id: <877dablkp9.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #20897 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 20897 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 20897 quit From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 03 18:23:08 2022 Received: (at 20897) by debbugs.gnu.org; 3 Feb 2022 23:23:09 +0000 Received: from localhost ([127.0.0.1]:58265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFlRU-00070i-Mw for submit@debbugs.gnu.org; Thu, 03 Feb 2022 18:23:08 -0500 Received: from mail-wm1-f41.google.com ([209.85.128.41]:56206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFlRP-0006zw-Q9 for 20897@debbugs.gnu.org; Thu, 03 Feb 2022 18:23:07 -0500 Received: by mail-wm1-f41.google.com with SMTP id r7so3248650wmq.5 for <20897@debbugs.gnu.org>; Thu, 03 Feb 2022 15:23:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=yn0y9+GEMZKMM9uTnONK+POmsO5EbrllY/x9MGeuB3w=; b=Am/M5i36tT1XYTPvR4hE7gC0fDXCZDyE0kE8E4t5WkklylOt7dBwLorNWsGLrWKF87 h7iWRYoGq+8B3YvrEFpWfHhijKf2F0nqU4mzNVU/Q2Wqv9GjnQmgfvQH7ul7aN8/Fgs9 ZGbgjPO+5w97Hch3e9cGdKbVDqYyN+FVLgJNbkClbDHOhg9M1Yk42OKQCntD2BVGUwgI ufEkBe6oampEyf97/Xi5D/S+7dO/y5pqtDZvUxqeIIedzXwE8mzXIHwgAnb2/XFds+lF c2kwmJpfUmCYbXXDpjRfCy+cya1RZZDfzoQ6JWm2X6MphcYK2Z4LcnSnKSlh8vPTuxtF +Pxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=yn0y9+GEMZKMM9uTnONK+POmsO5EbrllY/x9MGeuB3w=; b=c0zOlzoFZSU43wobTWA6IYSiOgegH2Hg6Ws8qYtv+uqzhaIEM8pVS8aQpRrsvg1g4P mL5gAQCPnVJUDli2VamR3HBVTKw5NhICWVD31P2ClqUZeq3eKnLO+UoDZkQFUCAKOeCU Q6A3a99CTgvlODUob56C5nvrV69YmxV/+yiAgt0+uxI9nr8+KotOhOi5HdJgP53L9eSW dxZhFNzinoxq0JblM2ugNImwtCMYPTZoRur+HXXUJf7qr0E9xktCG0eeM6DWB0jLe1mZ NcjvrwpdmX1URODnm3LPslVHQfD50qih5jVue9UbgPWKnJKiLGBK+u/VK1XtL/Z+RGCy rz9w== X-Gm-Message-State: AOAM531Gsmn06HJ3rYpnH/TzaaN8IX7et6ZBcKQmdE6f0Ax74eAjAFAU SGY0o9DiadWqFrMaXZsZtvgXPndRmEc= X-Google-Smtp-Source: ABdhPJzfqw1lC9PSTYoxZvazYe/PT2KM553A6EGicukob3DAbse1HXi2L8U7m3g+ZH9OWFz/V2/KKw== X-Received: by 2002:a1c:6a11:: with SMTP id f17mr9224wmc.183.1643930577798; Thu, 03 Feb 2022 15:22:57 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id c10sm183252wrq.11.2022.02.03.15.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 15:22:57 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Lars Ingebrigtsen Subject: Re: bug#20897: 25.0.50; [python] sexp-movement are confusing References: <87616blr7a.fsf@gmx.us> <878rurlkpj.fsf@gnus.org> Date: Fri, 04 Feb 2022 00:22:56 +0100 In-Reply-To: <878rurlkpj.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 03 Feb 2022 22:11:04 +0100") Message-ID: <877dabk01b.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 20897 Cc: 20897@debbugs.gnu.org, Rasmus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > As for the other points here -- that C-M- at 4 shouldn't move to > 1 -- I think that would be pretty surprising. That is, these commands > (try to) move by semantic unit, which is ambiguous in languages like > Python, so people have differing opinions. But as far as I can tell, > python-mode here works as designed, so I'm therefore closing this bug > report. FWIW, 28.1 introduces python-forward-sexp-function, which can be set to nil to have something that is, quoting the Custom tag, more "CC-mode like". For older versions, the commentary of python.el suggests an equivalent way to tweak sexp movement. I haven't checked if this option satisfies all of the OP's expectations; still, I figured it was worth mentioning in this thread FTR. From unknown Sun Aug 17 10:17:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 04 Mar 2022 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator