From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Troy Brown Newsgroups: gmane.emacs.bugs Subject: bug#64329: 29.0.92; treesit/fill-paragraph syntax highlighting problem Date: Wed, 28 Jun 2023 12:46:04 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34331"; mail-complaints-to="usenet@ciao.gmane.io" To: 64329@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 28 18:47:17 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 1qEYK4-0008oG-EZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Jun 2023 18:47:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEYJr-0008D9-QE; Wed, 28 Jun 2023 12:47:03 -0400 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 1qEYJq-0008Cf-EY for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 12:47:02 -0400 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 1qEYJq-0006IY-5V for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 12:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qEYJp-0006np-RD for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 12:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Troy Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Jun 2023 16:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64329 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.168797078626100 (code B ref -1); Wed, 28 Jun 2023 16:47:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jun 2023 16:46:26 +0000 Original-Received: from localhost ([127.0.0.1]:51521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEYJF-0006mt-79 for submit@debbugs.gnu.org; Wed, 28 Jun 2023 12:46:26 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEYJA-0006mi-Cy for submit@debbugs.gnu.org; Wed, 28 Jun 2023 12:46:24 -0400 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 1qEYJA-0007wx-6P for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 12:46:20 -0400 Original-Received: from mail-lf1-f46.google.com ([209.85.167.46]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEYJ8-000628-CL for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 12:46:19 -0400 Original-Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-4fb8574a3a1so3457774e87.1 for ; Wed, 28 Jun 2023 09:46:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687970776; x=1690562776; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=NEC1NcKmJ//v629v4OB3PteJRrCqi2sTpVeLZerkWNQ=; b=Ejw899Ia4lN0VpMqd8Io0/qkgkOjVo/QUQflTvJUjaGNXDaOJDvbNwZOze8mN2Nx9G 1kas1ZPBRA+MdcNqAZoHMRTnS62w4Ms3lBAOV8bv206s+2JbTbnjVMh4ME2oPBDoBaQ7 ES8s4iJPLQvhEQncngdJ5uvBRGNA4uxm+Pf6R9Xh9l9ipvNoYNAl/9b/3EHUWbbyFnvj wmewkKM2RY7DhVdlHvCFvD+8jmktrC/Va9W+xWtNNtBLTZGu5XH3hW7F/kD3D1IBeDE9 PnelNERMB+tlZj9qfRwKyKsNd9i/rsDyLtzAlqfCJdrUA6YqljyNBbHTdt1aTLuKZYDJ teIw== X-Gm-Message-State: AC+VfDzILzZezYxh7jKUsG6UoWijIqxY039CmXdxTOQw9PU/LdDt9e9b 4jjM/ag5YzgkBBG35wfRJ6YRkDTMjbbJk2z6yb4= X-Google-Smtp-Source: ACHHUZ6ks4fhYPU59pQi6WeH7/tE1oSSPQpebv0RxrnUYnQpwaZhDhrbkzcACIRWCtLLRjegQJtHpg== X-Received: by 2002:a05:6512:ea7:b0:4f6:1433:fca0 with SMTP id bi39-20020a0565120ea700b004f61433fca0mr22954064lfb.0.1687970776024; Wed, 28 Jun 2023 09:46:16 -0700 (PDT) Original-Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id z14-20020a19f70e000000b004fa35167729sm1855324lfe.159.2023.06.28.09.46.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Jun 2023 09:46:15 -0700 (PDT) Original-Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-4fb8ede27eeso1867870e87.0 for ; Wed, 28 Jun 2023 09:46:15 -0700 (PDT) X-Received: by 2002:a05:6512:3985:b0:4fb:96ff:35d7 with SMTP id j5-20020a056512398500b004fb96ff35d7mr783531lfu.22.1687970775478; Wed, 28 Jun 2023 09:46:15 -0700 (PDT) X-Gmail-Original-Message-ID: Received-SPF: pass client-ip=209.85.167.46; envelope-from=troy.s.brown@gmail.com; helo=mail-lf1-f46.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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:264228 Archived-At: I've noticed this problem on multiple tree-sitter major modes including c-ts-mode, c++-ts-mode, java-ts-mode, bash-ts-mode. I haven't tried others, but I suspect those might also suffer from this problem. The issue occurs when attempting to fill the paragraph of a comment block. The following comment block can be used as an example to reproduce the problem and happens with "emacs -Q" (assuming corresponding tree-sitter libraries are available). --8<---------------cut here---------------start------------->8--- // The quick brown fox jumps over the // lazy dog. // The quick brown fox jumps over the lazy dog. --8<---------------cut here---------------end--------------->8--- Switch to one of the tree-sitter modes (e.g., M-x java-ts-mode). Move point to the first line of the comment block above and then execute the fill-paragraph command (i.e., M-q). The text which is wrapped onto the first line of the comment block will be highlighted incorrectly. The results appear as if the comment delimiter was removed, fontification occurred, then the text was moved to the first line of the comment block and never refontified with the comment face.