From unknown Sun Jun 15 08:08:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#11974 <11974@debbugs.gnu.org> To: bug#11974 <11974@debbugs.gnu.org> Subject: Status: 24.1.50; python-nav-forward-sexp-function doesn't skip over strings Reply-To: bug#11974 <11974@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:08:38 +0000 retitle 11974 24.1.50; python-nav-forward-sexp-function doesn't skip over s= trings reassign 11974 emacs submitter 11974 Ivan Andrus severity 11974 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 18 08:36:04 2012 Received: (at submit) by debbugs.gnu.org; 18 Jul 2012 12:36:04 +0000 Received: from localhost ([127.0.0.1]:47691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrTU3-0008SU-S8 for submit@debbugs.gnu.org; Wed, 18 Jul 2012 08:36:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51942) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrTU1-0008SJ-RB for submit@debbugs.gnu.org; Wed, 18 Jul 2012 08:36:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrTO6-00064X-PH for submit@debbugs.gnu.org; Wed, 18 Jul 2012 08:29: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=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:54442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrTO6-00064N-Ln for submit@debbugs.gnu.org; Wed, 18 Jul 2012 08:29:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrTO0-0005qU-TT for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 08:29:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrTNu-000624-IN for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 08:29:48 -0400 Received: from mail-bk0-f41.google.com ([209.85.214.41]:40059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrTNu-00061R-BX for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 08:29:42 -0400 Received: by bkcjc3 with SMTP id jc3so1324704bkc.0 for ; Wed, 18 Jul 2012 05:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; bh=jRXB7jw2os9lAI4KjRfw7oGZXoGURgmsiHeU3QTNQPM=; b=oSuj/irxgfY8Dk29wsHKdZQjnr5N1zp9+toW4uVN9AVescpDS0wrX6vQMddYkJrs2x kf+sj8O3G0/aJs72Qoi1wjkSPyKB/qodWB4Daj82LRZwzqR3r7unAS9R9aZW6Dhc9JWI qtYzwl/4JdchSUZNixeDs9gaHAIezTBoY2su5PuQsqJQXUQHVvwGuchcXYV2idaB6prV lpmCvbJkAOupeOtl36SKDpHot4+d7A1bQmzIMtEOMsqtxR1w92JdB0binh/le2wOM8GX I5Wxz1HP2BkPkGfpRB0WjX4jwsIcuzU4Smi3JzTF8Vz4p+M6YjnRyTyUnvnyaYnG9jJB b/jw== Received: by 10.204.152.216 with SMTP id h24mr1446321bkw.42.1342614580874; Wed, 18 Jul 2012 05:29:40 -0700 (PDT) Received: from [172.16.52.145] ([193.225.200.92]) by mx.google.com with ESMTPS id g6sm11763629bkg.2.2012.07.18.05.29.40 (version=SSLv3 cipher=OTHER); Wed, 18 Jul 2012 05:29:40 -0700 (PDT) From: Ivan Andrus Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: 24.1.50; python-nav-forward-sexp-function doesn't skip over strings Date: Wed, 18 Jul 2012 14:29:39 +0200 Message-Id: To: bug-gnu-emacs@gnu.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Actually, the new function `python-nav-forward-sexp-function' doesn't do what I expect at all. I use forward-sexp, up-list and friends a lot, so perhaps I'm not typical. I do think sexp-like movement for python would be AWESOME! Let me show some use cases where the current functionality is broken for me, and then attempt to articulate what I would like/expect. I shall always assume that forward-sexp has a positive argument, and the obvious statements hold for negative arguments. In sage-mode we narrow to a docstring by doing the equivalent of (let* ((bos (python-info-ppss-context 'string))) (goto-char bos) (forward-sexp 1) (narrow-to-region bos (point))) This is broken now since forward-sexp goes to the end of the block, far past the end of the string (or not moving at all). If you have any undindented code at the end of your buffer, then forward-sexp (and up-list) will refuse to move past it e.g. def main(): 2+3 # I get stuck here print main() What I would expect form a "perfect" python forward-sexp is to skip over a block if and only if you are at the very beginning of the block. Otherwise is should skip over a statement if and only if you are at the beginning of a statement. Otherwise is should act exactly as an unmodified forward-sexp would, skipping over words, parenthesized expressions, and strings. I guess this is because I think of python as having a set of parens around a block as well as parens around each statement in addition to all parens and strings that are currently there. I don't guarantee that this would be a good experience, but I think it would. Hopefully up-list would then move to the end of the block etc. I'm not sure how to deal with down-list. Perhaps going to the first statement if it's at the beginning of a block and into a parenthesized expression otherwise? -Ivan From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 19 04:22:49 2012 Received: (at 11974) by debbugs.gnu.org; 19 Jul 2012 08:22:49 +0000 Received: from localhost ([127.0.0.1]:49498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Srm0W-0002Q6-OB for submit@debbugs.gnu.org; Thu, 19 Jul 2012 04:22:49 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:53344) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Srm0V-0002Pz-5L for 11974@debbugs.gnu.org; Thu, 19 Jul 2012 04:22:47 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q6J8GZnH003944; Thu, 19 Jul 2012 04:16:35 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id BE01DAE20D; Thu, 19 Jul 2012 03:52:02 -0400 (EDT) From: Stefan Monnier To: Ivan Andrus Subject: Re: bug#11974: 24.1.50; python-nav-forward-sexp-function doesn't skip over strings Message-ID: References: Date: Thu, 19 Jul 2012 03:52:02 -0400 In-Reply-To: (Ivan Andrus's message of "Wed, 18 Jul 2012 14:29:39 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.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 RV4283=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4283> : streams <787094> : uri <1169144> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 11974 Cc: 11974@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) > (let* ((bos (python-info-ppss-context 'string))) > (goto-char bos) > (forward-sexp 1) > (narrow-to-region bos (point))) > This is broken now since forward-sexp goes to the end of the block, far > past the end of the string (or not moving at all). If you have any > undindented code at the end of your buffer, then forward-sexp (and up-list) > will refuse to move past it e.g. There's a similar problem in SMIE's implementation of forward-sexp. Basically, the issue is that there are several "sexp"s that start at point and forward-sexp has to choose which one to skip over. Every choice is valid, but since there's no way for the user to say which choice she wants, any choice is bound to disappoint and/or surprise the user sometimes. That doesn't mean that it's a hopeless problem and that we shouldn't try to improve the behavior, tho: in practice (maybe just for historical reasons), I find that I generally prefer "the smallest sexp", especially since I can repeat forward-sexp if it didn't skip enough. I.e. Python's forward-sexp should only try to skip over indentation-delimited blocks when it has a clear indication that only skipping the current line/statement would be wrong, or that there's an easy/intuitive way for the user to get the other behavior (e.g. by starting the forward-sexp from elsewhere). For example, with SMIE if I have a + b * c and I'm before "b", forward-sexp will only skip over "b", but if I move to just before the "+", then forward-sexp will skip to after "c". I'm not sure if Python's indentation-delimited blocks can find a similar "convention" for the user to express her intention. > What I would expect form a "perfect" python forward-sexp is to skip over > a block if and only if you are at the very beginning of the block. You mean that forward-sexp would generally skip over just a statement, except if it's the first statement of a block in which case it skips the whole block? That sounds a bit arbitrary, making it difficult for the user to skip over just the first statement. [ Bear in mind, I never write Python. ] How 'bout def foo(): toto bar if I'm before `toto' on the same line, forward-sexp should skip over "toto", but if I'm right after the ":" (and before the \n) then forward-sexp should skip to after "bar". Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 19 15:47:17 2012 Received: (at 11974) by debbugs.gnu.org; 19 Jul 2012 19:47:17 +0000 Received: from localhost ([127.0.0.1]:51239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Srwgv-0006PY-E9 for submit@debbugs.gnu.org; Thu, 19 Jul 2012 15:47:17 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:39448) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Srwgs-0006PQ-KO for 11974@debbugs.gnu.org; Thu, 19 Jul 2012 15:47:15 -0400 Received: by bkty7 with SMTP id y7so2504745bkt.3 for <11974@debbugs.gnu.org>; Thu, 19 Jul 2012 12:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=HGBjPX9dUbJTSNrcl5N9pMs/TDQizPB0oB9vi6VUibE=; b=oExoiRsEWxkpahZw+xn72Zf4/IJSCu6CA05a7q3Q+qLcdg8K2t5gu2HeddStnVKGRZ L+5AmqXKek1ElQTzdi578QzuGUtLssQuZNYJYoyIZtkF1cUZ0I9mjOKXuhuw8WaKXxhR F4DK4UkoH6rqX8KPQ0KfbBMxASyMINNR5Dh+i/v5IxNEl8hZCCUvNH+0+SQWCzElojV+ jKGusuEDiDr0ELmqzSKP0NVaZ7UHcXLt0sdV5Kx2oTBM+wou5UYAZi0W0RDrDLpQxa4r n9xhRZ5jiykgHgIp+9uC7qhXC7Fh7PNjlQx9VNqIhbsnMvd0H269evtG/5Cp8zQWQMlr kDaA== Received: by 10.204.129.208 with SMTP id p16mr1618520bks.129.1342726860645; Thu, 19 Jul 2012 12:41:00 -0700 (PDT) Received: from [10.0.2.25] (catv-80-99-177-93.catv.broadband.hu. [80.99.177.93]) by mx.google.com with ESMTPS id fu8sm1778422bkc.5.2012.07.19.12.40.59 (version=SSLv3 cipher=OTHER); Thu, 19 Jul 2012 12:41:00 -0700 (PDT) Subject: Re: bug#11974: 24.1.50; python-nav-forward-sexp-function doesn't skip over strings Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Ivan Andrus In-Reply-To: Date: Thu, 19 Jul 2012 21:40:59 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Stefan Monnier X-Mailer: Apple Mail (2.1084) X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11974 Cc: 11974@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Oops, forgot to cc the buglist. On Jul 19, 2012, at 9:52 AM, Stefan Monnier wrote: >> (let* ((bos (python-info-ppss-context 'string))) >> (goto-char bos) >> (forward-sexp 1) >> (narrow-to-region bos (point))) >=20 >> This is broken now since forward-sexp goes to the end of the block, = far >> past the end of the string (or not moving at all). If you have any >> undindented code at the end of your buffer, then forward-sexp (and = up-list) >> will refuse to move past it e.g. >=20 > There's a similar problem in SMIE's implementation of forward-sexp. > Basically, the issue is that there are several "sexp"s that start at > point and forward-sexp has to choose which one to skip over. > Every choice is valid, but since there's no way for the user to say > which choice she wants, any choice is bound to disappoint and/or > surprise the user sometimes. I didn't realize SMIE implemented forward-sexp. Yet another reason for = me to use it. > That doesn't mean that it's a hopeless problem and that we shouldn't = try > to improve the behavior, tho: in practice (maybe just for historical > reasons), I find that I generally prefer "the smallest sexp", = especially > since I can repeat forward-sexp if it didn't skip enough. I agree. The smallest is usually best. > I.e. Python's forward-sexp should only try to skip over > indentation-delimited blocks when it has a clear indication that only > skipping the current line/statement would be wrong, or that there's an > easy/intuitive way for the user to get the other behavior (e.g. by > starting the forward-sexp from elsewhere). >=20 > For example, with SMIE if I have > a + b * c > and I'm before "b", forward-sexp will only skip over "b", but if I = move > to just before the "+", then forward-sexp will skip to after "c". > I'm not sure if Python's indentation-delimited blocks can find a = similar > "convention" for the user to express her intention. >=20 >> What I would expect form a "perfect" python forward-sexp is to skip = over >> a block if and only if you are at the very beginning of the block. >=20 > You mean that forward-sexp would generally skip over just a statement, > except if it's the first statement of a block in which case it skips = the > whole block? That sounds a bit arbitrary, making it difficult for the > user to skip over just the first statement. No, it would only skip over a block if it's at the block opening. In = some sense the entire block is one statement hence my thinking. See = below. > [ Bear in mind, I never write Python. ] > How 'bout >=20 > def foo(): > toto > bar >=20 > if I'm before `toto' on the same line, forward-sexp should skip over > "toto", but if I'm right after the ":" (and before the \n) then > forward-sexp should skip to after "bar". In my mind you should skip to after bar only if the cursor is before the = def (or possibly anywhere in the def keyword). If I'm anywhere after = that I consider myself to be "inside" the block. But that's only the = way I think and may not be representative of other (more serious) python = programmers etc. etc. I guess I would treat both if and else as separate "block openers" = rather than if opening a single block. Maybe an easy rule would be if = you are at the beginning of the statement (well between the end of the = last and the beginning of the current) go to the next statement that has = the same indentation? Anywhere else do as a "normal" forward-sexp. -Ivan= From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 19 19:00:57 2012 Received: (at 11974) by debbugs.gnu.org; 19 Jul 2012 23:00:57 +0000 Received: from localhost ([127.0.0.1]:51434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrziL-0002J4-27 for submit@debbugs.gnu.org; Thu, 19 Jul 2012 19:00:57 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:55636) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrziJ-0002Iw-EE for 11974@debbugs.gnu.org; Thu, 19 Jul 2012 19:00:56 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q6JMsd8I032688; Thu, 19 Jul 2012 18:54:40 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id C9EE0AECFD; Thu, 19 Jul 2012 18:54:37 -0400 (EDT) From: Stefan Monnier To: Ivan Andrus Subject: Re: bug#11974: 24.1.50; python-nav-forward-sexp-function doesn't skip over strings Message-ID: References: Date: Thu, 19 Jul 2012 18:54:37 -0400 In-Reply-To: (Ivan Andrus's message of "Thu, 19 Jul 2012 21:39:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4284=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4284> : streams <787361> : uri <1169736> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 11974 Cc: 11974@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) >> def foo(): >> toto >> bar > In my mind you should skip to after bar only if the cursor is before the = def > (or possibly anywhere in the def keyword). This is the obvious non-controversial case, indeed. If that's sufficient, then I think there is no remaining problem. I just assumed that Fabi=E1n (or others) also wanted to be able to skip just the "block" of statements without the introductory element (like def/if/...). Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 14:43:00 2012 Received: (at control) by debbugs.gnu.org; 24 Sep 2012 18:43:00 +0000 Received: from localhost ([127.0.0.1]:53571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TGDcS-0007qC-D8 for submit@debbugs.gnu.org; Mon, 24 Sep 2012 14:43:00 -0400 Received: from mail-gg0-f172.google.com ([209.85.161.172]:45708) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TGDcP-0007q4-EH for control@debbugs.gnu.org; Mon, 24 Sep 2012 14:42:58 -0400 Received: by ggnh4 with SMTP id h4so1828297ggn.3 for ; Mon, 24 Sep 2012 11:41:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:content-type :content-transfer-encoding:x-gm-message-state; bh=5bOGtOkeh3q5QxdUZq4QaxWoWEx5jRXEm+9S9mSNG1I=; b=P92Ne8hA5eaHrP5HuB3vIONc+X6nwfjbAZrXVTa7O0TsU1hvEDRgBZfLMqA096WFqW dn6hZh0jcmKbFMFcuvj3HRPqdZ0ZVtiKQkBwManxc5MwIQge9aXlSDZIedRhHD/wblXc keL4D4J7a5EKzmhqvMh4RAUZTTfuUxEvLpVbjCEoUjjmmdGYesTfdh2dWRa6UrGsiMX/ CSt82Xt4y/nTnVbCzrYeBdh+tqg8cF1jcXuQPwXZxN6x0wGYxnLwDtQxHMAXVChU/G/x IMCsU0sBLHfAnNF5vdzmX1BRwF+7K3Yu+uPr0OqhO9wzlN+mAycq7Ml0TxoaELq073uV UciA== Received: by 10.236.131.69 with SMTP id l45mr3709496yhi.46.1348512061856; Mon, 24 Sep 2012 11:41:01 -0700 (PDT) Received: from [192.168.1.25] (host71.190-138-197.telecom.net.ar. [190.138.197.71]) by mx.google.com with ESMTPS id l1sm25902920yhm.19.2012.09.24.11.41.00 (version=SSLv3 cipher=OTHER); Mon, 24 Sep 2012 11:41:01 -0700 (PDT) Message-ID: <5060A951.3010203@anue.biz> Date: Mon, 24 Sep 2012 15:41:21 -0300 From: =?ISO-8859-1?Q?Fabi=E1n_Ezequiel_Gallina?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120910 Thunderbird/15.0.1 MIME-Version: 1.0 To: control@debbugs.gnu.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlPhvyD8x9APFcG1rllnZLvY1sJ6j98bwUcIiP1TIs6wdYU1ev5PRPUylX8lsWjIQ5yN/te X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close #11974 [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.161.172 listed in list.dnswl.org] 3.0 GOT_NO_SUBJECT No real subject -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.8 MISSING_SUBJECT Missing Subject: header X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close #11974 [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.0 GOT_NO_SUBJECT No real subject -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.161.172 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.8 MISSING_SUBJECT Missing Subject: header 0.0 TVD_SPACE_RATIO TVD_SPACE_RATIO close #11974 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 28 17:18:46 2012 Received: (at 11974) by debbugs.gnu.org; 28 Sep 2012 21:18:46 +0000 Received: from localhost ([127.0.0.1]:32769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THhxN-0003JG-Qm for submit@debbugs.gnu.org; Fri, 28 Sep 2012 17:18:46 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:35560) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THhxM-0003J9-5f for 11974@debbugs.gnu.org; Fri, 28 Sep 2012 17:18:44 -0400 Received: by wgbdt12 with SMTP id dt12so1850299wgb.15 for <11974@debbugs.gnu.org>; Fri, 28 Sep 2012 14:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=gG/7Y04LwpcMhFU+rmOSK7UwtsyLfDeY/wbf1HqQRJk=; b=00uBl9r1kbFygQ5oRjAbwRnqKaAn8zeGeNA4TKSmRtCNTvBLZZh93z0mXQ5oO56ML5 nutDUWAsT+0Efcj+e51K2y5h8N6FwCFujX1qfje3JNCrsEngwgmAI4AsRVaUUBUCQTzq xYwm/gev4Eyl9TVKN+IxjZfa0Gxal5QVw/fzNkpWEYkcbTQiTIhS+ozkMFufHPVGgKC3 h3prYRT2h842YQa27gR5BDrfh0NntvKG078dKpr5SPkA2R5gOOgVUJB2DIBiXQT6Pipv scm2WnuYdPHyFCxkf6lTR1ikhqJZWz50bXiLhf7sr4V0UC7Tc99UIo8bYPPyyy5l4gme WD7Q== Received: by 10.216.55.195 with SMTP id k45mr3882129wec.216.1348867111812; Fri, 28 Sep 2012 14:18:31 -0700 (PDT) Received: from [10.0.2.25] (catv-80-99-177-93.catv.broadband.hu. [80.99.177.93]) by mx.google.com with ESMTPS id q4sm1413972wix.9.2012.09.28.14.18.30 (version=SSLv3 cipher=OTHER); Fri, 28 Sep 2012 14:18:31 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1085) Subject: Re: bug#11974: 24.1.50; python-nav-forward-sexp-function doesn't skip over strings From: Ivan Andrus In-Reply-To: Date: Fri, 28 Sep 2012 23:18:29 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <51132B81-6D8E-4C01-8BEB-126649B09E4D@gmail.com> References: To: 11974@debbugs.gnu.org X-Mailer: Apple Mail (2.1085) X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11974 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Jul 20, 2012, at 12:54 AM, Stefan Monnier wrote: >>> def foo(): >>> toto >>> bar >> In my mind you should skip to after bar only if the cursor is before = the def >> (or possibly anywhere in the def keyword). >=20 > This is the obvious non-controversial case, indeed. If that's > sufficient, then I think there is no remaining problem. >=20 > I just assumed that Fabi=E1n (or others) also wanted to be able to = skip > just the "block" of statements without the introductory element (like > def/if/...). I'm okay if people like the current definition of "sexp" for = python-mode, but I still think the implementatin is slightly broken. In = the simple example below I cannot get past the end of the main function = using `forward-sexp'. Is this by design? def main(): return 2+3 # I get stuck here print main() If this is by design then I'll work around it in my code. -Ivan From unknown Sun Jun 15 08:08:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 27 Oct 2012 11:24:03 +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