From unknown Sun Jun 22 11:38:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61090: [PATCH 29] python.el: Use correct regexp when enabling python-ts-mode Resent-From: Brian Leung Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Jan 2023 01:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61090 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 61090@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167478398417794 (code B ref -1); Fri, 27 Jan 2023 01:47:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jan 2023 01:46:24 +0000 Received: from localhost ([127.0.0.1]:36504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLDot-0004cw-Ka for submit@debbugs.gnu.org; Thu, 26 Jan 2023 20:46:23 -0500 Received: from lists.gnu.org ([209.51.188.17]:36066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLDor-0004cn-EB for submit@debbugs.gnu.org; Thu, 26 Jan 2023 20:46:22 -0500 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 1pLDor-0000fR-7B for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 20:46:21 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLDon-0003D1-Tj for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 20:46:20 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C99AA24061B for ; Fri, 27 Jan 2023 02:46:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1674783973; bh=eVc8SnKucbWfHzyUuIxAg2WPNcDlaCUFkVjPRrBgCcA=; h=From:To:Subject:Date:From; b=sCjxqILaQCTZyStEwHyh+0fq0pIn+gSysmnycyLdlgVMVN4AbWiX25RbW0YpxQ55d Ao1moBqf5FZq+ll1PRDZ2MBsgRB0gBWfN4NfSyR0m0I7rnmpnbLo4rwVv/xDWFCyQP 0O2aoQvqfQarF6fVOWPmRrT5uu8Q0KsbMAJwJDfRUYO9hgOb6Y1BtAtmU02HSFhZ1Z kHVcPccAfFKwJAm9MF7OmxLkvPM8KbZr+YYVrRkB+8ISc+EMO7CXEfY86C0PfBuKWU gb+vJFpkPT7GzePWrk/Vtz/LnphRDmJRiIo+PCFZPcyTB/vqmNAS2xB+gvEFJZ8+Pa oZVJJA2f8HdZg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4P30m21D8dz9rxD for ; Fri, 27 Jan 2023 02:46:09 +0100 (CET) From: Brian Leung Date: Fri, 27 Jan 2023 01:46:07 +0000 Message-ID: <87wn58hhr4.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=leungbk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch This prevents python-ts-mode from being enabled for files that simply have the word "python" in them. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) Repository revision: dfdc0f5fb7b10e737c3c8e2bdb1eb873a1e91bd7 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: NixOS 23.05 (Stoat) Configured using: 'configure --prefix=/nix/store/388qs9mv3l43d0k1q160z389sdmfi8pr-emacs-git-20230126.0 --disable-build-details --with-modules --with-x-toolkit=lucid --with-xft --with-cairo --with-native-compilation' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-python.el-Use-correct-regexp-when-enabling-python-ts.patch >From 73d2c15d3813629a51046e115768b6fb1c141733 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Thu, 26 Jan 2023 17:36:42 -0800 Subject: [PATCH] python.el: Use correct regexp when enabling python-ts-mode * lisp/progmodes/python.el: Use "python[0-9.]*" regexp for interpreter-mode-alist, and not auto-mode-alist. --- lisp/progmodes/python.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a869cdc5fdb..df0d1c96965 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -6715,8 +6715,8 @@ python-ts-mode (when python-indent-guess-indent-offset (python-indent-guess-indent-offset)) - (add-to-list 'auto-mode-alist - '("\\.py[iw]?\\'\\|python[0-9.]*" . python-ts-mode)))) + (add-to-list 'auto-mode-alist '("\\.py[iw]?\\'" . python-ts-mode)) + (add-to-list 'interpreter-mode-alist '("python[0-9.]*" . python-ts-mode)))) ;;; Completion predicates for M-x ;; Commands that only make sense when editing Python code -- 2.39.0 --=-=-=-- From unknown Sun Jun 22 11:38:08 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Brian Leung Subject: bug#61090: closed (Re: bug#61090: [PATCH 29] python.el: Use correct regexp when enabling python-ts-mode) Message-ID: References: <83pmayaoem.fsf@gnu.org> <87wn58hhr4.fsf@posteo.net> X-Gnu-PR-Message: they-closed 61090 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 61090@debbugs.gnu.org Date: Sat, 28 Jan 2023 11:30:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1674905403-30805-1" This is a multi-part message in MIME format... ------------=_1674905403-30805-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #61090: [PATCH 29] python.el: Use correct regexp when enabling python-ts-mo= de which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 61090@debbugs.gnu.org. --=20 61090: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D61090 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1674905403-30805-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 61090-done) by debbugs.gnu.org; 28 Jan 2023 11:29:10 +0000 Received: from localhost ([127.0.0.1]:39710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLjOQ-0007yv-8r for submit@debbugs.gnu.org; Sat, 28 Jan 2023 06:29:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLjON-0007yh-HK for 61090-done@debbugs.gnu.org; Sat, 28 Jan 2023 06:29:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLjOI-0006RM-A4; Sat, 28 Jan 2023 06:29:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tIXIN+E10qu6bLLLFj2ACIpvgIkmjRZlaywY5KHL6OA=; b=k6ImVgfUwkOo 8JT8+oehI/mdD2O8IC5AQaJ2SKTecAZs8LqYhWotyT4JEPMHiiO27A7rW2Ca0JKxohc8M8/VFiAOa kEmLYWwZDqegDogxw3EuKjew1shpoolgGIDFRKKyEtN9rEq9fQOiAjlEJaViw8zqn9Qx6OaCKT7Pw D6WOH6UDR4RBQEVA9IVk5mBCfUSgxyZ5/KNHN6cmdHloTMH/M39/wdFWCZGz2GEX0CrlLQ12YIRVU XHz0wuNZG+euRhL2rYXqv0ut/z3AtC1iqoKncPiHMfOwy4fIdB9bdyi7PMn9SiovXo27VmjGUbljl 5fhRI+yMcIqqupZKXxrFsg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLjOH-0008Qm-F8; Sat, 28 Jan 2023 06:29:01 -0500 Date: Sat, 28 Jan 2023 13:28:49 +0200 Message-Id: <83pmayaoem.fsf@gnu.org> From: Eli Zaretskii To: Brian Leung In-Reply-To: <87wn58hhr4.fsf@posteo.net> (message from Brian Leung on Fri, 27 Jan 2023 01:46:07 +0000) Subject: Re: bug#61090: [PATCH 29] python.el: Use correct regexp when enabling python-ts-mode References: <87wn58hhr4.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61090-done Cc: 61090-done@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 (---) > From: Brian Leung > Date: Fri, 27 Jan 2023 01:46:07 +0000 > > This prevents python-ts-mode from being enabled for files that simply > have the word "python" in them. Thanks, I installed this on the emacs-29 branch. Could you please in the future use the same email address as the one you stated in your copyright assignment? That should avoid confusion regarding the state of your assignment. ------------=_1674905403-30805-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Jan 2023 01:46:24 +0000 Received: from localhost ([127.0.0.1]:36504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLDot-0004cw-Ka for submit@debbugs.gnu.org; Thu, 26 Jan 2023 20:46:23 -0500 Received: from lists.gnu.org ([209.51.188.17]:36066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLDor-0004cn-EB for submit@debbugs.gnu.org; Thu, 26 Jan 2023 20:46:22 -0500 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 1pLDor-0000fR-7B for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 20:46:21 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLDon-0003D1-Tj for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 20:46:20 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C99AA24061B for ; Fri, 27 Jan 2023 02:46:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1674783973; bh=eVc8SnKucbWfHzyUuIxAg2WPNcDlaCUFkVjPRrBgCcA=; h=From:To:Subject:Date:From; b=sCjxqILaQCTZyStEwHyh+0fq0pIn+gSysmnycyLdlgVMVN4AbWiX25RbW0YpxQ55d Ao1moBqf5FZq+ll1PRDZ2MBsgRB0gBWfN4NfSyR0m0I7rnmpnbLo4rwVv/xDWFCyQP 0O2aoQvqfQarF6fVOWPmRrT5uu8Q0KsbMAJwJDfRUYO9hgOb6Y1BtAtmU02HSFhZ1Z kHVcPccAfFKwJAm9MF7OmxLkvPM8KbZr+YYVrRkB+8ISc+EMO7CXEfY86C0PfBuKWU gb+vJFpkPT7GzePWrk/Vtz/LnphRDmJRiIo+PCFZPcyTB/vqmNAS2xB+gvEFJZ8+Pa oZVJJA2f8HdZg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4P30m21D8dz9rxD for ; Fri, 27 Jan 2023 02:46:09 +0100 (CET) From: Brian Leung To: bug-gnu-emacs@gnu.org Subject: [PATCH 29] python.el: Use correct regexp when enabling python-ts-mode Date: Fri, 27 Jan 2023 01:46:07 +0000 Message-ID: <87wn58hhr4.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=leungbk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch This prevents python-ts-mode from being enabled for files that simply have the word "python" in them. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) Repository revision: dfdc0f5fb7b10e737c3c8e2bdb1eb873a1e91bd7 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: NixOS 23.05 (Stoat) Configured using: 'configure --prefix=/nix/store/388qs9mv3l43d0k1q160z389sdmfi8pr-emacs-git-20230126.0 --disable-build-details --with-modules --with-x-toolkit=lucid --with-xft --with-cairo --with-native-compilation' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-python.el-Use-correct-regexp-when-enabling-python-ts.patch >From 73d2c15d3813629a51046e115768b6fb1c141733 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Thu, 26 Jan 2023 17:36:42 -0800 Subject: [PATCH] python.el: Use correct regexp when enabling python-ts-mode * lisp/progmodes/python.el: Use "python[0-9.]*" regexp for interpreter-mode-alist, and not auto-mode-alist. --- lisp/progmodes/python.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a869cdc5fdb..df0d1c96965 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -6715,8 +6715,8 @@ python-ts-mode (when python-indent-guess-indent-offset (python-indent-guess-indent-offset)) - (add-to-list 'auto-mode-alist - '("\\.py[iw]?\\'\\|python[0-9.]*" . python-ts-mode)))) + (add-to-list 'auto-mode-alist '("\\.py[iw]?\\'" . python-ts-mode)) + (add-to-list 'interpreter-mode-alist '("python[0-9.]*" . python-ts-mode)))) ;;; Completion predicates for M-x ;; Commands that only make sense when editing Python code -- 2.39.0 --=-=-=-- ------------=_1674905403-30805-1--