From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 24 00:07:36 2024 Received: (at submit) by debbugs.gnu.org; 24 Oct 2024 04:07:36 +0000 Received: from localhost ([127.0.0.1]:33173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3p8J-0002Tj-Rr for submit@debbugs.gnu.org; Thu, 24 Oct 2024 00:07:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:54890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3p8G-0002TV-Vo for submit@debbugs.gnu.org; Thu, 24 Oct 2024 00:07:34 -0400 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 1t3p7h-0004hA-AE for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2024 00:06:58 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3p7e-0003yB-Ru for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2024 00:06:55 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-71e6cec7227so404327b3a.0 for ; Wed, 23 Oct 2024 21:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729742812; x=1730347612; darn=gnu.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=W5yEMn9663AgctmS5BZN8EiDt5s2xGp/db50scMQl7s=; b=hL+agcrc8iJd5uYetluexXEnj5m6TEHkudcMtfTepfIORH3dWus2eF5uTDDlxFf7r/ 82n9rqQ5KziEuFrLwUmHEyZLukWsQnIEJ9V8K5T75E6MSJo8jOjHlj5Ef8Zv25ea4I87 EOfIwbtuRXRf84qYCC7MIT0Hk10MgrljN+PG2GhAjV5bLhOJmCkIdeu/4Pnps7h2z9/g z0WldtTUvVVhmsppl/5Qvd5p7Ohl0nHeJCv+33Qg7Ckj8v37A9RYBwj+uvRLmD1rV26E Yfh9jNdgcIn5ktckCFf9A6uNhhQnGWHVjOjuLUGQHKnFPymnh5u2iVKa8WHZ/SXIU7Hf nPMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729742812; x=1730347612; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=W5yEMn9663AgctmS5BZN8EiDt5s2xGp/db50scMQl7s=; b=XH5fSnTCGY00w8+W0ypHeX7r+PjtZU0rm1OjhMD+2QhoR4yJfQMMHThbr+M5UWxV6F cR+AVA0FCL+jcv98r+NrxbVPxePeOx0YsAoh+DLK+GTnQs/ykF8krrZ6ud1gc6Py14A5 FvHkyI4LTziFPNxfWc+Ke5/ylL3yfO39wrUjwIoy1GGDZ+ndBIiR4n4G1g1oD3WzGcaz 0py0bGM8PN6aGkthcYiJU6l+QeILIF6jkva/60safXkHr1MqKmaAcboAn8xi5YDudAPw lRVA2ECrRApQ0pMwZmTrS+JAIn4F+/6fe3CSU62eE/de6wBrvUdVq82f2SDozkB8bN7Q 19Xg== X-Gm-Message-State: AOJu0YzZrRtiUxj6m8DWcMZYRPyiCZVJ5VGs3TOUs1ed+4xdY/Aao+RM YOHBaP+Ny2yiPiJ1F7D6m5SsOb88w7tOrof3jxDTdB+9NhxFkV4OfAJb9A== X-Google-Smtp-Source: AGHT+IHUhZVtyIgyZx+QKqa3XaEn2jLMoXF2XgAv+rBvvqlwyL5vEdH6fvbWz5+XHLIdoesfnrXfjA== X-Received: by 2002:a05:6a20:2d2c:b0:1d7:8a9:63c with SMTP id adf61e73a8af0-1d989d2f466mr563360637.49.1729742812152; Wed, 23 Oct 2024 21:06:52 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:84ce:e0ef:6d50:ee70]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e77e4e1841sm339917a91.23.2024.10.23.21.06.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Oct 2024 21:06:51 -0700 (PDT) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: 31.0.50; Text syntax applied on too many things in tsx-ts-mode Message-Id: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> Date: Wed, 23 Oct 2024 21:06:40 -0700 To: Bug Report Emacs X-Mailer: Apple Mail (2.3776.700.51) Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=casouri@gmail.com; helo=mail-pf1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 (--) X-Debbugs-CC: theo@thornhill.no In tsx-ts-mode we use this query to apply syntax properties: (defvar tsx-ts--s-p-query (when (treesit-available-p) (treesit-query-compile 'tsx '(((regex pattern: (regex_pattern) @regexp)) ((variable_declarator value: (jsx_element) = @jsx)) ((assignment_expression right: = (jsx_element) @jsx)) ((arguments (jsx_element) @jsx)) ((parenthesized_expression (jsx_element) = @jsx)) ((return_statement (jsx_element) @jsx)))))) And then in tsx-ts--syntax-propertize-captures we mark everything enclosed by the captured jsx_element nodes in text fences. Then for the following code All the func() and other code will be considered text because the whole jsx tag () are wrapped in string fences. Theo, what=E2=80=99s the original intention for marking jsx_elements as text? = Can we only mark jsx_text as string? Yuan From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 04:11:27 2024 Received: (at 73978) by debbugs.gnu.org; 9 Nov 2024 09:11:27 +0000 Received: from localhost ([127.0.0.1]:53390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9hV9-0001K6-08 for submit@debbugs.gnu.org; Sat, 09 Nov 2024 04:11:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9hV7-0001Jt-E5 for 73978@debbugs.gnu.org; Sat, 09 Nov 2024 04:11:26 -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 1t9hV1-0001Rx-8y; Sat, 09 Nov 2024 04:11:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Hnk97JWhgR2FJYIU5HxxaP4hpTHbXp2vzoyUnEdmRns=; b=G4uPea2qvSpHSR0+iSQE QJhoHuoQQb7wVuyEuuwga0su0OnnNUqqZc9gecoFu03Hup+cqAFLG00puJX+1bjj8mS6rv4XzCIBa gigt4Lm2/3JYNA9DgFaM64lm2pMc67kFAk7M95FOMyxAVXjh1E74AKPbx2WPPJMKtYgICwiOik5hC Kkl7OVh5Xqz0563S8Op7I6BfFCYLhbQ1v5qkVZuHSW+dBo6kwQ/TC9GWYbgav7nVPCl/O81Mvo12r H8WmZ2/GZCsPdJ9Bc6myMLSbmeAKEjt6wODrqv13Z/icn/GF277PR7YNZ9bffEC3nttaMs7bjaBF/ 8xTlaDbPKqdQUQ==; Date: Sat, 09 Nov 2024 11:11:14 +0200 Message-Id: <8634k0ojpp.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu , theo@thornhill.no In-Reply-To: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> (message from Yuan Fu on Wed, 23 Oct 2024 21:06:40 -0700) Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73978 Cc: 73978@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 (---) Ping! Theo, can you answer Yuan's questions? > Cc: theo@thornhill.no > From: Yuan Fu > Date: Wed, 23 Oct 2024 21:06:40 -0700 > > X-Debbugs-CC: theo@thornhill.no > > In tsx-ts-mode we use this query to apply syntax properties: > > > (defvar tsx-ts--s-p-query > (when (treesit-available-p) > (treesit-query-compile 'tsx > '(((regex pattern: (regex_pattern) @regexp)) > ((variable_declarator value: (jsx_element) @jsx)) > ((assignment_expression right: (jsx_element) @jsx)) > ((arguments (jsx_element) @jsx)) > ((parenthesized_expression (jsx_element) @jsx)) > ((return_statement (jsx_element) @jsx)))))) > > > And then in tsx-ts--syntax-propertize-captures we mark everything > enclosed by the captured jsx_element nodes in text fences. > > Then for the following code > > > > All the func() and other code will be considered text because the whole > jsx tag () are wrapped in string fences. Theo, > what’s the original intention for marking jsx_elements as text? Can we > only mark jsx_text as string? > > Yuan > > > > > From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 11:51:10 2024 Received: (at 73978) by debbugs.gnu.org; 9 Nov 2024 16:51:10 +0000 Received: from localhost ([127.0.0.1]:54265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9og2-0004rs-5P for submit@debbugs.gnu.org; Sat, 09 Nov 2024 11:51:10 -0500 Received: from mail-pf1-f180.google.com ([209.85.210.180]:59814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9og0-0004rk-Ed for 73978@debbugs.gnu.org; Sat, 09 Nov 2024 11:51:09 -0500 Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-720cb6ac25aso2896450b3a.3 for <73978@debbugs.gnu.org>; Sat, 09 Nov 2024 08:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731171007; x=1731775807; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=D0gRw7Fy4TyYM/O8VBUaNRDrPT84WjXrYS+z1ZTMrCY=; b=Wp54RkKJhf7Cj4DTCVS5ErDv0L3ISfNQJ1ePF3BZNcYl9Ul/UJOAAJx3cgP6Iaylda E4LJR60WCejh8Zz+MaRjlteEtpvufx0hE6oec9Z40MrnrUra7eI8APKUs83awyoiufYb nk6UOJkdpFrXaAzFlLAuyM2ZrRp6UH+tnHysqkabAod8yjQMP6+f317zrna6Zwg8/gQN Mo+QtIv8eREIR+Rb02C6jHhyex4FA67pm9nJHDLzZrPIpr8r0tE3X9jU1gGY6j8+4Azl cejgiEPzY2au8MzTu9M8HxJWKhAy0W/ODxVJG90KPyUAXbxNMfJGluTpCN9Jhf7VqKPP ASUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731171007; x=1731775807; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D0gRw7Fy4TyYM/O8VBUaNRDrPT84WjXrYS+z1ZTMrCY=; b=VT5vApFMrqqPSAXZLwQFvCT589L1xCR+ME9XZJEtr+ean63r1VZ9OU2x9OV025qkqj cV6uAgJXXMhdr3oM9fke7Tc+KF5kokFc/K0obF7WJdDzbDm/xd+5QXmdSRu9Qp/AXP1N kNEmbdttlacIiWSfltF/IEv7/2F+TOlSKVPX1l9xNZvChL8RgpYFckSsgdTExFfv7SRG mI0XXUCQbT47GYy4Zsz6V/0aZFWDYRae9g7AOXCKZi7FycS1KmvJVVW6j5xbcwDjPUys 0ul/u0WUZacNxCHRUEVphoLyjwUqcf2ncqgak6iTnZffJ3LGBMZhwPGyPf09tJ3pD7hD E5Tw== X-Forwarded-Encrypted: i=1; AJvYcCWZC2jBxmXK6+RzepqXwH6oRDKmdmZHV72DMWiuyj+MpGmgbFG1cqMtf1lnkTs31yZQXCIHag==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy2gZoSoXgim6BcU1CREJH4UfxEaj3ChZ9aGcifbtNMEzxe14YO OMWr8DnY7ipZCRaVc3QutrSsxjLwWhG94DLR3ZAZRQdix+MXMJ6S X-Google-Smtp-Source: AGHT+IF473sGTjD9Ex8vmxVzYAZxb2Z1SOKUTrJKn4Tx0gjPl2V8s1eFCQlNNrrVc6M6ZFNYi6s7cg== X-Received: by 2002:a05:6a21:78a5:b0:1cf:3c60:b8d3 with SMTP id adf61e73a8af0-1dc229afb7cmr11064696637.19.1731171007469; Sat, 09 Nov 2024 08:50:07 -0800 (PST) Received: from smtpclient.apple ([2601:646:8f81:6120:1524:1329:2a87:2c60]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7f41f65fd7asm5397221a12.83.2024.11.09.08.50.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Nov 2024 08:50:06 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode From: Yuan Fu In-Reply-To: <8634k0ojpp.fsf@gnu.org> Date: Sat, 9 Nov 2024 08:49:55 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73978 Cc: Theodor Thornhill , 73978@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: -1.0 (-) > On Nov 9, 2024, at 1:11=E2=80=AFAM, Eli Zaretskii = wrote: >=20 > Ping! Theo, can you answer Yuan's questions? I=E2=80=99ve been using my local fix at work for a while now and it = seems to work fine. I=E2=80=99ll make a patch and apply in a few days. Yuan >=20 >> Cc: theo@thornhill.no >> From: Yuan Fu >> Date: Wed, 23 Oct 2024 21:06:40 -0700 >>=20 >> X-Debbugs-CC: theo@thornhill.no >>=20 >> In tsx-ts-mode we use this query to apply syntax properties: >>=20 >>=20 >> (defvar tsx-ts--s-p-query >> (when (treesit-available-p) >> (treesit-query-compile 'tsx >> '(((regex pattern: (regex_pattern) = @regexp)) >> ((variable_declarator value: = (jsx_element) @jsx)) >> ((assignment_expression right: = (jsx_element) @jsx)) >> ((arguments (jsx_element) @jsx)) >> ((parenthesized_expression (jsx_element) = @jsx)) >> ((return_statement (jsx_element) = @jsx)))))) >>=20 >>=20 >> And then in tsx-ts--syntax-propertize-captures we mark everything >> enclosed by the captured jsx_element nodes in text fences. >>=20 >> Then for the following code >>=20 >> >>=20 >> All the func() and other code will be considered text because the = whole >> jsx tag () are wrapped in string fences. Theo, >> what=E2=80=99s the original intention for marking jsx_elements as = text? Can we >> only mark jsx_text as string? >>=20 >> Yuan >>=20 >>=20 >>=20 >>=20 >>=20 From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 23 07:15:20 2024 Received: (at 73978) by debbugs.gnu.org; 23 Nov 2024 12:15:20 +0000 Received: from localhost ([127.0.0.1]:56956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEp2m-0003W2-CS for submit@debbugs.gnu.org; Sat, 23 Nov 2024 07:15:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEp2l-0003Vj-6E for 73978@debbugs.gnu.org; Sat, 23 Nov 2024 07:15:19 -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 1tEp2e-0004nj-4N; Sat, 23 Nov 2024 07:15:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=+tZ0OTLYtsN9IAtEY+J0bwgCfLufjPJgQQgmo+BKXyU=; b=ecSzxGXE3j+3wfQasTUQ 7mjYPs09yCwRAa8Zhs4nqc74bDanw2Z1XpV7ObxzGxix5lbgzwzHrWcJUba+dgOEZSzfJl5CLJBwH U3pjWsg628zYyojs0Hj0G3h9Pi2RXK7k2wbPuSk4nh0Rx0hJlJcUdIsurDLieTM6qUDAbUJrHLqhb o3ooKm/CMWeoQQMD6upNe5GlZDUtLX82T5KwN11QIZLTLPhyrGltf03ObJla7wz7wDLp+Vv58uoIx vdz8Vf0hEgVa2+7whyg5ZPbVKhxuCTUUyU70riV59pLv5eDB878poWd98JcaBtLc7bz3FBWl5NiTL Hd/ie3ZhAy0isA==; Date: Sat, 23 Nov 2024 14:15:07 +0200 Message-Id: <86bjy6m9is.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> (message from Yuan Fu on Sat, 9 Nov 2024 08:49:55 -0800) Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73978 Cc: theo@thornhill.no, 73978@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: Yuan Fu > Date: Sat, 9 Nov 2024 08:49:55 -0800 > Cc: Theodor Thornhill , > 73978@debbugs.gnu.org > > > > > On Nov 9, 2024, at 1:11 AM, Eli Zaretskii wrote: > > > > Ping! Theo, can you answer Yuan's questions? > > I’ve been using my local fix at work for a while now and it seems to work fine. I’ll make a patch and apply in a few days. Did you have an opportunity to install such a patch? From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 24 00:27:11 2024 Received: (at 73978) by debbugs.gnu.org; 24 Nov 2024 05:27:11 +0000 Received: from localhost ([127.0.0.1]:60346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tF59K-0005H7-SQ for submit@debbugs.gnu.org; Sun, 24 Nov 2024 00:27:11 -0500 Received: from mail-pg1-f170.google.com ([209.85.215.170]:49282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tF59I-0005Gm-FK for 73978@debbugs.gnu.org; Sun, 24 Nov 2024 00:27:09 -0500 Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-7fbd70f79f2so1539264a12.2 for <73978@debbugs.gnu.org>; Sat, 23 Nov 2024 21:27:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732425963; x=1733030763; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=L1jxogxgELmpLvThIgZIW+C0rcMcxRhOu9v1HJ0OEGg=; b=A9B9DK8ZUiPmdxeNRpv9Jdox5IL5V2IF9SS7eYpzRaIyV2RfmgECte/t3cxYndqk7w ue9ZM8yVVuOBaZshgZuLGxvoCUdc50jk7M7WMxFK2H1RtvihZ+ey1l+TbwlDpyivkKPL EDJIsT7M/zA+PRyn7DbXVcE0uBlAmcEGhkvI/fIY4fGSpmvBR8tIk9bW0qPkxusmz3er EUlOTwbqdHVp0hSoeIyJv7Gm8l8oFBR7ESU54Kh1qFy5NgQm6KEdkYg7hXefZ8QloeFh dtF5xRbxGz8W+emsvEOCjxoiAZMSauQfInViZIo2tfh8fwd1L6eb9reqxoBXI0RcDBjo U5+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732425963; x=1733030763; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L1jxogxgELmpLvThIgZIW+C0rcMcxRhOu9v1HJ0OEGg=; b=GZUddD2Qgxxk1Mzw9uEYe136QBQPJNGsJ9HEBlO8Ec8DNPistQbIWCHFufBEhgD2PR zDfhesrb+4LM6TRRteVu0buSeQEXqaghcKoSOucqP5vpmRSQHo21x2czx9IOwqkJBuRJ /CmwvBubbu/daNnki4BhdtcCs8sT/DllhDGwBGV9t4OeccuH2D0CKANWL7c2e1aQ0Phu nNxhpbcQMFmaG7owzNyS9KJKx1BTn+oE2QtvUbbqfbzLw2oYBRycyVMS2Y61cp/ouDHt 4WSfjER0xzrKdpW9Fvv+IN1kEsfOkmU4H54Kc0dwodM7agZRkgvo2nJdJlNHboafNW9Q /xNw== X-Forwarded-Encrypted: i=1; AJvYcCVPtZUubxHxC9VR5oSL8qk3nBKzxuNVemN3X0CLCMrgMM6NxUdAY/uuYIy8frf9kmc3F5qxTw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyCTWzErGeIcu57CvNaFSuHexanbM208yWuWm37n/oxLBJweoLp wKdve706goTXZ7hX1lmZqGINzDzH523ImFsIKtLsKqPeQjDYpifw X-Gm-Gg: ASbGncsroo7Fb72NWvLWjr1HcBHOXrJghwtMmaHpnOAHGeslNrfmY9pxdm8LYRLcjhu luS6uJrC0zmO++82w0aTVQxIFsSG8efAl9P4A7DnVzGu5DzkW4i9TwTNfitn6XdGq9h3Npf5LNP ywLnHSqf769UFh5yG6s2V0GUR+VS/KKrh0kqRh9y+ymNIKmiOeNwqUmeRWGEjNNJ/7DF9U9QwlM FQ7vdzKV2JMjxLv0uOqmLC3x5vcJoKJtDmpacXbbGSusBLUGKWlh4b6XWxkmAme3NmEc9+Uzg== X-Google-Smtp-Source: AGHT+IG6XAnEI7TkOIOMKmUSK2P9PzdoKMbUAv5DTHt2NiOzfjFeXCoMvb1jRyrt35u+SkL++BFnPQ== X-Received: by 2002:a17:902:ec89:b0:20c:7ee8:fc3c with SMTP id d9443c01a7336-2129f69914emr105129915ad.22.1732425962666; Sat, 23 Nov 2024 21:26:02 -0800 (PST) Received: from smtpclient.apple ([2601:646:8f81:6120:9db4:d34c:247c:f36b]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2129dbfed8fsm40870185ad.118.2024.11.23.21.26.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Nov 2024 21:26:02 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode From: Yuan Fu In-Reply-To: <86bjy6m9is.fsf@gnu.org> Date: Sat, 23 Nov 2024 21:25:50 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> <86bjy6m9is.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73978 Cc: Theodor Thornhill , 73978@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: -1.0 (-) > On Nov 23, 2024, at 4:15=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Yuan Fu >> Date: Sat, 9 Nov 2024 08:49:55 -0800 >> Cc: Theodor Thornhill , >> 73978@debbugs.gnu.org >>=20 >>=20 >>=20 >>> On Nov 9, 2024, at 1:11=E2=80=AFAM, Eli Zaretskii = wrote: >>>=20 >>> Ping! Theo, can you answer Yuan's questions? >>=20 >> I=E2=80=99ve been using my local fix at work for a while now and it = seems to work fine. I=E2=80=99ll make a patch and apply in a few days. >=20 > Did you have an opportunity to install such a patch? Hey sorry, I haven=E2=80=99t applied the patch. Actually, I want to ask = you a question before I do: is there a way to mark a single character in = buffer in string syntax? The only way I=E2=80=99m aware of is to mark = string delimiter syntax to the start and end of the string, but that = doesn=E2=80=99t work for a single character. Take the following snippet as an example: You can=E2=80=99t put the string fence syntax on the =E2=80=9Ca=E2=80=9D, = because there isn=E2=80=99t a closing fence to close it. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 10 23:53:41 2024 Received: (at 73978) by debbugs.gnu.org; 11 Dec 2024 04:53:41 +0000 Received: from localhost ([127.0.0.1]:60724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLEjE-0001gs-SX for submit@debbugs.gnu.org; Tue, 10 Dec 2024 23:53:41 -0500 Received: from mail-pg1-f175.google.com ([209.85.215.175]:59404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLEjD-0001g4-5u for 73978@debbugs.gnu.org; Tue, 10 Dec 2024 23:53:40 -0500 Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-7fd526d4d9eso2175465a12.2 for <73978@debbugs.gnu.org>; Tue, 10 Dec 2024 20:53:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733892753; x=1734497553; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=52QVwN/TGAWN6F9Smw+nMErFyZzdOMhBuW74d3svpTo=; b=cO7QARkOldIxXuzTbHHaegVE/MB8X6VEuIlZ86MrVCUj4csC8Cf8yLL2yPUY/Qs2xD XwmZI+MXW4Pkh6OUW4U3oJU3NIzAxZIhz5nu6SwJX2pgK77u84mrpCcWjTriWPnQcsC9 tdh06vvHNsD8SuM8HbYznCbzwAlZ2slF4aymXki32o/U76c3ivpCtoW+OrBBhkeaGDYR EzJdZUFYH8owTcUtyapRY/LZZgQffdy/f0bUl/JysZbMoie8EJ5AtIZMrvP0gW71nJw6 Tc8BZ8oILNL+mVnHY06/21gYLDLjY9UTwuoAGAEiFkeRUlI9ntkDXZbPjlZM8lh6MIS+ 89xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733892753; x=1734497553; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=52QVwN/TGAWN6F9Smw+nMErFyZzdOMhBuW74d3svpTo=; b=QEE6Dv3k14gHxqadZEkB85D5LOb2fci69uZJMUKAmFRFncSe+SHCfYKR5x8kGYu2Wk ukXK5hKKb6F2xn144sTHJRvmDNAdExOXsidCFbKuEy61DrkOo2VEFwY8FGd8rzzUzKS5 2ltfjGBusyfDGdtDKCQwoLThcHIeVT3gNjTNZtaRPcAVGTBQRfzsrn7yZ2sujJeY/GJi o08TCAdTgn/74GwohAL7sSscXPX3MyqcNcw0NlteXa8j07LUwm89M1BfhKVLbDK7YDQy 2jf/6kMg3FuYjnaSYwlYp21EmT6QQT8AxbmPNjW5vCmuubKwwACJ1Z6dGn+seaRHPYQ8 BSag== X-Forwarded-Encrypted: i=1; AJvYcCWZVW643r/wsCYyBblHDQym7Chfb3le6s7abrrcyjJZCXhuuGs1Fop5fUT1pa1ejlGnrUxqUQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy+fa5SY57hMRVoSbySlPrajQ18uaACrvT3RgOaDF9nrEr45WbL QUqtoT/S5AUZa2kK3paEm9uzQf/xdWDmbeWXTuhByOgYSuOWFGQU X-Gm-Gg: ASbGnctccdwwGDKW1VOB5NokxBsxPJYpi5fr6iGlZgwEwss0D4TLzXFZRv5FDBqkVCH L12pWDPQb/vJOITjA5hXJCDBUgIEy92FiZ2qqNs2LIvuVn0jE4kq6TwpNqurE3AKgPHobGYGPIq Xkk0nRMiYzY+aZePjmnWF+n5srqjK4UKmUoR+i25HZwlwJxK6Kv8Z89CDtb9Hi6BAGqVOJuvio6 rqJBvOPXq4R7+cIajPXiDCkOGry09VYTHEWgY6Dpa5p2nXFGvn41q8wyEk6fq/uO3/d8FlOAuEf Uw== X-Google-Smtp-Source: AGHT+IFeUg6hgnkDgJ4ZiNuoi3YQSxiSUPevGPITXzwba/PgFCcMwWlRwTSqNKGPh7BUVmzfRHtKhQ== X-Received: by 2002:a05:6a20:9147:b0:1e1:a5be:2999 with SMTP id adf61e73a8af0-1e1c13bcef2mr3251378637.41.1733892753116; Tue, 10 Dec 2024 20:52:33 -0800 (PST) Received: from smtpclient.apple ([2601:646:8f81:6120:f90e:3b71:6ee2:6197]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-725e77d9786sm5238293b3a.37.2024.12.10.20.52.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2024 20:52:32 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode From: Yuan Fu In-Reply-To: <56560205-B14A-4EA8-8818-90E27770A6C6@gmail.com> Date: Tue, 10 Dec 2024 20:52:20 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <763A8C73-8B15-43CC-98E2-5190C7941262@gmail.com> References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> <86bjy6m9is.fsf@gnu.org> <86serhjco6.fsf@gnu.org> <3d0c4cf6-1bc7-440e-8354-961ba5736e0d@gutov.dev> <56560205-B14A-4EA8-8818-90E27770A6C6@gmail.com> To: Dmitry Gutov X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 73978 Cc: Eli Zaretskii , Theodor Thornhill , 73978@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: -0.3 (/) > On Nov 24, 2024, at 5:27=E2=80=AFPM, Yuan Fu = wrote: >=20 >=20 >=20 >> On Nov 24, 2024, at 5:45=E2=80=AFAM, Dmitry Gutov = wrote: >>=20 >> On 24/11/2024 09:47, Eli Zaretskii wrote: >>>> Hey sorry, I haven=E2=80=99t applied the patch. Actually, I want to = ask you a question before I do: is there a way to mark a single = character in buffer in string syntax? The only way I=E2=80=99m aware of = is to mark string delimiter syntax to the start and end of the string, = but that doesn=E2=80=99t work for a single character. >>>>=20 >>>> Take the following snippet as an example: >>>>=20 >>>> >=20 > You can=E2=80=99t put the string fence syntax on the =E2=80=9Ca=E2=80=9D= , because there isn=E2=80=99t a closing fence to close it. >=20 > Yuan Circling back on this. I don=E2=80=99t think there=E2=80=99s a way to = apply string syntax to a single character. Yuan From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 21:52:40 2024 Received: (at 73978) by debbugs.gnu.org; 12 Dec 2024 02:52:40 +0000 Received: from localhost ([127.0.0.1]:37050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLZJg-0008SO-2w for submit@debbugs.gnu.org; Wed, 11 Dec 2024 21:52:40 -0500 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]:46577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLZJc-0008RV-Jt for 73978@debbugs.gnu.org; Wed, 11 Dec 2024 21:52:38 -0500 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 4ADE7254011C; Wed, 11 Dec 2024 21:52:31 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Wed, 11 Dec 2024 21:52:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1733971951; x=1734058351; bh=Ctn7QJKamvR38JuLc7dCzckhJ6stOsobVrvvHou6M38=; b= lmxHNnRLRBidtaBZLjswymhC0a4WgD9URtYyA3YwCt/h4wxuUrrSNvS8Z5+qE/nu AAZByPnhp/VjelAA6bi5BuXC+C0cF2qtIVtqAopOqA4JfsxtNloFRk2t7y1EfhDS 2Qk/s6GUymUIOhJCIKYjTZzbwoUGelbGKvAcDvNbJcp/p+PJBhUFaJf5o7HIZRfw 0D/1QFbwCewNlGe6kJMqR4Ds7QI6f1YVft7qTXHAg/1xJQH8RGm7+q1Qbruu3NQQ THDWJm+lYbolPyhqFXQrys/Zs6rjwmDs1HRNPlipDbmApWDbTTK/sSCo2GUrOUia B8mPv68rZKTgApcRSK7DPA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1733971951; x= 1734058351; bh=Ctn7QJKamvR38JuLc7dCzckhJ6stOsobVrvvHou6M38=; b=Z oO6v4U7pVA90EGqYCudkXmxrdyUq4wX1Cv60nRI0ULqlwK76NoDwmag7M7hYZLSD k1m7LoT4joBc0rTmecClgR6Pj9cBk+47efD3hN7BEnuq+LqKZGHPoCExTHO+PJZ7 s8bI969qwp10yNscPQoXC7GyN1T6o4kkXrIa4kOGFC++HpIxn7LTQSATl8431zo4 senhrExvfKUPJzR4C3AFPP5/XepppMZnuEzkbRo0q58RBIDmElaOpHuAf+4vGdmb dspbDuKRZbvN+xofCZ20hwC/CVOr+aNEOPixmsbm1pnt8UxMjSqlVUO7bx9VZVJD sDtd0xy8O1covpZsKSajg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkedvgddvudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpeegleefteekgffhvdfhtdegveevveetteegteevgeet tdehhfdukeetheffueekkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep gedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheptggrshhouhhrihesghhmrghilh drtghomhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopehthhgv ohesthhhohhrnhhhihhllhdrnhhopdhrtghpthhtohepjeefleejkeesuggvsggsuhhgsh drghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Dec 2024 21:52:29 -0500 (EST) Message-ID: <120cbe49-c34f-4f56-a8fa-80fd2a2480c6@gutov.dev> Date: Thu, 12 Dec 2024 04:52:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode To: Yuan Fu References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> <86bjy6m9is.fsf@gnu.org> <86serhjco6.fsf@gnu.org> <3d0c4cf6-1bc7-440e-8354-961ba5736e0d@gutov.dev> <56560205-B14A-4EA8-8818-90E27770A6C6@gmail.com> <763A8C73-8B15-43CC-98E2-5190C7941262@gmail.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <763A8C73-8B15-43CC-98E2-5190C7941262@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73978 Cc: Eli Zaretskii , Theodor Thornhill , 73978@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: -1.0 (-) On 11/12/2024 06:52, Yuan Fu wrote: >> The problem is, that doesn’t work when there’s only one character. Take the snippet as an example: >> >> >> >> You can’t put the string fence syntax on the “a”, because there isn’t a closing fence to close it. >> >> Yuan > Circling back on this. I don’t think there’s a way to apply string syntax to a single character. Indeed, sorry. There needs to be a separate char as a "closing fence" like you say because it's treated as a part of the string. So it's 2 chars minimum. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 23:58:11 2024 Received: (at 73978) by debbugs.gnu.org; 12 Dec 2024 04:58:11 +0000 Received: from localhost ([127.0.0.1]:37191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLbH9-0000p3-41 for submit@debbugs.gnu.org; Wed, 11 Dec 2024 23:58:11 -0500 Received: from mail-pf1-f179.google.com ([209.85.210.179]:50323) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLbH6-0000ou-4W for 73978@debbugs.gnu.org; Wed, 11 Dec 2024 23:58:09 -0500 Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-728ea1e0bdbso163015b3a.0 for <73978@debbugs.gnu.org>; Wed, 11 Dec 2024 20:58:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733979427; x=1734584227; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7tN7iyzR748ZpygaLtuQAYefXV80UeH9WRyn8H5OQcg=; b=iBboqzpC9Rn8gQmvC78/QgDOgiCJ6kmu4j9LcPDiTo+z1c3iUvMusd2ljtiPFidUyG cCBrORA9M3lPGCd5Bth79QTScL6nU8dYOAlA5SEKtt7Ke32H+G0QeSh4VSWp1RWUrVWr hwVBzbmnEZKVq6VNnkCwPilxd9dtqVqGWB+PD6dfAXL+vvCMifH1SZAqMZlMRlwh0Vo5 aXSVkJjo3PJviKHYuAiWKlDfT9QE3ug4oUU6b+gdKzCWpZ0PxjnvmfBPN6spOMGhD3yE rd8jNqVU9JA8G9w0c+yai9Re7MvlyQSWNkjGf7vrx10ycYwD3PAyv009rvTi058zYcMm gXqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733979427; x=1734584227; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7tN7iyzR748ZpygaLtuQAYefXV80UeH9WRyn8H5OQcg=; b=gDTQghTp2o10sOzKQFgs5srDMY0w/CThpHruJfKIIp4YVMPop7S8i5ktbLeDmrYn84 AAPVTgwxaaNQtT9Q9NzE8nIBgSP/PSSJPGX6cBLHkfGcAfefIvMI+eTjc05aTEOmcw2h 380xGjDeH15+L17xVDdLeeb8HtI9Wuvt+xPvfavSmF6rV6NFfyETrsHM3boZgHCzzUzp Wm34su6Ingt0R+heuLCSw2dsg2lasSNHXC+MzqbGHiGTYwHs/rgSCAYM7j/avnMrVypr /8gEZwv3Je/n80+VCM9ugbxdsJtcCQiuf6Fp4QXDgURrlDCto6sfGWH7seOmzl2aFP2K oGpg== X-Forwarded-Encrypted: i=1; AJvYcCWr7eOPUDvXfKMo7VdLS3ra22n/BJ5sxHCtIbz4Y1YBm14+kA/Pu/hNxidSqhIatFbvNIbr4w==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yw/z4/5dwcTy3L1VRQ+wP2IASk0S7w8Envd8wuIHbviUALWxQXF UKu/LK+PfPW35BHHkY7l8ZTTlZ6MSRtTM5PciTYXNU1P1kQHyIjDSt/2rQ== X-Gm-Gg: ASbGncvlWWsdL4Za7i5XZtjHP9QazmqLh0wQb0bodt0+Z7gEu4L6VlnAamHxHG92Jjs oyYFNKV1pE6zCMmmzPWwU40LBmNL6U2Eo1Hhu7Nftvg282/vXnFrvCLjfwx8nEDTaCyMvEu+/Zt lBVm/kCfG3VejhlIikS1F9P1ni7KesxTzrG4+kw39ZA0f3C3qB4wz10Ru3h1EVKrQa3op22zlxV sZ1pX19cv7646Pr4xLX9ckzHn+QXIxXxYjh9K2o1+RHVAKm4Kajqq3i6RmOb0Ghg0+1fxgB6AWZ 4ENG X-Google-Smtp-Source: AGHT+IEYukyVzV8qjwcbP8OjnBV34rn69iD3Y4/64fbzNAFebxVPD448q8G4PyKbyTjJ1b7ZbOVQxQ== X-Received: by 2002:a05:6a20:244f:b0:1e0:d87a:f67 with SMTP id adf61e73a8af0-1e1cea99e9fmr2940201637.13.1733979427418; Wed, 11 Dec 2024 20:57:07 -0800 (PST) Received: from smtpclient.apple ([2601:646:8f81:6120:e40f:e83b:f0f0:1e5e]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-725d8661cb5sm8607747b3a.127.2024.12.11.20.57.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Dec 2024 20:57:06 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode From: Yuan Fu In-Reply-To: <120cbe49-c34f-4f56-a8fa-80fd2a2480c6@gutov.dev> Date: Wed, 11 Dec 2024 20:56:55 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> <86bjy6m9is.fsf@gnu.org> <86serhjco6.fsf@gnu.org> <3d0c4cf6-1bc7-440e-8354-961ba5736e0d@gutov.dev> <56560205-B14A-4EA8-8818-90E27770A6C6@gmail.com> <763A8C73-8B15-43CC-98E2-5190C7941262@gmail.com> <120cbe49-c34f-4f56-a8fa-80fd2a2480c6@gutov.dev> To: Dmitry Gutov X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 73978 Cc: Eli Zaretskii , Theodor Thornhill , 73978@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: -0.3 (/) > On Dec 11, 2024, at 6:52=E2=80=AFPM, Dmitry Gutov = wrote: >=20 > On 11/12/2024 06:52, Yuan Fu wrote: >>> The problem is, that doesn=E2=80=99t work when there=E2=80=99s only = one character. Take the snippet as an example: >>>=20 >>> >>>=20 >>> You can=E2=80=99t put the string fence syntax on the =E2=80=9Ca=E2=80=9D= , because there isn=E2=80=99t a closing fence to close it. >>>=20 >>> Yuan >> Circling back on this. I don=E2=80=99t think there=E2=80=99s a way to = apply string syntax to a single character. >=20 > Indeed, sorry. >=20 > There needs to be a separate char as a "closing fence" like you say = because it's treated as a part of the string. So it's 2 chars minimum. How hard is it to add a new syntax for this case? Or is there some way = to work around this? We can=E2=80=99t just not apply the string syntax, = because if the =E2=80=9Ca=E2=80=9D is a parenthesis, etc, it would mess = up the parenthesis balancing after it. Maybe just give it a whitespace syntax?=20 Yuan= From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 12 12:19:53 2024 Received: (at 73978) by debbugs.gnu.org; 12 Dec 2024 17:19:53 +0000 Received: from localhost ([127.0.0.1]:40130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLmqu-0005gG-16 for submit@debbugs.gnu.org; Thu, 12 Dec 2024 12:19:52 -0500 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]:59887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLmqm-0005ft-Ly for 73978@debbugs.gnu.org; Thu, 12 Dec 2024 12:19:49 -0500 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 392D61383FE5; Thu, 12 Dec 2024 12:19:24 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 12 Dec 2024 12:19:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1734023964; x=1734110364; bh=uWvxiRYhL6b0mVmIDCC8qWzvO/K7/hh3biLs+4P6R24=; b= LLuRKR+8ln72CLW4ONVlLs3+b9w4LDNUzXHwe/NtFtZGx56r+QmwsbBcTlcM/yvf KIEV1ePPj6KRes7c07CIqdbvSP94t15V9a//rfahhctls7k+lzwvzYz4XbTbygWD U41vDv7L9S9hslcJXkMD6b7zXQec7qkqShxdlaEhurpWjYVsu+MQhUBpFtXr2qmT Mvse/LFOgYow79IA9M6msB2FLFcsfGRNcVA2cIgYazv5zBPRTuR0UoY+vLoRJxVg G4Ilrl9TgO/klR0H40Yu1cEgAhRel1aCWbvydgNN0tCU7n8XlmHN3D26hdTXOXQG mRIM3Eq+yRrUILjAhocv5w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1734023964; x= 1734110364; bh=uWvxiRYhL6b0mVmIDCC8qWzvO/K7/hh3biLs+4P6R24=; b=b M/hi03GTRlnY4Dw+PEQsj87pGYsRZmcMwVfqaacpl5u4hd/MlCQb3EWNPCIn9ewl sbQC/9al5zfuopVK4ugyJTahDwp2kcoxaZXXc8lI37FacTun43vR68CKFNcwiqv7 TtKAOqM0X6FsLOV7QcxSQRFabZS9KLZgMzsQck8Qc+tgDhWjIYCMAyrQu36WeyZT M3nBwSfkjtce6ps3FMYJa/54kZ89gH7Q6DTCXVPVErG2LlQmYccec1noviQSGmgd dW5ShRcUBwczxy978Gbdh9dQO6MUwOt9Bqak+fjT1hqyGWlTWSLrtovr42iaFBSn zgTwrlwK9MEZqf7XydYmA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeehgdeljecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpeefvdejveeiffefueekleevieekgedttdevieelvefg vdfghfdtgfegfeefgeeigfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehg uhhtohhvrdguvghvpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprh gtphhtthhopegtrghsohhurhhisehgmhgrihhlrdgtohhmpdhrtghpthhtohepvghlihii sehgnhhurdhorhhgpdhrtghpthhtohepthhhvghosehthhhorhhnhhhilhhlrdhnohdprh gtphhtthhopeejfeeljeekseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Dec 2024 12:19:21 -0500 (EST) Message-ID: <8178b607-8146-4798-8db8-2e08710b8cd5@gutov.dev> Date: Thu, 12 Dec 2024 19:19:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode To: Yuan Fu References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> <86bjy6m9is.fsf@gnu.org> <86serhjco6.fsf@gnu.org> <3d0c4cf6-1bc7-440e-8354-961ba5736e0d@gutov.dev> <56560205-B14A-4EA8-8818-90E27770A6C6@gmail.com> <763A8C73-8B15-43CC-98E2-5190C7941262@gmail.com> <120cbe49-c34f-4f56-a8fa-80fd2a2480c6@gutov.dev> Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 73978 Cc: Eli Zaretskii , Theodor Thornhill , 73978@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: -1.0 (-) On 12/12/2024 06:56, Yuan Fu wrote: > How hard is it to add a new syntax for this case? Or is there some way to work around this? We can’t just not apply the string syntax, because if the “a” is a parenthesis, etc, it would mess up the parenthesis balancing after it. Probably not very hard, but that seems like it'd affect the total set of syntax classes - which means adding it to the manual, etc. > Maybe just give it a whitespace syntax? Right, in such cases I applied the "whitespace" or "punctuation" syntax to the whole character span, like in https://github.com/dgutov/mmm-mode/blob/master/mmm-erb.el#L97 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 13 00:48:57 2024 Received: (at 73978-done) by debbugs.gnu.org; 13 Dec 2024 05:48:57 +0000 Received: from localhost ([127.0.0.1]:41262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLyXo-0000iE-Pk for submit@debbugs.gnu.org; Fri, 13 Dec 2024 00:48:57 -0500 Received: from mail-pl1-f172.google.com ([209.85.214.172]:53406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLyXl-0000i2-Qn for 73978-done@debbugs.gnu.org; Fri, 13 Dec 2024 00:48:55 -0500 Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-215770613dbso9576885ad.2 for <73978-done@debbugs.gnu.org>; Thu, 12 Dec 2024 21:48:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734068873; x=1734673673; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GBzZmAAMtx6RYU5hsSS20+4tH87xvaBxYKpdppAjqB8=; b=AgCnidb8jXFegUEu1pS1Zb35wk2t4FqY2YvHWC5zcCmhNCO47wt9+wmwNr+985AYV+ p5u8vvoWhK7hsbqOdSg03/2kWoGsqJGrq3sjNex+RLKmume+/MCBQNiqqdl03FR4Zl/P BRJud7+KUbl/aVDkMCkS/8ibFelwabpAB4JPj7+VqGWyq5ZWEumAqzhQ1CJP2tPFPRPl ju/cF9c+UlDwcAT8Az+pe9tBiRLoi+AiUwBa1v/7cB+txxXUg8cHa78CZyByyP+C7zD1 tCOjmEcolHrCZQ7WXn4OfUMaZOeuYO8SsRzndesPcMceJUZR27OmhbbmEjjskGn2svSf XIlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734068873; x=1734673673; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GBzZmAAMtx6RYU5hsSS20+4tH87xvaBxYKpdppAjqB8=; b=NTezhNHJpXyBboBz7GEh5db0QHIgSyYOLi95AGvGYWPm0JKYA+tBE5ty+HpoZ5+A5W FwcwqzpAeYK37dufyoyjAGFF30MySlZ/15NzXJ2/bWRFRpgKNOZxl0tlw3NyiLx0ar0h Hzuy3z9KuBHBMUWcfoTG1xWoGOdCn8N85E35OYJBlyDqo9LY0iTcwOETT0ExjhijncAY sZ3f0TOPi3AvACToJ7oZr5aUNwuSflx6srs4orILMg4yVIsaHqMkf9BI0T2sGV+tyZyQ rf+YpcrScaza9okl7qyTzgp2sWCS6aeNAgbeQmjsZ5oqF5+8qgNk9YaaIveSBzV6aveW UTpg== X-Forwarded-Encrypted: i=1; AJvYcCVBuUwp+1KmkUjRt5mDwEStKsdU7nb++rzdaCz7vq23HsV1l3Tsb2IhqJJsX589fLf73GXq2HqENuwe@debbugs.gnu.org X-Gm-Message-State: AOJu0Yz0inaEnCDjiI2K7sOqTRIqoayo+bzkUb1q3il7536k/LIRW1g7 jqPLov5vCSjZItp8xp3npJLYJzmlIuFaQ7h7ohX3ibc9r3iyH2ks X-Gm-Gg: ASbGncte0f0e/Ug2rbIY4O1lgRn0qsuLCjBntqevYUtAWYQuGdWUn9jhRibfekXv4dg 8Q77vg/0DAa5KtjP1GPtDQu+Uqq8Bp3R+DSkjkFPk/kCR5l2QsIZVmS1XOVo5w8j6AxGfHa54oi F7a82PHjDIAaAfJsPwZX+zVmM9b7eoWL5hP6MDlmj8nCf7EU/dohmiYs8c7wgcsnIjxH4iz99aH TRnKAOpo2WKFV9mAnLKQNQzs3klFdShxbVur8V6ZwAeDgNSVDsUeVoFHYkVUCBKPxZ79NSY0Sqq yUMN X-Google-Smtp-Source: AGHT+IHs5GFzhLZ6bGGsBZXfvhXO0X7t4EQjf2d+lYD/UgwWEIu4ZSJ1QHLoPELUxxPVAy+SmKHuzQ== X-Received: by 2002:a17:902:d543:b0:216:2426:767f with SMTP id d9443c01a7336-21892a41d41mr24131055ad.49.1734068873066; Thu, 12 Dec 2024 21:47:53 -0800 (PST) Received: from smtpclient.apple ([2601:646:8f81:6120:1591:1a19:416c:1925]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-215f8e3e875sm132757035ad.19.2024.12.12.21.47.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 21:47:52 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode From: Yuan Fu In-Reply-To: <8178b607-8146-4798-8db8-2e08710b8cd5@gutov.dev> Date: Thu, 12 Dec 2024 21:47:41 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> <86bjy6m9is.fsf@gnu.org> <86serhjco6.fsf@gnu.org> <3d0c4cf6-1bc7-440e-8354-961ba5736e0d@gutov.dev> <56560205-B14A-4EA8-8818-90E27770A6C6@gmail.com> <763A8C73-8B15-43CC-98E2-5190C7941262@gmail.com> <120cbe49-c34f-4f56-a8fa-80fd2a2480c6@gutov.dev> <8178b607-8146-4798-8db8-2e08710b8cd5@gutov.dev> To: Dmitry Gutov X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 73978-done Cc: Eli Zaretskii , Theodor Thornhill , 73978-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: -0.3 (/) > On Dec 12, 2024, at 9:19=E2=80=AFAM, Dmitry Gutov = wrote: >=20 > On 12/12/2024 06:56, Yuan Fu wrote: >> How hard is it to add a new syntax for this case? Or is there some = way to work around this? We can=E2=80=99t just not apply the string = syntax, because if the =E2=80=9Ca=E2=80=9D is a parenthesis, etc, it = would mess up the parenthesis balancing after it. >=20 > Probably not very hard, but that seems like it'd affect the total set = of syntax classes - which means adding it to the manual, etc. >=20 >> Maybe just give it a whitespace syntax? >=20 > Right, in such cases I applied the "whitespace" or "punctuation" = syntax to the whole character span, like in = https://github.com/dgutov/mmm-mode/blob/master/mmm-erb.el#L97 Thanks. I went with the whitespace trick and pushed my patch to master. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 24 03:22:11 2024 Received: (at 73978) by debbugs.gnu.org; 24 Dec 2024 08:22:11 +0000 Received: from localhost ([127.0.0.1]:59242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ0B9-0001cl-ER for submit@debbugs.gnu.org; Tue, 24 Dec 2024 03:22:11 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:40885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ0B6-0001cV-Rv for 73978@debbugs.gnu.org; Tue, 24 Dec 2024 03:22:09 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id B214120003; Tue, 24 Dec 2024 08:21:38 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode In-Reply-To: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> (Yuan Fu's message of "Wed, 23 Oct 2024 21:06:40 -0700") Organization: LINKOV.NET References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> Date: Tue, 24 Dec 2024 09:59:10 +0200 Message-ID: <87r05xmr24.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73978 Cc: dmitry@gutov.dev, theo@thornhill.no, 73978@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: -1.7 (-) > I went with the whitespace trick and pushed my patch to master. While testing forward-sexp in tsx-ts-mode I noticed that this line in 'tsx-ts--s-p-query': ((jsx_text) @jsx) disrupts syntax-based navigation for forward-sentence-default-function. In such example: import * as React from "react"; import * as ReactDOM from "react-dom"; ReactDOM.render(

Hello, Welcome to React and TypeScript

, document.getElementById("root") ); 'C-M-b' on text inside

stops after the first "H" in "Hello", and 'C-M-f' before the last "t" in "TypeScript". It seems the first and the last characters are interpreted as the opening/closing fence? From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 24 03:32:37 2024 Received: (at 73978) by debbugs.gnu.org; 24 Dec 2024 08:32:37 +0000 Received: from localhost ([127.0.0.1]:59256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ0LF-00028Y-J8 for submit@debbugs.gnu.org; Tue, 24 Dec 2024 03:32:37 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:53973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ0LD-00028I-BF for 73978@debbugs.gnu.org; Tue, 24 Dec 2024 03:32:36 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 1FB24C0005; Tue, 24 Dec 2024 08:32:06 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode In-Reply-To: <87r05xmr24.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 24 Dec 2024 09:59:10 +0200") Organization: LINKOV.NET References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> Date: Tue, 24 Dec 2024 10:31:33 +0200 Message-ID: <87jzbpmqhm.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73978 Cc: dmitry@gutov.dev, theo@thornhill.no, 73978@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: -1.7 (-) > While testing forward-sexp in tsx-ts-mode I noticed that > this line in 'tsx-ts--s-p-query': > > ((jsx_text) @jsx) > > disrupts syntax-based navigation for forward-sentence-default-function. With this patch everything works perfectly: diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 5c3c9a24ff4..01dd8297996 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -630,7 +640,8 @@ tsx-ts--s-p-query (when (treesit-available-p) (treesit-query-compile 'tsx '(((regex pattern: (regex_pattern) @regexp)) - ((jsx_text) @jsx))))) + ((jsx_opening_element) @jsx) + ((jsx_closing_element) @jsx))))) (defun typescript-ts--syntax-propertize (beg end) (let ((captures (treesit-query-capture 'typescript typescript-ts--s-p-query beg end))) From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 24 03:53:42 2024 Received: (at 73978) by debbugs.gnu.org; 24 Dec 2024 08:53:42 +0000 Received: from localhost ([127.0.0.1]:59279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ0fe-00037m-0o for submit@debbugs.gnu.org; Tue, 24 Dec 2024 03:53:42 -0500 Received: from mail-pl1-f181.google.com ([209.85.214.181]:57350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ0fZ-00037b-Ri for 73978@debbugs.gnu.org; Tue, 24 Dec 2024 03:53:40 -0500 Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2156e078563so45738385ad.2 for <73978@debbugs.gnu.org>; Tue, 24 Dec 2024 00:53:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735030357; x=1735635157; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=NR9pvEgC8Fc+geWV9TFMUuQu7XGBKecbTuNg9Jg0+6M=; b=HRKtjAJ2hR7CXWsZiIczBBSZGuC66uK129pd/RB82WpNZ4KFAZ0P9G+1e9lu7lN7RL ftILBS+6yZYj9M9JoE3xizQLj++CEm1EPfpKD1+EkEwQb2kEyDKx/dKn/LmcoiGlbCcT XvrjFMVUFZvHvA1UKdvWMfPfuVgdgOvTQM6pd6LU09dcMYpROatkx579M3MeOoIQa/NT 3DpaKKzhqJ2vD2gednb5KjDFefA/q2qq2YX28DzgcVnQezjM9KpGNNuSfrGQGLSYW5GW mkkn+6TELDuxr/UsY+hleq/dD5085NoTCMthg3BYVHRpCNMxn94AkWBE6zCIJHQqxZMq QtCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735030357; x=1735635157; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NR9pvEgC8Fc+geWV9TFMUuQu7XGBKecbTuNg9Jg0+6M=; b=bMss+3IfVVrPESE9qR8tMSMqIoCqkdIhnkMTXURmVdaJV1rAe9DfbKzhZP8FTYdnyb AU9kjsBFr5i1TTseOmtQ2NdFt9fvVOyhlkTF6UK3y4B0JCtaARA3llQlHv++1T4gWj0x enbIDHMc11p3MNs1t1a/Epk6+e9vw3kpRyOgIfAc4hCGZu725J8evshHGGDgbECf4IPO gPTUyQBTxHCEflzTQJCecN4oQepT2/jVKaoMnW+HtoA5oX9nfwGW/V3Sa2M9sMMpL0Zy jku2tVFEmwWgQE5LI3Nfn0Nu9CJjpaC2vErnPAanXzhTTheTZiJe/ApcM1/1jF6uGfFn vrow== X-Forwarded-Encrypted: i=1; AJvYcCVqNXbGj4ok4Z+6kKZHes0Z/wmkibXEEJ70VJUpZSpNbogUZHuGkhsWLN0TQBY0MHgg5f/sDA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yzf7ApH/9RRNQsFdKMLXTLtL5+T2eZyJWoUNGY2SmUoJIM6Da/K skppArDAAvs0E5H1scyZ6AuyGGGEQtB5ESxgcZyhRtMuQ1qlCylo X-Gm-Gg: ASbGncv418IMAZGOzbTs/alzW9l2qgCLTJsMbXLXCuGGI8SvK1i+G6S25G505PaaAhk 3tosjptGBDFDo6Fg4TNCj8UnKlOAMVbh1tejvthzNerN5kFkNTzq8nPujDOwZN8JnJ7/BbV964g wTn8uGgicpVA0sIlcdFdUj+rXbxxgd0xsOjxUq/Kc9Q1jOHJgXsOXfu09RbRZtQ0f0p8BpMKVy1 Q7sZLlxmNW43w4J6e00mRxtkmJNSzQj6EYnMgaLuWSb7RaTi0ArKpW8p3hzVtuckd/4u1pmnkKj Upo3 X-Google-Smtp-Source: AGHT+IFjaBTyGDWvVPj//HWpN3aNGaYN/9+dGnFCIUbMfLDKAytWbeD28h5zLTLn+uN765hspAgzlQ== X-Received: by 2002:a05:6a21:3189:b0:1e1:ab8b:dda1 with SMTP id adf61e73a8af0-1e5e080c4a2mr28782513637.35.1735030356852; Tue, 24 Dec 2024 00:52:36 -0800 (PST) Received: from smtpclient.apple ([2601:646:8f81:6120:1d98:6810:9846:b152]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8dbbf6sm9239934b3a.111.2024.12.24.00.52.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Dec 2024 00:52:36 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode From: Yuan Fu In-Reply-To: <87jzbpmqhm.fsf@mail.linkov.net> Date: Tue, 24 Dec 2024 00:52:24 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73978 Cc: Dmitry Gutov , Theodor Thornhill , 73978@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: -1.0 (-) > On Dec 24, 2024, at 12:31=E2=80=AFAM, Juri Linkov = wrote: >=20 >> While testing forward-sexp in tsx-ts-mode I noticed that >> this line in 'tsx-ts--s-p-query': >>=20 >> ((jsx_text) @jsx) >>=20 >> disrupts syntax-based navigation for = forward-sentence-default-function. >=20 > With this patch everything works perfectly: >=20 > diff --git a/lisp/progmodes/typescript-ts-mode.el = b/lisp/progmodes/typescript-ts-mode.el > index 5c3c9a24ff4..01dd8297996 100644 > --- a/lisp/progmodes/typescript-ts-mode.el > +++ b/lisp/progmodes/typescript-ts-mode.el > @@ -630,7 +640,8 @@ tsx-ts--s-p-query > (when (treesit-available-p) > (treesit-query-compile 'tsx > '(((regex pattern: (regex_pattern) = @regexp)) > - ((jsx_text) @jsx))))) > + ((jsx_opening_element) @jsx) > + ((jsx_closing_element) @jsx))))) >=20 > (defun typescript-ts--syntax-propertize (beg end) > (let ((captures (treesit-query-capture 'typescript = typescript-ts--s-p-query beg end))) Thanks for looking into this! But what=E2=80=99s the intention of this = change? In a snippet like this: Only the =E2=80=9CText=E2=80=9D part should be marked as string. With = the change you proposed, the part would = be marked as string. We must mark text as strings because they could include /(/) etc and = mess with syntax-ppss.=20 Yuan= From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 24 12:28:41 2024 Received: (at 73978) by debbugs.gnu.org; 24 Dec 2024 17:28:41 +0000 Received: from localhost ([127.0.0.1]:34079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ8i0-0004Xj-SA for submit@debbugs.gnu.org; Tue, 24 Dec 2024 12:28:41 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:37933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ8hw-0004XO-4o for 73978@debbugs.gnu.org; Tue, 24 Dec 2024 12:28:39 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id B0B4EC0002; Tue, 24 Dec 2024 17:28:08 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode In-Reply-To: <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> (Yuan Fu's message of "Tue, 24 Dec 2024 00:52:24 -0800") Organization: LINKOV.NET References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> Date: Tue, 24 Dec 2024 19:25:22 +0200 Message-ID: <87ed1xkn7h.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73978 Cc: Dmitry Gutov , Theodor Thornhill , 73978@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: -1.7 (-) >> @@ -630,7 +640,8 @@ tsx-ts--s-p-query >> (when (treesit-available-p) >> (treesit-query-compile 'tsx >> '(((regex pattern: (regex_pattern) @regexp)) >> - ((jsx_text) @jsx))))) >> + ((jsx_opening_element) @jsx) >> + ((jsx_closing_element) @jsx))))) >> >> (defun typescript-ts--syntax-propertize (beg end) >> (let ((captures (treesit-query-capture 'typescript typescript-ts--s-p-query beg end))) > > Thanks for looking into this! But what’s the intention of this change? > In a snippet like this: > > > > Only the “Text” part should be marked as string. With the change you > proposed, the part would be marked as string. How could I see that text is marked as string? I see no different fontification. > We must mark text as strings because they could include /(/) etc > and mess with syntax-ppss. With the updates in 'tsx-ts-mode' that I just pushed to master please try in the following example: ReactDOM.render(

Hello, Welcome to React and TypeScript

, document.getElementById("root") ); 1. move point to the beginning of

2. type C-M-b 3. point incorrectly moves to inside
However, this the above patch, point doesn't move that is correct. Another test case: 1. move point to the beginning of the word "Welcome" 2. type C-M-b 3. point incorrectly moves to the letter "e" instead of correct "H" 4. type C-M-f a few times until the end of text 5. point stops at the letter "t" instead of moving after the last letter All these cases work correctly with the patch above. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 24 15:58:33 2024 Received: (at 73978) by debbugs.gnu.org; 24 Dec 2024 20:58:33 +0000 Received: from localhost ([127.0.0.1]:34818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQBz7-0006hp-2S for submit@debbugs.gnu.org; Tue, 24 Dec 2024 15:58:33 -0500 Received: from mail-pl1-f177.google.com ([209.85.214.177]:46341) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQBz2-0006hX-Ui for 73978@debbugs.gnu.org; Tue, 24 Dec 2024 15:58:31 -0500 Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-21649a7bcdcso57747635ad.1 for <73978@debbugs.gnu.org>; Tue, 24 Dec 2024 12:58:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735073848; x=1735678648; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1UtGZWaJLtbpSTQfqq36FkdGwlUZFxO5x9nx3Zs63MM=; b=JSkKdkqk2Gz2HaYR0FTtU2biGZpIHS/AcJdMtB+mfYKQ4kWxS1q+lSUkv+TiuFxTbB Kjf/dsjYBYBp0TDIxtDcegr6du5o+6QCfZlEbnwCVXqdDL9ktOPh5sokc5ObwFVts3ie 2rv8cI8JjB/sNl7wg/llNZ7kDlsQCmSA7SG4/i+TsvpjtYyR/cWQgWIOaWaSCmu9sPCN 3ihHKAYnLlSgp68LSm+Kyq4WBgjiVwxTyj2TcWV7pDWlHFzokknxpqBfLxL2KU3AXHc5 AEcEWwgwI7Z/8a0F+r3FbtM5DyAqOgOue+K+LpXV7+o8WhoUt2iUqovRG9qvhxvGIhDo Xp/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735073848; x=1735678648; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1UtGZWaJLtbpSTQfqq36FkdGwlUZFxO5x9nx3Zs63MM=; b=Ro27HZKTvyhhD/9j106Z+soWKvxX1poPc9F81g2/f5pjIVuBqkJlVwCtPyK6vgQrCs 2HZ8Jrd9rl23x+tdJY46QVCoojFqXrhXHFkZ4SCWUJsQ61pPjn/1WD0k+cUyib2t3Jsg 6AisZUTQosvr19/I9IK4BJMU2Nyb6hiuY61t16RqP/Fek/bKCmage6kn3B2njQSDUk3c EuJ19jGaELZD6YsnjWqQjLAtIv5cG4ax/pvjLf9AhyKS2ejRIZusBF7p96ADWzljamS4 uk9TdMTAYBZ0t/y9Q21v+QMgxc62Sda02SFDtoiflcUqvS7QvMJHXwLq5NuW8/ZVpgq+ ZZQg== X-Forwarded-Encrypted: i=1; AJvYcCWLrfbeWtC13AytYfsbRqZG6wppmL1TahRI51yd0zom20CIgUxnnmRucflKouzo6VtPaImbaA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxieiYWxsqU1KtUOUgOJyWE8FWGpOXHwAwiv+Yz9mEPdMYKfgiK t52HWAuyLaKL+yjfqOCEMJe2Sb7tvdEgwI8MHPj7tRAYlKYer8jf X-Gm-Gg: ASbGnctPvHEbdJug80kXh4x4rWVL8PcC5r3KnS6aMTMHFzWfGTy0LnQRfTLYFe5C7R0 jUfEL+WBKPcK1sCl5D3C4iu7NT+wSXxHP9eRmF7gHsmZutwXpFz5iBlg4hrFfZWxXANm/1UQ2mz zWlnFRTf/h2V6unp6U4pmJlfjJz9JiHOlvKxbF8KOLGn8b/vdMLpZyKwhzH0YVbTBrHnX6GysBy lPiZKG58jEu/xS3fS09fVMhioyN2BMrktl526iHZ3eZSmXAvtFGzua4ZiNXj3ZoDnEOgAKh7wR8 D1wJ X-Google-Smtp-Source: AGHT+IHNtYPzEGUVMa7G0WAwC4T2zRd6HPdjD7hkoP2e4REDV2KvbtvXf2JL8rjezRkZR6RlM96FjQ== X-Received: by 2002:a17:902:db0e:b0:216:2259:a4bd with SMTP id d9443c01a7336-219e70dd108mr272769085ad.52.1735073847612; Tue, 24 Dec 2024 12:57:27 -0800 (PST) Received: from smtpclient.apple ([2601:646:8f81:6120:1d98:6810:9846:b152]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9cde0dsm93905555ad.140.2024.12.24.12.57.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Dec 2024 12:57:26 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode From: Yuan Fu In-Reply-To: <87ed1xkn7h.fsf@mail.linkov.net> Date: Tue, 24 Dec 2024 12:57:15 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <5626DFE7-CA89-4A39-A896-99D8814FD6CD@gmail.com> References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> <87ed1xkn7h.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73978 Cc: Dmitry Gutov , Theodor Thornhill , 73978@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: -1.0 (-) > On Dec 24, 2024, at 9:25=E2=80=AFAM, Juri Linkov = wrote: >=20 >>> @@ -630,7 +640,8 @@ tsx-ts--s-p-query >>> (when (treesit-available-p) >>> (treesit-query-compile 'tsx >>> '(((regex pattern: (regex_pattern) = @regexp)) >>> - ((jsx_text) @jsx))))) >>> + ((jsx_opening_element) @jsx) >>> + ((jsx_closing_element) @jsx))))) >>>=20 >>> (defun typescript-ts--syntax-propertize (beg end) >>> (let ((captures (treesit-query-capture 'typescript = typescript-ts--s-p-query beg end))) >>=20 >> Thanks for looking into this! But what=E2=80=99s the intention of = this change? >> In a snippet like this: >>=20 >> >>=20 >> Only the =E2=80=9CText=E2=80=9D part should be marked as string. = With the change you >> proposed, the part would be marked = as string. >=20 > How could I see that text is marked as string? > I see no different fontification. It=E2=80=99s marked as string for syntax-ppss purpose, so that = syntax-ppss skips it when scanning for balanced pairs. It=E2=80=99s not = related to fontification. >=20 >> We must mark text as strings because they could include /(/) etc >> and mess with syntax-ppss. >=20 > With the updates in 'tsx-ts-mode' that I just pushed to master > please try in the following example: >=20 > ReactDOM.render( >
>

Hello, Welcome to React and TypeScript

>
, > document.getElementById("root") > ); >=20 > 1. move point to the beginning of

> 2. type C-M-b > 3. point incorrectly moves to inside
>=20 > However, this the above patch, point doesn't move > that is correct. >=20 > Another test case: >=20 > 1. move point to the beginning of the word "Welcome" > 2. type C-M-b > 3. point incorrectly moves to the letter "e" instead of correct "H" >=20 > 4. type C-M-f a few times until the end of text > 5. point stops at the letter "t" instead of moving after the last = letter >=20 > All these cases work correctly with the patch above. I understand the problem you want to solve, but the patch above will = bring back the bug I was trying to fix in the first place.=20 And I still don=E2=80=99t understand the intention of your patch. Maybe = I missed something. Am I correct that you want to apply string syntax on = the tags, eg,
, ,
?=20 Yuan= From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 25 03:10:49 2024 Received: (at 73978) by debbugs.gnu.org; 25 Dec 2024 08:10:49 +0000 Received: from localhost ([127.0.0.1]:36043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQMTh-0005pV-3C for submit@debbugs.gnu.org; Wed, 25 Dec 2024 03:10:49 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:35181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQMTe-0005p8-Mt for 73978@debbugs.gnu.org; Wed, 25 Dec 2024 03:10:47 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 3A94460002; Wed, 25 Dec 2024 08:10:37 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode In-Reply-To: <5626DFE7-CA89-4A39-A896-99D8814FD6CD@gmail.com> (Yuan Fu's message of "Tue, 24 Dec 2024 12:57:15 -0800") Organization: LINKOV.NET References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> <87ed1xkn7h.fsf@mail.linkov.net> <5626DFE7-CA89-4A39-A896-99D8814FD6CD@gmail.com> Date: Wed, 25 Dec 2024 09:40:48 +0200 Message-ID: <87msgk43cv.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73978 Cc: Dmitry Gutov , Theodor Thornhill , 73978@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: -1.7 (-) >> ReactDOM.render( >>
>>

Hello, Welcome to React and TypeScript

>>
, >> document.getElementById("root") >> ); >> >> 1. move point to the beginning of

>> 2. type C-M-b >> 3. point incorrectly moves to inside
>> >> However, this the above patch, point doesn't move >> that is correct. >> >> Another test case: >> >> 1. move point to the beginning of the word "Welcome" >> 2. type C-M-b >> 3. point incorrectly moves to the letter "e" instead of correct "H" >> >> 4. type C-M-f a few times until the end of text >> 5. point stops at the letter "t" instead of moving after the last letter >> >> All these cases work correctly with the patch above. > > I understand the problem you want to solve, but the patch above will > bring back the bug I was trying to fix in the first place. The patch just demonstrated one of possible ways to solve the problem. > And I still don’t understand the intention of your patch. Maybe > I missed something. Am I correct that you want to apply string syntax > on the tags, eg,
, ,
? I don't need to apply string syntax on the tags. I just found that currently C-M-f navigation was broken. Maybe there are other ways to fix it? From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 25 03:34:30 2024 Received: (at 73978) by debbugs.gnu.org; 25 Dec 2024 08:34:30 +0000 Received: from localhost ([127.0.0.1]:36123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQMqb-00074G-S6 for submit@debbugs.gnu.org; Wed, 25 Dec 2024 03:34:30 -0500 Received: from mail-pl1-f178.google.com ([209.85.214.178]:50197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQMqZ-00073z-Sv for 73978@debbugs.gnu.org; Wed, 25 Dec 2024 03:34:28 -0500 Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-216426b0865so60459045ad.0 for <73978@debbugs.gnu.org>; Wed, 25 Dec 2024 00:34:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735115602; x=1735720402; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Cj26pAWz3cIliED8adZZmBE6qoclNArO8Yh8sYli7uo=; b=MIEu4unAHef/lfvMsmffoCuOfvhMJBNJMFsV/tLENAqOv7XGupGBBmKhUj+h76w9e0 RwXDVgDHpTHIrv3ynlv5enJeeXkuH9vxSO2XhqcpbtzRVBIw5Pyqo1cvvc74kJ1hdzx9 lqvbr50fBfbng7oKZIZVEFbf9OsCjDadULBZGyd8vd1nAAwv9GOJvyagYbz0sHoBEOpZ EYI2ObU5tk/soQBYgb4kFp5SOXB7SkutchurhLKA/668GNaM3zrckSWaKAN8lYiK3reK 3y0zcs4ukb8/wJlrVZbMRqhEwLSK2jRC0RuE2tS9+vBnPN0v4EMWJr6aBNPtg81FPUQX PHJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735115602; x=1735720402; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Cj26pAWz3cIliED8adZZmBE6qoclNArO8Yh8sYli7uo=; b=njNvH7P5J4GbfrAInozaFrfDa3XGu/3lKGYTiyITX1xPuIEPfSFZpLz6ax4jffleRm VBpeFVQMxVhXQbJVUaWczSlFvumL4dIk1r58ZgvgUX5ON6VGMh1PaCh5srpy7fUkFUWM bSaFUCH7pogOpkhMM3GI0cJuiTTqeKDwSSkVXSZInl6dzXW/6zc74ppXO8viXqhzaXLb FODcIPC5o5tjC5Br/T9IugWLmprbJwa9JosMSz0z+xqrJ2F24x9BeSg+2JhR60aiJROo P45ISHNPpKpsemEsQfZpCvOVp35FzXS0wj4T14EYrcVw4XT0fUwqDq5taKAqe2rfrVek Z/oA== X-Forwarded-Encrypted: i=1; AJvYcCVNarmtOlEqrq8jQ1CapBfzlcpEPIBpQf840R9ktyXgchuKpaG+zL9Wl4FEPXUzFXzr3VEdnw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yx54+MHBRuIiBCesNNWeavSwPADLbgSYB/BPNhFfWgPsaQ1gW2F LCRrUUVKfvpH1NSI/ACHigWig+yiCiXO/KTmlYhHkKGjIetXppxY X-Gm-Gg: ASbGncvmDxYUR9tytkdNBBG3k+35wQ+gQ8zknAOZFIONlJ7tq3GOX07thK5WY0Bz2j/ jVqZytKLP6gXYfhfvpN1z/TxN+EKgIXnGL6e76Zf2enxK3cAkg+VfhVswta/0BTg2p/VRgjJcXo L+bKZ9emrI9j2Ms21QK3O1WNFg+XXA1qYiwQewcP3c7J3YNQMhn4/alQabDsUja9Fg9H/YhyKF/ W7e1aD4FQXkxjEK4ryGWZVRlCT2jY68mwPHD40lLBO0L0rGX2s6+rHlZKZ8xTgIFj15re+nLbp5 u18= X-Google-Smtp-Source: AGHT+IEXCPCfGC5ifJPgdllnG00DJekwIv42wpBC+1efv9GHhTRci+f/47jDwacH0NtFUQVcQGZUAA== X-Received: by 2002:a17:902:ce86:b0:216:2f7f:ff69 with SMTP id d9443c01a7336-219e6e894c8mr219471765ad.5.1735115601807; Wed, 25 Dec 2024 00:33:21 -0800 (PST) Received: from smtpclient.apple ([2601:646:8f81:6120:e179:285e:283:33ae]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dca02a97sm100538345ad.275.2024.12.25.00.33.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Dec 2024 00:33:21 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode From: Yuan Fu In-Reply-To: <87msgk43cv.fsf@mail.linkov.net> Date: Wed, 25 Dec 2024 00:33:10 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> <87ed1xkn7h.fsf@mail.linkov.net> <5626DFE7-CA89-4A39-A896-99D8814FD6CD@gmail.com> <87msgk43cv.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73978 Cc: Dmitry Gutov , Theodor Thornhill , 73978@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: -1.0 (-) > On Dec 24, 2024, at 11:40=E2=80=AFPM, Juri Linkov = wrote: >=20 >>> ReactDOM.render( >>>
>>>

Hello, Welcome to React and TypeScript

>>>
, >>> document.getElementById("root") >>> ); >>>=20 >>> 1. move point to the beginning of

>>> 2. type C-M-b >>> 3. point incorrectly moves to inside
>>>=20 >>> However, this the above patch, point doesn't move >>> that is correct. >>>=20 >>> Another test case: >>>=20 >>> 1. move point to the beginning of the word "Welcome" >>> 2. type C-M-b >>> 3. point incorrectly moves to the letter "e" instead of correct "H" >>>=20 >>> 4. type C-M-f a few times until the end of text >>> 5. point stops at the letter "t" instead of moving after the last = letter >>>=20 >>> All these cases work correctly with the patch above. >>=20 >> I understand the problem you want to solve, but the patch above will >> bring back the bug I was trying to fix in the first place. >=20 > The patch just demonstrated one of possible ways to solve the problem. >=20 >> And I still don=E2=80=99t understand the intention of your patch. = Maybe >> I missed something. Am I correct that you want to apply string = syntax >> on the tags, eg,
, ,
? >=20 > I don't need to apply string syntax on the tags. I just found > that currently C-M-f navigation was broken. Maybe there are > other ways to fix it? Then let=E2=80=99s look for other ways to solve the problem you = demonstrated. Dmitry, would there be any negative effects if we apply = the whitespace syntax on all the text (rather than string syntax)? Ah, I = guess skip-syntax wouldn=E2=80=99t work right. Is there another way to = tell syntax-ppss to skip a chunk of text when scanning? Yuan= From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 00:37:31 2024 Received: (at 73978) by debbugs.gnu.org; 26 Dec 2024 05:37:31 +0000 Received: from localhost ([127.0.0.1]:39780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQgYt-0000ew-4G for submit@debbugs.gnu.org; Thu, 26 Dec 2024 00:37:31 -0500 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]:37867) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQgYq-0000eg-8Q for 73978@debbugs.gnu.org; Thu, 26 Dec 2024 00:37:29 -0500 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id F0950114013D; Thu, 26 Dec 2024 00:37:21 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Thu, 26 Dec 2024 00:37:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1735191441; x=1735277841; bh=jvQ0eWg8//LGIpdgCOjwYTbKDqLNeYggi9Tqs6V/M3s=; b= KMPImLrEucyZuy3I7F7TuthZqW55fqfTExqOp+dy5tFZ2w7M5Xy0T1+NEb1Y1PTS 59qNeqbbNEIiDyDxB8qu9ZbvkvUpA93GIOTjI51WR2vYV/i4QpVpOzw6fPFe+UTY 4aIzMepaLZ6GfWZa19qwBEuB9TPQ/GkoRllPS+r57DAv4uDGToQZqhu2Jp2O9FGS 3kL/LIRFRWwfgsjOEUnKPIggRLRrd0euMDiVHZULFLsIt7JQ8iTOgGn7RsatDjkA 3cGPC8DL5Ygywf82IGn/+BnxEghrMUXE4p9h+iwShaHISVNi33uKapKCmAbLi/JZ UpLjkNDYseH4ixLHpRAZZA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735191441; x= 1735277841; bh=jvQ0eWg8//LGIpdgCOjwYTbKDqLNeYggi9Tqs6V/M3s=; b=B WXGu4dKY8aX3NdQLm1PSUqI3hMK86jetNam8BiZcI+o1tpHnxv3/W9gBo8baWaLD xZZLLBOX6Lr0+lewY2CH0mFd6fMvjBWECrv83dc65XF1YnjaKlt6WhdRdo8KDJb7 k4NSJlSy3KfEn+tknNghcuVFfmGTFNHpHhPJN0jj/BdDFQ9IuT9ZZ4PvzsVP65q9 jAq2YCAJn7uXMufVaQ9gJv+0oj0dYG0Pum9LuBglwjGWUcIEBIbEcSK2Fw1gxfQK Txo7zmLocUa8JICcb2kA3S9ArY7gxduY0CgT20OLF6kZZak8Jth5vtZyHLy5lyq1 tWwD4twqzxZKgw1hRshcw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddujedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeetveeg tedthefhudekteehffeukeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegtrghsohhurhhisehgmhgrih hlrdgtohhmpdhrtghpthhtohepjhhurhhisehlihhnkhhovhdrnhgvthdprhgtphhtthho pehthhgvohesthhhohhrnhhhihhllhdrnhhopdhrtghpthhtohepjeefleejkeesuggvsg gsuhhgshdrghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Dec 2024 00:37:19 -0500 (EST) Message-ID: <28f6a7a3-8b09-41f9-8908-10a82be17aaa@gutov.dev> Date: Thu, 26 Dec 2024 07:37:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode To: Yuan Fu , Juri Linkov References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> <87ed1xkn7h.fsf@mail.linkov.net> <5626DFE7-CA89-4A39-A896-99D8814FD6CD@gmail.com> <87msgk43cv.fsf@mail.linkov.net> Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73978 Cc: Theodor Thornhill , 73978@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: -1.0 (-) On 25/12/2024 10:33, Yuan Fu wrote: >> The patch just demonstrated one of possible ways to solve the problem. >> >>> And I still don’t understand the intention of your patch. Maybe >>> I missed something. Am I correct that you want to apply string syntax >>> on the tags, eg,
, ,
? >> I don't need to apply string syntax on the tags. I just found >> that currently C-M-f navigation was broken. Maybe there are >> other ways to fix it? > Then let’s look for other ways to solve the problem you demonstrated. Dmitry, would there be any negative effects if we apply the whitespace syntax on all the text (rather than string syntax)? Ah, I guess skip-syntax wouldn’t work right. Is there another way to tell syntax-ppss to skip a chunk of text when scanning? Maybe not. But I guess tsx-ts--syntax-propertize-captures could only apply syntax to specific characters inside the text - it would search for parens, brackets, (something else?), and put the "punctuation" syntax on them - that should play nicer with sexp/word/symbol navigation. A bit more code, but OTOH we would drop the (eq ne (1+ ns)) distinction. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 04 14:58:17 2025 Received: (at 73978) by debbugs.gnu.org; 4 Jan 2025 19:58:17 +0000 Received: from localhost ([127.0.0.1]:57503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUAHp-0001qn-BA for submit@debbugs.gnu.org; Sat, 04 Jan 2025 14:58:17 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:54591) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUAHn-0001qe-A0 for 73978@debbugs.gnu.org; Sat, 04 Jan 2025 14:58:16 -0500 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-21670dce0a7so114179685ad.1 for <73978@debbugs.gnu.org>; Sat, 04 Jan 2025 11:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736020694; x=1736625494; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yZx95pVZqLzS69Jf0YJrx9s8ZMv8AYbuOMp3aTZ20nE=; b=lA14y411fhxeIo6G/l+YhVY0YzkKwG0plWGS7n3Uoy67FAmnQhCo/9FYa8FSMreAFH MMQt6Y9FiiDHDLKZ4PbwiKWbXb3VQOuGwBcQrrQXSQivbS7xugsb+ysxQtVYQdMV1ySd ABsH28F2NCDf6GffeZnoe97LEdO2nbwS8AXykwYqMsWaaPBjMP6I1Y7RfalUIKdn21qF 4P3MkXZPdae15AGmJAAwesU1Ey/ON2lmBH7hRg5N5QVvh10WVPXNRfW7nz9i3SUd7m3z HLgwfJRvsG58bCD1fG0W94yDaYcQMxT86OuynZHF3GnoHGHZcTphHqzWQF/2cmDA6BRn 2CCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736020694; x=1736625494; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yZx95pVZqLzS69Jf0YJrx9s8ZMv8AYbuOMp3aTZ20nE=; b=wsaO8ULbEcTbufJ+9f1FQCJAAxsabwTe0AFZt4VKpXnYgtc8PxRSXBvdcMZh2UwJnI FjBxrJgOxgomOnmF9+2Osu6uR7sKmU7/f4u4sSvVR9/8haGjS4OKB4odHbp+2U2MW5Pc Rela6+HuqapeMvvckL8sFe6vW9RQa7gWR0ZR4PJJZGF2hYZdyKqmP8SZqJWePV8+3SnM byHZ2ajv46SxTjZi5qngJOODPSLI4TttQXLAl8+9yvtnX7K6WnldqDj34xdx+s8WFntY w6rGCcYQZ6cvuB0kJ3kMUlD2D4DLF4dtuDh/f1yg/pUPf6vw1K06hvtYEbL5fKYN4ei/ uxag== X-Forwarded-Encrypted: i=1; AJvYcCVut9EynlXAN6SuJiR/6LkD7MjE1NiHrg3dJK0nfjViyhN2yNdeNh7T4cnF7NNCKxOtbCQasg==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yyfib3GwwTVb1F7Kv0n/a2kJOxLztthBDS5qOTC/k0Y+rB0b39f PnZ6mCe4ckPaCIosK8XGT8PYh3rlnGQP1G1CvEU4WMQ47/3oQsy9 X-Gm-Gg: ASbGncuPb3U4Ng3SPYzLB+9GJeB3sxkML8025n/Ixr7NHjpytUs/bmeAMjBWNywWC50 r8XYNFFXddBSRv4AoBqoubz9YxNIr/ihp6wFt9ndTj4LFP4eQYYz6axHNNY/mF4O6+Ik2JS1rdL PWi/sDhy7vmTIcwQJ597IvqA4bvYu6tSE0giM1CgxVVn1H+RUlTvbG3pWDMRAMtQD2q+M+3IW1N puZQPi9ZOAqUz6mG0nTjx1Pn+nIJ0syCPUBdR8Fr5GhAMP7E2HOQmXj6cCjHNBj/SMcOGSYzIwr TQmI X-Google-Smtp-Source: AGHT+IEDKdIdeHXvYsJmA+RMPQ389/5yD36fq8bUnUp+nE4wHj4SB23DExUnHzkdaWkfD5Y1SMvcwg== X-Received: by 2002:a05:6a20:8427:b0:1e0:ca95:3cb2 with SMTP id adf61e73a8af0-1e5e0458eb9mr94009569637.8.1736020694098; Sat, 04 Jan 2025 11:58:14 -0800 (PST) Received: from smtpclient.apple ([2601:646:8f81:6120:85eb:71bd:58ac:56a8]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-842abd593bcsm26150860a12.16.2025.01.04.11.58.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Jan 2025 11:58:13 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode From: Yuan Fu In-Reply-To: <28f6a7a3-8b09-41f9-8908-10a82be17aaa@gutov.dev> Date: Sat, 4 Jan 2025 11:58:02 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <077C5CF3-F487-4A88-9CC9-E7B329CB7C5B@gmail.com> References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> <87ed1xkn7h.fsf@mail.linkov.net> <5626DFE7-CA89-4A39-A896-99D8814FD6CD@gmail.com> <87msgk43cv.fsf@mail.linkov.net> <28f6a7a3-8b09-41f9-8908-10a82be17aaa@gutov.dev> To: Dmitry Gutov X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 73978 Cc: Theodor Thornhill , 73978@debbugs.gnu.org, Juri Linkov 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: -0.3 (/) > On Dec 25, 2024, at 9:37=E2=80=AFPM, Dmitry Gutov = wrote: >=20 > On 25/12/2024 10:33, Yuan Fu wrote: >>> The patch just demonstrated one of possible ways to solve the = problem. >>>=20 >>>> And I still don=E2=80=99t understand the intention of your patch. = Maybe >>>> I missed something. Am I correct that you want to apply string = syntax >>>> on the tags, eg,
, ,
? >>> I don't need to apply string syntax on the tags. I just found >>> that currently C-M-f navigation was broken. Maybe there are >>> other ways to fix it? >> Then let=E2=80=99s look for other ways to solve the problem you = demonstrated. Dmitry, would there be any negative effects if we apply = the whitespace syntax on all the text (rather than string syntax)? Ah, I = guess skip-syntax wouldn=E2=80=99t work right. Is there another way to = tell syntax-ppss to skip a chunk of text when scanning? >=20 > Maybe not. >=20 > But I guess tsx-ts--syntax-propertize-captures could only apply syntax = to specific characters inside the text - it would search for parens, = brackets, (something else?), and put the "punctuation" syntax on them - = that should play nicer with sexp/word/symbol navigation. >=20 > A bit more code, but OTOH we would drop the (eq ne (1+ ns)) = distinction. That=E2=80=99s a good idea! I implemented this. Now forward-sexp should = work as normal. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 05 03:09:41 2025 Received: (at 73978) by debbugs.gnu.org; 5 Jan 2025 08:09:41 +0000 Received: from localhost ([127.0.0.1]:59684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tULhc-00037c-RK for submit@debbugs.gnu.org; Sun, 05 Jan 2025 03:09:41 -0500 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]:57255) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tULha-00037M-Tg for 73978@debbugs.gnu.org; Sun, 05 Jan 2025 03:09:39 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 41580C0003; Sun, 5 Jan 2025 08:09:29 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode In-Reply-To: <077C5CF3-F487-4A88-9CC9-E7B329CB7C5B@gmail.com> (Yuan Fu's message of "Sat, 4 Jan 2025 11:58:02 -0800") Organization: LINKOV.NET References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> <87ed1xkn7h.fsf@mail.linkov.net> <5626DFE7-CA89-4A39-A896-99D8814FD6CD@gmail.com> <87msgk43cv.fsf@mail.linkov.net> <28f6a7a3-8b09-41f9-8908-10a82be17aaa@gutov.dev> <077C5CF3-F487-4A88-9CC9-E7B329CB7C5B@gmail.com> Date: Sun, 05 Jan 2025 09:57:59 +0200 Message-ID: <874j2dy97k.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73978 Cc: Dmitry Gutov , Theodor Thornhill , 73978@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: -1.7 (-) >> But I guess tsx-ts--syntax-propertize-captures could only apply syntax to >> specific characters inside the text - it would search for parens, >> brackets, (something else?), and put the "punctuation" syntax on them - >> that should play nicer with sexp/word/symbol navigation. >> >> A bit more code, but OTOH we would drop the (eq ne (1+ ns)) distinction. > > That’s a good idea! I implemented this. Now forward-sexp should work as normal. Thanks, this is better. Now forward-sexp correctly moves to the end of the string. However, it still moves inside the tag, e.g. with point in ReactDOM.render(

Hello, Welcome to React and TypeScript-!-

, document.getElementById("root") ); C-M-f moves point to ReactDOM.render(

Hello, Welcome to React and TypeScript

, document.getElementById("root") ); But maybe this is a different problem. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 05 03:42:22 2025 Received: (at 73978) by debbugs.gnu.org; 5 Jan 2025 08:42:22 +0000 Received: from localhost ([127.0.0.1]:59786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUMDG-0004pV-0m for submit@debbugs.gnu.org; Sun, 05 Jan 2025 03:42:22 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:47627) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUMDC-0004pA-On for 73978@debbugs.gnu.org; Sun, 05 Jan 2025 03:42:20 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 7D7B91BF203; Sun, 5 Jan 2025 08:42:09 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode In-Reply-To: <874j2dy97k.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 05 Jan 2025 09:57:59 +0200") Organization: LINKOV.NET References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> <87ed1xkn7h.fsf@mail.linkov.net> <5626DFE7-CA89-4A39-A896-99D8814FD6CD@gmail.com> <87msgk43cv.fsf@mail.linkov.net> <28f6a7a3-8b09-41f9-8908-10a82be17aaa@gutov.dev> <077C5CF3-F487-4A88-9CC9-E7B329CB7C5B@gmail.com> <874j2dy97k.fsf@mail.linkov.net> Date: Sun, 05 Jan 2025 10:21:25 +0200 Message-ID: <87sepxwt3e.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73978 Cc: Dmitry Gutov , Theodor Thornhill , 73978@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: -1.7 (-) > ReactDOM.render( >
>

Hello, Welcome to React and TypeScript-!-

>
, > document.getElementById("root") > ); > > C-M-f moves point to > > ReactDOM.render( >
>

Hello, Welcome to React and TypeScript >

, > document.getElementById("root") > ); > > But maybe this is a different problem. This can be fixed by the following patch that copied the syntax of < and > from sgml-make-syntax-table: diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 09f29a4ac65..21672d2d9c1 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -692,7 +694,11 @@ tsx-ts--syntax-propertize-captures ne t) (put-text-property (match-beginning 0) (match-end 0) - 'syntax-table (string-to-syntax "."))))))))) + 'syntax-table (string-to-syntax + (cond + ((equal (match-string 0) "<") "(<") + ((equal (match-string 0) ">") "(>") + (t "."))))))))))) (if (treesit-ready-p 'tsx) (add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode))) From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 05 06:55:25 2025 Received: (at 73978-done) by debbugs.gnu.org; 5 Jan 2025 11:55:25 +0000 Received: from localhost ([127.0.0.1]:60222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUPE4-0006Sv-WD for submit@debbugs.gnu.org; Sun, 05 Jan 2025 06:55:25 -0500 Received: from mx.kolabnow.com ([212.103.80.154]:38940) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUPE0-0006OL-LO for 73978-done@debbugs.gnu.org; Sun, 05 Jan 2025 06:55:24 -0500 Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 20222209201D; Sun, 5 Jan 2025 12:55:14 +0100 (CET) Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:references:in-reply-to:subject:subject :from:from:received:received:received; s=dkim20240523; t= 1736078113; x=1737892514; bh=yNetwsueY9lazq4UbupFzPPeMv95LB81ko0 OjkVQWF4=; b=V2x50+ox4Y3U5YY1yXoW2uB5wf7ZLkqothhnSwFFcV+ZGGGsPfF 08PtwQRgbe5k3/ez/VdEn0sCYf4Ni8NrP6iew54SA161Jl4oXZs+Y7k+yx2HtReI I8vWYU0KEzMj5iq7EVg+MWFdDt9tvQKOoQS160/I944JVXrONjqlZzI+3I19KL0/ U93bmCRJ/i3XgQiRfl6tuobwGQ7sLURQ1quSlFqjN0hCsdgZEPujNwbpYbe1B3k2 Eu3lh+yNg/URNqXeYgsFK07kecS7R9sVUK8bB6qeDTRu0VFfnOpUDl81Ty5KNw0A DRtVsUIcOq1NWR/V6dqI1WfFR/roqkaU9wQ== X-Virus-Scanned: amavis at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-10 required=5 tests=[ALL_TRUSTED=-1] autolearn=ham autolearn_force=no Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id bpwtrzflX1Nk; Sun, 5 Jan 2025 12:55:13 +0100 (CET) Received: from int-mx009.mykolab.com (unknown [10.9.13.9]) by mx.kolabnow.com (Postfix) with ESMTPS id 182CC2092013; Sun, 5 Jan 2025 12:55:12 +0100 (CET) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx009.mykolab.com (Postfix) with ESMTPS id C7C752125AB9; Sun, 5 Jan 2025 12:55:12 +0100 (CET) From: Theodor Thornhill To: Yuan Fu , Dmitry Gutov Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode In-Reply-To: References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> <86bjy6m9is.fsf@gnu.org> <86serhjco6.fsf@gnu.org> <3d0c4cf6-1bc7-440e-8354-961ba5736e0d@gutov.dev> <56560205-B14A-4EA8-8818-90E27770A6C6@gmail.com> <763A8C73-8B15-43CC-98E2-5190C7941262@gmail.com> <120cbe49-c34f-4f56-a8fa-80fd2a2480c6@gutov.dev> <8178b607-8146-4798-8db8-2e08710b8cd5@gutov.dev> Date: Sun, 05 Jan 2025 12:55:11 +0100 Message-ID: <877c79v5k0.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 73978-done Cc: Eli Zaretskii , 73978-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: -0.3 (/) Yuan Fu writes: >> On Dec 12, 2024, at 9:19=E2=80=AFAM, Dmitry Gutov wro= te: >>=20 >> On 12/12/2024 06:56, Yuan Fu wrote: >>> How hard is it to add a new syntax for this case? Or is there some way = to work around this? We can=E2=80=99t just not apply the string syntax, bec= ause if the =E2=80=9Ca=E2=80=9D is a parenthesis, etc, it would mess up the= parenthesis balancing after it. >>=20 >> Probably not very hard, but that seems like it'd affect the total set of= syntax classes - which means adding it to the manual, etc. >>=20 >>> Maybe just give it a whitespace syntax? >>=20 >> Right, in such cases I applied the "whitespace" or "punctuation" syntax = to the whole character span, like in https://github.com/dgutov/mmm-mode/blo= b/master/mmm-erb.el#L97 > > Thanks. I went with the whitespace trick and pushed my patch to master. > > Yuan FWIW, I believe this is a regression caused by later versions of the treesit grammar. What is talked about here was explicitly a goal for me to handle at least better than what it appears it has been for some time. IIRC they changed what nodes were applied as the jsx nodes quite dramatically some time ago. I'm not surprised there are issues after that, as most wasn't backward compatible Theo From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 05 09:13:57 2025 Received: (at submit) by debbugs.gnu.org; 5 Jan 2025 14:13:57 +0000 Received: from localhost ([127.0.0.1]:60437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tURO9-0005Lp-H7 for submit@debbugs.gnu.org; Sun, 05 Jan 2025 09:13:57 -0500 Received: from lists.gnu.org ([2001:470:142::17]:35610) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tURO8-0005LM-5d for submit@debbugs.gnu.org; Sun, 05 Jan 2025 09:13:56 -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 1tURO1-0002Lc-TV for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 09:13:49 -0500 Received: from dancol.org ([2600:3c01:e000:3d8::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tURNz-0000rY-Di; Sun, 05 Jan 2025 09:13:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: References:In-Reply-To:Subject:CC:To:From:Date:Sender:Reply-To: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=AQYd9LYH/dCShcAk/IRcVjnfA1H6dfKgdaRfu3I8m5U=; b=YRf91xlZrhQKkLKm9hm33R092d JWVA1Bi/UJyrYSaEfv3ezDPw0ej2ieQZ3K3/kXIbLjqnzcvFPrziw0vMo6vFRqiXc+nTGiHbM8FyH gx+AK39FqSYOuBw6P7OcV9x/7fFMEitT1cQ9IZEE09UGKGeVEQobf+GXZrnTsE2w0C3KugSOzkx82 /KsbF+K/PXTlkL3Rk/hbLqUW+OYMD/CSXzvrm7ppynH5rG94Pn+bdONInB+wODKT2E9EwfN2FXeo4 kE0fKm8mtN7QgRoM0d9v5r+gMHaN2TJQnI6F6Shah0eaK6N1jeRWdOGfloCN0CNWdBLzC9Jc2nf0o S0OFJzpg==; Received: from 2603-9001-4203-1ab2-755d-99b8-dc0b-6bff.inf6.spectrum.com ([2603:9001:4203:1ab2:755d:99b8:dc0b:6bff]:43442 helo=[IPv6:::1]) by dancol.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tURNv-0003qy-2t; Sun, 05 Jan 2025 09:13:44 -0500 Date: Sun, 05 Jan 2025 09:13:41 -0500 From: Daniel Colascione To: Theodor Thornhill , "Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors" , Yuan Fu , Dmitry Gutov Subject: =?US-ASCII?Q?Re=3A_bug=2373978=3A_31=2E0=2E50=3B_Text_syntax_ap?= =?US-ASCII?Q?plied_on_too_many_things_in_tsx-ts-mode?= User-Agent: K-9 Mail for Android In-Reply-To: <877c79v5k0.fsf@thornhill.no> References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <8634k0ojpp.fsf@gnu.org> <1B168B41-6D66-422B-BA5E-17ABE5548353@gmail.com> <86bjy6m9is.fsf@gnu.org> <86serhjco6.fsf@gnu.org> <3d0c4cf6-1bc7-440e-8354-961ba5736e0d@gutov.dev> <56560205-B14A-4EA8-8818-90E27770A6C6@gmail.com> <763A8C73-8B15-43CC-98E2-5190C7941262@gmail.com> <120cbe49-c34f-4f56-a8fa-80fd2a2480c6@gutov.dev> <8178b607-8146-4798-8db8-2e08710b8cd5@gutov.dev> <877c79v5k0.fsf@thornhill.no> Message-ID: <1CFB05F0-CF5E-4E3A-BFE4-96CD00198974@dancol.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2600:3c01:e000:3d8::1; envelope-from=dancol@dancol.org; helo=dancol.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: On January 5, 2025 6:55:11 AM EST, "Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote: >Yuan Fu writes: > >>> On [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.1 URIBL_SBL_A Contains URL's A record listed in the Spamhaus SBL blocklist [URIs: gutov.dev] 0.6 URIBL_SBL Contains an URL's NS IP listed in the Spamhaus SBL blocklist [URIs: gutov.dev] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=dancol%40dancol.org; ip=2001%3A470%3A142%3A%3A17; r=debbugs.gnu.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] X-Debbugs-Envelope-To: submit Cc: Eli Zaretskii , 73978-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: 0.7 (/) On January 5, 2025 6:55:11 AM EST, "Theodor Thornhill via Bug reports for = GNU Emacs, the Swiss army knife of text editors" = wrote: >Yuan Fu writes: > >>> On Dec 12, 2024, at 9:19=E2=80=AFAM, Dmitry Gutov = wrote: >>>=20 >>> On 12/12/2024 06:56, Yuan Fu wrote: >>>> How hard is it to add a new syntax for this case? Or is there some wa= y to work around this? We can=E2=80=99t just not apply the string syntax, b= ecause if the =E2=80=9Ca=E2=80=9D is a parenthesis, etc, it would mess up t= he parenthesis balancing after it=2E >>>=20 >>> Probably not very hard, but that seems like it'd affect the total set = of syntax classes - which means adding it to the manual, etc=2E >>>=20 >>>> Maybe just give it a whitespace syntax? >>>=20 >>> Right, in such cases I applied the "whitespace" or "punctuation" synta= x to the whole character span, like in https://github=2Ecom/dgutov/mmm-mode= /blob/master/mmm-erb=2Eel#L97 >> >> Thanks=2E I went with the whitespace trick and pushed my patch to maste= r=2E >> >> Yuan > >FWIW, I believe this is a regression caused by later versions of the >treesit grammar=2E What is talked about here was explicitly a goal for me >to handle at least better than what it appears it has been for some >time=2E IIRC they changed what nodes were applied as the jsx nodes quite >dramatically some time ago=2E I'm not surprised there are issues after >that, as most wasn't backward compatible Hrm=2E From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 10 02:57:27 2025 Received: (at 73978) by debbugs.gnu.org; 10 Jan 2025 07:57:27 +0000 Received: from localhost ([127.0.0.1]:56291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tW9tX-0002px-7v for submit@debbugs.gnu.org; Fri, 10 Jan 2025 02:57:27 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]:56881) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tW9tV-0002pj-Lj for 73978@debbugs.gnu.org; Fri, 10 Jan 2025 02:57:26 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id C55D8E0005; Fri, 10 Jan 2025 07:57:15 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode In-Reply-To: <87sepxwt3e.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 05 Jan 2025 10:21:25 +0200") Organization: LINKOV.NET References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> <87ed1xkn7h.fsf@mail.linkov.net> <5626DFE7-CA89-4A39-A896-99D8814FD6CD@gmail.com> <87msgk43cv.fsf@mail.linkov.net> <28f6a7a3-8b09-41f9-8908-10a82be17aaa@gutov.dev> <077C5CF3-F487-4A88-9CC9-E7B329CB7C5B@gmail.com> <874j2dy97k.fsf@mail.linkov.net> <87sepxwt3e.fsf@mail.linkov.net> Date: Fri, 10 Jan 2025 09:56:16 +0200 Message-ID: <878qrjm7a7.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73978 Cc: Dmitry Gutov , Theodor Thornhill , 73978@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: -1.7 (-) >> ReactDOM.render( >>
>>

Hello, Welcome to React and TypeScript-!-

>>
, >> document.getElementById("root") >> ); >> >> C-M-f moves point to >> >> ReactDOM.render( >>
>>

Hello, Welcome to React and TypeScript >>

, >> document.getElementById("root") >> ); >> >> But maybe this is a different problem. > > This can be fixed by the following patch that copied the syntax of < and > > from sgml-make-syntax-table: I pushed this as well. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 11 12:41:22 2025 Received: (at 73978) by debbugs.gnu.org; 11 Jan 2025 17:41:22 +0000 Received: from localhost ([127.0.0.1]:44705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tWfU9-0001yu-RN for submit@debbugs.gnu.org; Sat, 11 Jan 2025 12:41:22 -0500 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:43273) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tWfU7-0001yN-2T for 73978@debbugs.gnu.org; Sat, 11 Jan 2025 12:41:19 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id A7351240005; Sat, 11 Jan 2025 17:41:09 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode In-Reply-To: <87sepxwt3e.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 05 Jan 2025 10:21:25 +0200") Organization: LINKOV.NET References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> <87ed1xkn7h.fsf@mail.linkov.net> <5626DFE7-CA89-4A39-A896-99D8814FD6CD@gmail.com> <87msgk43cv.fsf@mail.linkov.net> <28f6a7a3-8b09-41f9-8908-10a82be17aaa@gutov.dev> <077C5CF3-F487-4A88-9CC9-E7B329CB7C5B@gmail.com> <874j2dy97k.fsf@mail.linkov.net> <87sepxwt3e.fsf@mail.linkov.net> Date: Sat, 11 Jan 2025 19:40:12 +0200 Message-ID: <87r059p7ur.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73978 Cc: Dmitry Gutov , Theodor Thornhill , 73978@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: -1.7 (-) > This can be fixed by the following patch that copied the syntax of < and > > from sgml-make-syntax-table: > > @@ -692,7 +694,11 @@ tsx-ts--syntax-propertize-captures > (put-text-property > (match-beginning 0) (match-end 0) > - 'syntax-table (string-to-syntax "."))))))))) > + 'syntax-table (string-to-syntax > + (cond > + ((equal (match-string 0) "<") "(<") > + ((equal (match-string 0) ">") "(>") > + (t "."))))))))))) I missed the need to apply this < and > syntax on jsx elements, so also pushed this patch. Hope this is correct. diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 3c1b27696bc..937146ddf23 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -660,7 +660,9 @@ tsx-ts--s-p-query (when (treesit-available-p) (treesit-query-compile 'tsx '(((regex pattern: (regex_pattern) @regexp)) - ((jsx_text) @jsx))))) + ((jsx_text) @jsx) + ((jsx_opening_element) @jsx) + ((jsx_closing_element) @jsx))))) From unknown Sun Jun 22 11:38:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 09 Feb 2025 12:24:14 +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