From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#59477: python-tests fail without tree-sitter Date: Fri, 25 Nov 2022 17:50:10 +0100 Message-ID: <207B066C-2C1F-40B3-9E13-9DFC3ABCF92F@gmail.com> References: <8B252ACC-C2A1-444A-A2B2-FF8459214731@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24084"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , 59477@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 25 17:51:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oybuy-00060k-0L for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Nov 2022 17:51:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oybup-0000au-V1; Fri, 25 Nov 2022 11:51:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oybuo-0000aH-PS for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 11:51:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oybuo-0006NN-HD for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 11:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oybuo-0007G6-7M for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 11:51:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <8B252ACC-C2A1-444A-A2B2-FF8459214731@gmail.com> Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Nov 2022 16:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59477 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 59477-submit@debbugs.gnu.org id=B59477.166939502027854 (code B ref 59477); Fri, 25 Nov 2022 16:51:02 +0000 Original-Received: (at 59477) by debbugs.gnu.org; 25 Nov 2022 16:50:20 +0000 Original-Received: from localhost ([127.0.0.1]:37041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oybu8-0007FC-4c for submit@debbugs.gnu.org; Fri, 25 Nov 2022 11:50:20 -0500 Original-Received: from mail-lj1-f182.google.com ([209.85.208.182]:33406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oybu6-0007Ew-Cz for 59477@debbugs.gnu.org; Fri, 25 Nov 2022 11:50:18 -0500 Original-Received: by mail-lj1-f182.google.com with SMTP id t10so5826601ljj.0 for <59477@debbugs.gnu.org>; Fri, 25 Nov 2022 08:50:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=FzoXtndc1nysHXUhJL5n72xEXQWz6OXDQAzM9QIPxME=; b=Ja2S5VReT/SmNeokioFbDHYIOqa9Hffm7yjp6XNqhUfaSXE5l64KQoRFx8ilot4jIe l3jwhyx6jRhPXwl5W+mYP0SZJl7CF8YX4TkTyvzcpWAcZ3FaKKU+gl4kgg+Y94iaAPi8 6kBoByrXoZtz8Mt6og1VKdPb+0qh2lRx9KEhin28ZQafGs58+GM3QdmeQaDN9RX5Invq AiFvRTroX83hsi2UesLAPnWWjM3Bc8/RbZy41ALvlofuZ5KaGemi0/EryIIxlYmXjb+N fn5wRekDUCNgKmxHQsFwU4PqqBK8Y2zKv8RGR1utWDFq/6Nk+8h6JjC4PlKkCLofqIlX 5NYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FzoXtndc1nysHXUhJL5n72xEXQWz6OXDQAzM9QIPxME=; b=yG2TSl0HHOlmaX+BV6UCj09B5+qAZndE0/VFZ/q15W/epY3QCkBo/y/C4eh8XISlyC ev15ldZ7i+921S6k7l0c4Vz9pXmC7BbkbtFBQTqVcDvSaPgAlimryme9RS8giRsTsXA8 Yakd2Y0/EJTrxOJJ9vq++O5N7+ikgjWGkdVpTp0hLpnZmWOn+zrnqlOOOrGGDSANpd8r bwZ8Kple5yIkbExPm1CVoSsGcyOXuen0ThddnpbEPbJuHyw9ubKAUNu6u1jsVhBBeKxx BdURQHPGbvjiV9NnfsewVm7hTBoz4Eecr4Ili/p6UEvU9dhVa3DqzFmgWrXE8AyQ4ser AwjQ== X-Gm-Message-State: ANoB5plv8VfrQyMeTkUBt0OIz95g4rEcFH+UpIoK9pmpa9gTEyCbabxI YtjGYTr2RPINNAh02eI3P34= X-Google-Smtp-Source: AA0mqf6v9Pr3ME2Z+A929BihNcNqOBMtoGmDxj6P5z8fvcYZU0q2tCCJ0v3yXowhLXcSHViGcNuLmQ== X-Received: by 2002:a05:651c:b10:b0:26f:c081:9aee with SMTP id b16-20020a05651c0b1000b0026fc0819aeemr6381053ljr.219.1669395012044; Fri, 25 Nov 2022 08:50:12 -0800 (PST) Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se. [188.150.171.209]) by smtp.gmail.com with ESMTPSA id r2-20020ac25c02000000b004b4e373df2bsm588826lfp.202.2022.11.25.08.50.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2022 08:50:11 -0800 (PST) X-Mailer: Apple Mail (2.3654.120.0.1.13) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249019 Archived-At: > But if I run this in a buffer manually I get the ending newline. I=E2=80= =99m not sure what=E2=80=99s the cause of that. Bisecting give = 7c5d4348330b206aff1f8e5bc4fd241d6a6dc0b5, but that commit doesn=E2=80=99t = change anything filling-related.=20 No idea really, but it might have something to do with the fact that the = changes move the assignments (setq-local font-lock-defaults `(,python-font-lock-keywords nil nil nil nil (font-lock-syntactic-face-function . python-font-lock-syntactic-face-function))) (setq-local syntax-propertize-function python-syntax-propertize-function) so that they are executed after (when python-indent-guess-indent-offset (python-indent-guess-indent-offset)) instead of before. `python-indent-guess-indent-offset` has the = side-effect of setting syntax properties, in particular for the string = terminator (triple-quote in the test). This is important, because python-fill-string (called as part of = fill-paragraph in the test) assumes this having already been done and if = not, str-end-pos isn't computed correctly and things take a turn for the = worse after that. Stefan probably knows better how this is supposed to work, but = presumably python-fill-string should take measures to ensure accurate = syntax properties before doing things like (re-search-forward (rx (syntax string-delimiter)) nil t) and so on. Sorry about not being of much help here.