From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master 4b39b74: python.el: don't syntax-propertize single/double quoted strings Date: Wed, 10 Apr 2019 12:23:34 -0400 Message-ID: References: <20190409190826.19114.45574@vcs0.savannah.gnu.org> <20190409190828.20AE320E55@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="50469"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 10 18:23:52 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEG0s-000D0k-Cl for ged-emacs-devel@m.gmane.org; Wed, 10 Apr 2019 18:23:50 +0200 Original-Received: from localhost ([127.0.0.1]:34266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEG0r-0002mz-Cu for ged-emacs-devel@m.gmane.org; Wed, 10 Apr 2019 12:23:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEG0l-0002mt-Cm for emacs-devel@gnu.org; Wed, 10 Apr 2019 12:23:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEG0k-00018p-Dz for emacs-devel@gnu.org; Wed, 10 Apr 2019 12:23:43 -0400 Original-Received: from [195.159.176.226] (port=37424 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hEG0k-00018A-23 for emacs-devel@gnu.org; Wed, 10 Apr 2019 12:23:42 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hEG0h-000CpW-GW for emacs-devel@gnu.org; Wed, 10 Apr 2019 18:23:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:03RzavYKDsOKzgmd575OCEmjgAA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:235226 Archived-At: > But that test was added to prevent regression of an actual bug, right? > Did your commit reintroduce the bug? If so, disabling the test doesn't sound ideal… Here was my answer in the actual commit, Stefan diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 94c846ecb1..999cf8dc7a 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -5345,13 +5345,23 @@ python-tests-shell-interpreter (ert-deftest python-tests--python-nav-end-of-statement--infloop () "Checks that `python-nav-end-of-statement' doesn't infloop in a buffer with overlapping strings." + ;; FIXME: The treatment of strings has changed in the mean time, and the + ;; test below now neither signals an error nor inf-loops. + ;; The description of the problem it's trying to catch is not clear enough + ;; to be able to see if the underlying problem is really fixed, sadly. + ;; E.g. I don't know what is meant by "overlap", really. + (skip-unless nil) (python-tests-with-temp-buffer "''' '\n''' ' '\n" (syntax-propertize (point-max)) ;; Create a situation where strings nominally overlap. This ;; shouldn't happen in practice, but apparently it can happen when ;; a package calls `syntax-ppss' in a narrowed buffer during JIT ;; lock. + ;; FIXME: 4-5 is the SPC right after the opening triple quotes: why + ;; put a string-fence syntax on it? (put-text-property 4 5 'syntax-table (string-to-syntax "|")) + ;; FIXME: 8-9 is the middle quote in the closing triple quotes: + ;; it shouldn't have any syntax-table property to remove anyway! (remove-text-properties 8 9 '(syntax-table nil)) (goto-char 4) (setq-local syntax-propertize-function nil)