From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60972: 30.0.50; [PATCH]: Add html-ts-mode Date: Sat, 21 Jan 2023 20:08:55 +0100 Message-ID: <87tu0j7liw.fsf@thornhill.no> References: <87edrpklv3.fsf@thornhill.no> <86o7qrg36l.fsf@mail.linkov.net> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9446"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60972@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 21 20:33:34 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pJJcL-0002GD-K3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Jan 2023 20:33:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJJEh-0002QI-32; Sat, 21 Jan 2023 14:09:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJJEc-0002Q8-VG for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2023 14:09:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJJEc-00057T-Lb for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2023 14:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJJEc-0003mV-7A for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2023 14:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Jan 2023 19:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60972 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60972-submit@debbugs.gnu.org id=B60972.167432814114532 (code B ref 60972); Sat, 21 Jan 2023 19:09:02 +0000 Original-Received: (at 60972) by debbugs.gnu.org; 21 Jan 2023 19:09:01 +0000 Original-Received: from localhost ([127.0.0.1]:49790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJJEb-0003mG-Ec for submit@debbugs.gnu.org; Sat, 21 Jan 2023 14:09:01 -0500 Original-Received: from out0.migadu.com ([94.23.1.103]:10374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJJEZ-0003m4-5O for 60972@debbugs.gnu.org; Sat, 21 Jan 2023 14:09:00 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1674328137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fHKCS/hECBbjLA2f6epB0o9oz/fE4ultv1gib60hEVI=; b=ALCsun6tcp2CU4rr/4tVu/TPNEwnsAJCeCQ7Vd8Nzn4MY1N3OuJh7WIk819Wxu3A1K2hEo zGoC1vDD8+9UKTIXeK81otGlJg3gns4yWw/3OEhn2ZYM2LjCQCnaxuc+XqFAeC0IpY39ey Xzzu22mGRRqsJ0w/XZECQwlgWiKb2Ocifz+3+yWwKY+Tox461L3C1V0P0p9HI4T62YJrav rJSmusFyWMmPRVQ44plPzObJmd2b9uK2cjzCAPc2t/p94XHbYstNDBc1E0TYRffvAnrYfx DsEAd1ju/uqnYJ2NLGjcMlJnppofQ5qsu4bQJRxcF8hfo9sEkFICkUJUUojkEw== In-Reply-To: <86o7qrg36l.fsf@mail.linkov.net> X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253880 Archived-At: --=-=-= Content-Type: text/plain Juri Linkov writes: >> Attached is a ts-mode for HTML support. > > Thanks. Could you please clarify the difference between > forward-sentence and forward-sexp in html-ts-mode. > I expected that one of them is moving over the HTML tags > and another over HTML elements. Is this more like you were thinking? Theo --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Use-element-as-a-sentence-in-html-ts-mode.patch >From a79b4f280c22e937a24f077f0aa7f5ea18a92a0c Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Sat, 21 Jan 2023 20:05:52 +0100 Subject: [PATCH] Use element as a sentence in html-ts-mode * lisp/textmodes/html-ts-mode.el (html-ts-mode): Tweak the regexp. --- lisp/textmodes/html-ts-mode.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lisp/textmodes/html-ts-mode.el b/lisp/textmodes/html-ts-mode.el index 7e4360747a..a2d85bff7d 100644 --- a/lisp/textmodes/html-ts-mode.el +++ b/lisp/textmodes/html-ts-mode.el @@ -106,10 +106,7 @@ html-ts-mode (setq-local treesit-defun-name-function #'html-ts-mode--defun-name) - (setq-local treesit-sentence-type-regexp - (regexp-opt '("start_tag" - "self_closing_tag" - "end_tag"))) + (setq-local treesit-sentence-type-regexp "element") (setq-local treesit-sexp-type-regexp (regexp-opt '("tag" -- 2.34.1 --=-=-=--