GNU bug report logs - #73900
30.0.91; auto-fill adds extra space in js-ts-mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Michael Kleehammer <michael@HIDDEN>; dated Sun, 20 Oct 2024 03:48:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 73900 <at> debbugs.gnu.org:


Received: (at 73900) by debbugs.gnu.org; 31 Oct 2024 05:39:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 31 01:39:20 2024
Received: from localhost ([127.0.0.1]:39950 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t6Ntv-0001ex-NI
	for submit <at> debbugs.gnu.org; Thu, 31 Oct 2024 01:39:20 -0400
Received: from mail-oi1-f181.google.com ([209.85.167.181]:55772)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1t6Ntt-0001en-R3
 for 73900 <at> debbugs.gnu.org; Thu, 31 Oct 2024 01:39:18 -0400
Received: by mail-oi1-f181.google.com with SMTP id
 5614622812f47-3e5f968230bso266310b6e.3
 for <73900 <at> debbugs.gnu.org>; Wed, 30 Oct 2024 22:39:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1730353092; x=1730957892; 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=yRJhFUdz2y08PsOUjy08dC3Mx/rFQ/H27PSzbj+toGU=;
 b=BQlrlNTz05+qWrvR7m08on5sptL2u8YxOHDD0cIgzpq1LsCS47pSjiL1aAfZvXrLxO
 9fGktrNcVLn+UgfF1IjneQ28cn7wLtGJQZ73i9HHdV7IOiuqCkHQKMykP18tjhvvNsVy
 7OzzLx/mWWJqic2o+1AWbsUsHM0u/3MgUNQaMQ7O7vyGVrALRPeJEizX4wHj2QdNX3s2
 BuH190Fnlu5DFTkzOfOCeMKEPKuDBQ+7UEpf+D0y4wYHMlI7UcUuYWJOJsRAJRzOyzGd
 rQ87fh6aGkxNt6Eg8d+fvw9+MeacHq6F0xIQfybsfMjoWxHndPN+QFfO2hZXoixIfFLo
 N08g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1730353092; x=1730957892;
 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=yRJhFUdz2y08PsOUjy08dC3Mx/rFQ/H27PSzbj+toGU=;
 b=SuQ1ceUw42YonH2weakOFcsUJrvwFmyxFR8XNrLDKiOS5qNf0QWE1YDboVft6hLQFw
 xKFuLBrpcCWOgKBOSput83aJXZnDPQk/fEYuqhD9p69A4JbIcAU9h9vNmX9Ccl08s+lW
 rHcfu1b2FWjV/TOX0lq1zbvq6dZzzueThtS6tZqe7VI3/94NlT1J0qAnhPPpm8FrPAZc
 eUJb2Ttqp8XeEqSYFa/fcQwQKOYPtPN7mtg/ZSkuMYEqVcZ373hTVjO155M2YQBy+pSO
 KvIOAFR64fCIOFhw8CbQcpyodyvEaiDmeL90piWSoPYTX8U88Sg2M6M6UDMkhMAVVnHk
 XbXw==
X-Forwarded-Encrypted: i=1;
 AJvYcCW2tb0Dzp/rFKOQFL8zlTIiJH8wnsnUdSgOZr6wCwVMmW/w5uvfybxoGhMhWbfiJJ5kvBR+jg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzkmL3jf0615Drtu7dwXB5yHnaiPkeSRsB8toGaeeV28UhFZfLy
 tmdBRU0tuIcGuaVWV0smcGlJ+zkfoY4vZd9aOgnKvjQRkYydEqx1
X-Google-Smtp-Source: AGHT+IHnmOixG4Uzbm9TERnvb8U7+sK+nXVfCfS8+k4AYlAADvY2VNfn9GkoTnDO/HowYPkRSCPP5Q==
X-Received: by 2002:a05:6808:38c5:b0:3e3:ae35:f418 with SMTP id
 5614622812f47-3e6384d7441mr19477723b6e.47.1730353092064; 
 Wed, 30 Oct 2024 22:38:12 -0700 (PDT)
Received: from smtpclient.apple ([2601:646:8f81:6120:e48b:e566:9832:af15])
 by smtp.gmail.com with ESMTPSA id
 41be03b00d2f7-7ee45a0ec8bsm457160a12.79.2024.10.30.22.38.11
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 30 Oct 2024 22:38:11 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\))
Subject: Re: bug#73900: 30.0.91; auto-fill adds extra space in js-ts-mode
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <8634kf6q3e.fsf@HIDDEN>
Date: Wed, 30 Oct 2024 22:38:00 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <DFE75D9E-3499-48B6-A5B4-180745E4BC76@HIDDEN>
References: <87ttd7o2q8.fsf@HIDDEN> <867c9tak7q.fsf@HIDDEN>
 <eb499338-b47e-4626-94cc-d38acafefee5@HIDDEN>
 <5F76FC01-BE2F-47CC-BA7A-4F77A2F4E41A@HIDDEN> <8634kf6q3e.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3776.700.51)
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 73900
Cc: Dmitry Gutov <dmitry@HIDDEN>,
 Michael Kleehammer <michael@HIDDEN>, 73900 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)



> On Oct 29, 2024, at 5:39=E2=80=AFAM, Eli Zaretskii <eliz@HIDDEN> =
wrote:
>=20
>> From: Yuan Fu <casouri@HIDDEN>
>> Date: Tue, 29 Oct 2024 00:33:05 -0700
>> Cc: Eli Zaretskii <eliz@HIDDEN>,
>> Michael Kleehammer <michael@HIDDEN>,
>> 73900 <at> debbugs.gnu.org
>>=20
>>=20
>>=20
>>> On Oct 27, 2024, at 8:10=E2=80=AFPM, Dmitry Gutov <dmitry@HIDDEN> =
wrote:
>>>=20
>>> On 27/10/2024 12:55, Eli Zaretskii wrote:
>>>>> From: Michael Kleehammer<michael@HIDDEN>
>>>>> Date: Sat, 19 Oct 2024 22:46:55 -0500
>>>>>=20
>>>>> In Emacs 30, js-ts-mode auto-fill chooses an incorrect prefix when
>>>>> wrapping comments.
>>>>>=20
>>>>> 1) emacs -Q
>>>>>=20
>>>>> 2) In the scratch buffer:
>>>>>   a) M-x js-ts-mode
>>>>>   b) M-x auto-fill-mode
>>>>>   c) M-x erase-buffer
>>>>>   3) Paste in a long JS comment:
>>>>>=20
>>>>>   // This buffer is for text that is not saved, and for Lisp =
evaluation.  To create a file, visit it
>>>>>=20
>>>>> 4) At end of line, press <Space>.
>>>>>=20
>>>>> The text wraps like so:
>>>>>=20
>>>>>   // This buffer is for text that is not saved, and for Lisp =
evaluation.
>>>>>   //   To create a file, visit it
>>>>>=20
>>>>> In previous versions, it would wrap like so:
>>>>>=20
>>>>>   // This buffer is for text that is not saved, and for Lisp =
evaluation.
>>>>>   // To create a file, visit it
>>>> Adding people who know about js-ts-mode, in the hope they will have
>>>> comments or suggestions.
>>>=20
>>> I suppose the answer is somewhere around the fact that we have both =
normal-auto-fill-function and fill-paragraph-function, and that =
js-ts-mode (through c-ts-common-comment-setup) only configures the =
latter, while js-mode (in js--mode-setup) has settings for both.
>>>=20
>>> Not sure why the default do-auto-fill doesn't skip over the space, =
though.
>>=20
>> Ok, so the actually difference is in comment-line-break-function, =
which auto-fill-mode uses to insert line break. In js-mode, it=E2=80=99s =
set to c-indent-new-comment-line, which deletes the whitespace; in =
tree-sitter mode, it=E2=80=99s c-ts-common-comment-indent-new-line, =
which doesn=E2=80=99t. I fixed c-ts-common-comment-indent-new-line to do =
the same thing as c-indent-new-comment-line.
>>=20
>> However, I did the foolish thing of pushing to master. Should I =
cherry pick the commit into emacs-30?
>=20
> Yes, please.  Just first fix the problem I reported a few minutes ago.
>=20
>> Would that create any merge conflict down the line?
>=20
> No.

Ok, thanks. I fixed that problem and pushed both to emacs-30.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73900; Package emacs. Full text available.

Message received at 73900 <at> debbugs.gnu.org:


Received: (at 73900) by debbugs.gnu.org; 29 Oct 2024 12:39:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 29 08:39:32 2024
Received: from localhost ([127.0.0.1]:56322 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t5lVT-00034V-M1
	for submit <at> debbugs.gnu.org; Tue, 29 Oct 2024 08:39:32 -0400
Received: from eggs.gnu.org ([209.51.188.92]:59744)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1t5lVP-00034M-SQ
 for 73900 <at> debbugs.gnu.org; Tue, 29 Oct 2024 08:39:30 -0400
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 <eliz@HIDDEN>)
 id 1t5lVJ-0001nc-3m; Tue, 29 Oct 2024 08:39:21 -0400
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=I7ULCp5jbsBLj9wk+DLl6ZvZyHsk+b+nwqNPppTSq9k=; b=hNWSkiTLTBg0On7XRBnQ
 yg1qDvkS/evTTgIZ797AqglzaTpXzmhfqkRY2r3Y1X7ovqwHtHOXGMJE1eq0eLW9n+c6M5iMDxbWQ
 yp3QE9Wbe3Ca4e+IjeHohLODqKRFmE46axWa4J32ohlisLtH2wwIZSlKvTAl5bDA8bMOtyCyIs0Tr
 c65bd63Y8aMfB4Kb/vtryirjnaRdT8sk2qcVM/Pu5QX44bdn/AXFJmSc2LP3FKG0KliO+3Lvj5jhm
 7lgG9tHmgXCwtgebaGAUXptwt6nBHxaFNznbTAkkOBYZGyqOOggcm4kNO/tFCMM7lUc3/9OO8hqcJ
 hYXL3Q2Mc9RJ+Q==;
Date: Tue, 29 Oct 2024 14:39:01 +0200
Message-Id: <8634kf6q3e.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <5F76FC01-BE2F-47CC-BA7A-4F77A2F4E41A@HIDDEN> (message from
 Yuan Fu on Tue, 29 Oct 2024 00:33:05 -0700)
Subject: Re: bug#73900: 30.0.91; auto-fill adds extra space in js-ts-mode
References: <87ttd7o2q8.fsf@HIDDEN> <867c9tak7q.fsf@HIDDEN>
 <eb499338-b47e-4626-94cc-d38acafefee5@HIDDEN>
 <5F76FC01-BE2F-47CC-BA7A-4F77A2F4E41A@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 73900
Cc: dmitry@HIDDEN, michael@HIDDEN, 73900 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

> From: Yuan Fu <casouri@HIDDEN>
> Date: Tue, 29 Oct 2024 00:33:05 -0700
> Cc: Eli Zaretskii <eliz@HIDDEN>,
>  Michael Kleehammer <michael@HIDDEN>,
>  73900 <at> debbugs.gnu.org
> 
> 
> 
> > On Oct 27, 2024, at 8:10 PM, Dmitry Gutov <dmitry@HIDDEN> wrote:
> > 
> > On 27/10/2024 12:55, Eli Zaretskii wrote:
> >>> From: Michael Kleehammer<michael@HIDDEN>
> >>> Date: Sat, 19 Oct 2024 22:46:55 -0500
> >>> 
> >>> In Emacs 30, js-ts-mode auto-fill chooses an incorrect prefix when
> >>> wrapping comments.
> >>> 
> >>> 1) emacs -Q
> >>> 
> >>> 2) In the scratch buffer:
> >>>    a) M-x js-ts-mode
> >>>    b) M-x auto-fill-mode
> >>>    c) M-x erase-buffer
> >>>    3) Paste in a long JS comment:
> >>> 
> >>>    // This buffer is for text that is not saved, and for Lisp evaluation.  To create a file, visit it
> >>> 
> >>> 4) At end of line, press <Space>.
> >>> 
> >>> The text wraps like so:
> >>> 
> >>>    // This buffer is for text that is not saved, and for Lisp evaluation.
> >>>    //   To create a file, visit it
> >>> 
> >>> In previous versions, it would wrap like so:
> >>> 
> >>>    // This buffer is for text that is not saved, and for Lisp evaluation.
> >>>    // To create a file, visit it
> >> Adding people who know about js-ts-mode, in the hope they will have
> >> comments or suggestions.
> > 
> > I suppose the answer is somewhere around the fact that we have both normal-auto-fill-function and fill-paragraph-function, and that js-ts-mode (through c-ts-common-comment-setup) only configures the latter, while js-mode (in js--mode-setup) has settings for both.
> > 
> > Not sure why the default do-auto-fill doesn't skip over the space, though.
> 
> Ok, so the actually difference is in comment-line-break-function, which auto-fill-mode uses to insert line break. In js-mode, it’s set to c-indent-new-comment-line, which deletes the whitespace; in tree-sitter mode, it’s c-ts-common-comment-indent-new-line, which doesn’t. I fixed c-ts-common-comment-indent-new-line to do the same thing as c-indent-new-comment-line.
> 
> However, I did the foolish thing of pushing to master. Should I cherry pick the commit into emacs-30?

Yes, please.  Just first fix the problem I reported a few minutes ago.

> Would that create any merge conflict down the line?

No.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73900; Package emacs. Full text available.

Message received at 73900 <at> debbugs.gnu.org:


Received: (at 73900) by debbugs.gnu.org; 29 Oct 2024 07:34:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 29 03:34:26 2024
Received: from localhost ([127.0.0.1]:55800 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t5gkD-0008R3-Ov
	for submit <at> debbugs.gnu.org; Tue, 29 Oct 2024 03:34:26 -0400
Received: from mail-pg1-f178.google.com ([209.85.215.178]:42299)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1t5gkB-0008Qn-Jg
 for 73900 <at> debbugs.gnu.org; Tue, 29 Oct 2024 03:34:24 -0400
Received: by mail-pg1-f178.google.com with SMTP id
 41be03b00d2f7-7e6d04f74faso3428206a12.1
 for <73900 <at> debbugs.gnu.org>; Tue, 29 Oct 2024 00:34:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1730187197; x=1730791997; 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=X5I7cRLyZ9TkXws3slhjsMxV84+tzweK/MBxAbh2YgE=;
 b=PpbIuulawCrkdcXBTu+HBIW1Uv6J23qbqukDATGAWYH0krXE6cYsaiDD9vU0n16TJH
 4lIVrNU+YvpuRSyjU+FUM3deF6Ii3L6no50QVnCmonfosfwj4OVF49xiarIuvxby1Oeu
 rOwmhT+yEhu8Wjw9KuL/QYf7gSwtIrFNQosxWiOMcH7aR2nvfgr4spKumyi88bQGrmmk
 Z54MHepXsM39VnJbX9ipLcqLlMgLfADx9O5aWHRIzhrCQWYmJJ4QS3KOwiyxl+xAD4+3
 GbILf+jtTDnIoLkZKuJEk+bVjAK/OrKUz4YO8fw7q9iAiI4l4IY5JK82jV1lES/SDM4L
 bfZA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1730187197; x=1730791997;
 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=X5I7cRLyZ9TkXws3slhjsMxV84+tzweK/MBxAbh2YgE=;
 b=WA6cOn7ozAbuA5aEydUKOG3PtVrxUUkpMLt+9vhy37MTcXlATl3ovMxHhTvtPoKs8E
 iZy5lL6l7/yrMz860sIxrUkmoEK4MhAeSvey5e4SKnQAQA6cLRWwgS/pTcIBTAW+XkRP
 21029yWbx9tZmEormJQtSdX6eTEK/c93rO857AYsrDvdsrRPeVeNeeJCiOBpoM9S8qz8
 5mt6p1tCP2OJp4b+GOOkAopk9TVXwka2Jy7oOu08gvqRPDx9a5nrIa0RJK+MKyhgbt8Q
 pjul9olfN2TYng6K2umj46Bq+vZ6RawFOfbqbFaHjojQWUqIfyugXaXO51Mh2G8e+g0s
 WE5Q==
X-Forwarded-Encrypted: i=1;
 AJvYcCWDkTyFANQg1Jy3DZoZ4xhcocfnL3XHbYCj2AIVaKHm21iXcslDcCvwZYaHwD2zBJuTLJ1T1g==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzsgZwyiL2uWliYmZT1iaOSdnE3pC5qYwMyWpPfjD/23eFKFdhC
 nbwy+w9FZQRNwGy98Dft6hCgazL3lP5P5vj4CaaR5K9Alj/zQmTQ
X-Google-Smtp-Source: AGHT+IGuwH/LMlYpjJReZMhU+tjJYlx6iqBlMpxiostWyd0M2e0oyyPEKWYg+ZJUbe4OIO7P6zaMnA==
X-Received: by 2002:a05:6a20:d522:b0:1d9:dc8:b80d with SMTP id
 adf61e73a8af0-1d9e1f78382mr1794931637.20.1730187197486; 
 Tue, 29 Oct 2024 00:33:17 -0700 (PDT)
Received: from smtpclient.apple ([2601:646:8f81:6120:38ab:4a6:e63:29b])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-7205793175bsm6975917b3a.48.2024.10.29.00.33.16
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 29 Oct 2024 00:33:16 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\))
Subject: Re: bug#73900: 30.0.91; auto-fill adds extra space in js-ts-mode
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <eb499338-b47e-4626-94cc-d38acafefee5@HIDDEN>
Date: Tue, 29 Oct 2024 00:33:05 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <5F76FC01-BE2F-47CC-BA7A-4F77A2F4E41A@HIDDEN>
References: <87ttd7o2q8.fsf@HIDDEN> <867c9tak7q.fsf@HIDDEN>
 <eb499338-b47e-4626-94cc-d38acafefee5@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
X-Mailer: Apple Mail (2.3776.700.51)
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 73900
Cc: Eli Zaretskii <eliz@HIDDEN>, Michael Kleehammer <michael@HIDDEN>,
 73900 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)



> On Oct 27, 2024, at 8:10=E2=80=AFPM, Dmitry Gutov <dmitry@HIDDEN> =
wrote:
>=20
> On 27/10/2024 12:55, Eli Zaretskii wrote:
>>> From: Michael Kleehammer<michael@HIDDEN>
>>> Date: Sat, 19 Oct 2024 22:46:55 -0500
>>>=20
>>> In Emacs 30, js-ts-mode auto-fill chooses an incorrect prefix when
>>> wrapping comments.
>>>=20
>>> 1) emacs -Q
>>>=20
>>> 2) In the scratch buffer:
>>>    a) M-x js-ts-mode
>>>    b) M-x auto-fill-mode
>>>    c) M-x erase-buffer
>>>    3) Paste in a long JS comment:
>>>=20
>>>    // This buffer is for text that is not saved, and for Lisp =
evaluation.  To create a file, visit it
>>>=20
>>> 4) At end of line, press <Space>.
>>>=20
>>> The text wraps like so:
>>>=20
>>>    // This buffer is for text that is not saved, and for Lisp =
evaluation.
>>>    //   To create a file, visit it
>>>=20
>>> In previous versions, it would wrap like so:
>>>=20
>>>    // This buffer is for text that is not saved, and for Lisp =
evaluation.
>>>    // To create a file, visit it
>> Adding people who know about js-ts-mode, in the hope they will have
>> comments or suggestions.
>=20
> I suppose the answer is somewhere around the fact that we have both =
normal-auto-fill-function and fill-paragraph-function, and that =
js-ts-mode (through c-ts-common-comment-setup) only configures the =
latter, while js-mode (in js--mode-setup) has settings for both.
>=20
> Not sure why the default do-auto-fill doesn't skip over the space, =
though.

Ok, so the actually difference is in comment-line-break-function, which =
auto-fill-mode uses to insert line break. In js-mode, it=E2=80=99s set =
to c-indent-new-comment-line, which deletes the whitespace; in =
tree-sitter mode, it=E2=80=99s c-ts-common-comment-indent-new-line, =
which doesn=E2=80=99t. I fixed c-ts-common-comment-indent-new-line to do =
the same thing as c-indent-new-comment-line.

However, I did the foolish thing of pushing to master. Should I cherry =
pick the commit into emacs-30? Would that create any merge conflict down =
the line?

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73900; Package emacs. Full text available.

Message received at 73900 <at> debbugs.gnu.org:


Received: (at 73900) by debbugs.gnu.org; 28 Oct 2024 03:11:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 23:11:23 2024
Received: from localhost ([127.0.0.1]:49491 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t5GA7-0000Hj-0z
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2024 23:11:23 -0400
Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]:51671)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1t5GA5-0000HT-DN
 for 73900 <at> debbugs.gnu.org; Sun, 27 Oct 2024 23:11:21 -0400
Received: from phl-compute-02.internal (phl-compute-02.phl.internal
 [10.202.2.42])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 2BFFF1140112;
 Sun, 27 Oct 2024 23:10:40 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-02.internal (MEProxy); Sun, 27 Oct 2024 23:10:40 -0400
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=fm1; t=1730085040;
 x=1730171440; bh=SR17Mrt1fQFSlvomZ04jDF+RPkR7c/ObDAqKBjeWL8w=; b=
 CXgmpCPex2N8+RuKCRksN8j/XK0jrvPapscD5Vr9FbSvImCzl78e4+CO4Qqsfdcl
 QkWyZ1tvsAe5PZJbRDQ8DZmnZudFctknhafd4s3F7TKek3iBtk4g4jXTr3f8gOkM
 zTK/cBYeYf9CEx4ET/HuIgx0W3u2gCSE9yVxpRJoVNwY6LPaVFSIuLKNwYHQGanC
 E0uXAQy90nc0lhBtwf0Lgw7Vck8KtOVuwxz3k14vI+TGCVNFY5mVmFOaikTLn/Ij
 KLRZJNkSYdNfwNku3RRjz0k0Yaqg4fkQWnsNdG9MZse8Zljc9/T6GJQ7RdvMH9FC
 19AT9M2m5wQGiu7WAY8UZw==
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-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1730085040; x=
 1730171440; bh=SR17Mrt1fQFSlvomZ04jDF+RPkR7c/ObDAqKBjeWL8w=; b=X
 GQJg3XMuPaRGezse9O0UTM0EFyYMNDZ9EBhRVEfC3ExR97MP/vWIwtdAO5kjT9gk
 OlXMPCIdOvo1IoVj/Fs3by+PGGLM8bU2wyjaVRQlxlbFAy3mtoLrWpBl5uK96ktG
 1R9OH6QqSY5JB2pS/Bz3Qd4L8Ud32yLC+mTbPMoPDPy+kV4MRCO9cUoS5I+a3NDf
 DHfosg030i5duD0KvJ+aYWawiF0hwiC+WRtOtYQTAyFFEYwYQmdRR0iVXZCOYsPp
 jNWn/4rAuI4jgOo8YFXOj4MaaYx/UcgD2hZvLIdq3u8sTIVIQVkrb1u9yI8Ez0I6
 nXF4zLnn3Xt5alqr74sPQ==
X-ME-Sender: <xms:rwAfZwQewKdEFVGZL_MR8m578mjbPEEFPAQLff6n9wAtx_Qld4sWSA>
 <xme:rwAfZ9x7anPRC8Bxks33GwUg0VCZxPJQwJyY7Zpi9Eb6eoceIjSkwsdelLTyw2Wt6
 93wEbcvEk2U4D_fAlA>
X-ME-Received: <xmr:rwAfZ928zr1EwuArmBIWGYxncpA3DCGuJuGFBL7cKTNs_VKwo_dfuO2VZZb2aiKq8UAy>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdejjedgheeiucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej
 necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
 gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef
 tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho
 peegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrgh
 dprhgtphhtthhopehmihgthhgrvghlsehklhgvvghhrghmmhgvrhdrtghomhdprhgtphht
 thhopegtrghsohhurhhisehgmhgrihhlrdgtohhmpdhrtghpthhtohepjeefledttdesug
 gvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:rwAfZ0BkVJVOkOe2k9pWBjJrOmdmawKu_QgI97ZMKo1PueZA3cnXAA>
 <xmx:rwAfZ5jzQ47F_Ycj5bKpEJ8TBTe8rH0rLpHMNob-Lvuqsdu8Kq2n6w>
 <xmx:rwAfZwrkz4DilvL6sRkCGYnsq4DitUx9JZUiKN5lHiV7o2BpCSpYFA>
 <xmx:rwAfZ8ilOvf6MQS-Ap-QRy-8s-W4GkCbvA5SjhckPqxwpfyf4BIuhA>
 <xmx:sAAfZ5clYM7FUUMYqQWGwdaqwEmRDkvfQTS30xnblfQXTXl4UVwht6Hc>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 27 Oct 2024 23:10:38 -0400 (EDT)
Message-ID: <eb499338-b47e-4626-94cc-d38acafefee5@HIDDEN>
Date: Mon, 28 Oct 2024 05:10:35 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#73900: 30.0.91; auto-fill adds extra space in js-ts-mode
To: Eli Zaretskii <eliz@HIDDEN>, Michael Kleehammer
 <michael@HIDDEN>, Yuan Fu <casouri@HIDDEN>
References: <87ttd7o2q8.fsf@HIDDEN> <867c9tak7q.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <867c9tak7q.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73900
Cc: 73900 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 27/10/2024 12:55, Eli Zaretskii wrote:
>> From: Michael Kleehammer<michael@HIDDEN>
>> Date: Sat, 19 Oct 2024 22:46:55 -0500
>>
>> In Emacs 30, js-ts-mode auto-fill chooses an incorrect prefix when
>> wrapping comments.
>>
>> 1) emacs -Q
>>
>> 2) In the scratch buffer:
>>     a) M-x js-ts-mode
>>     b) M-x auto-fill-mode
>>     c) M-x erase-buffer
>>     
>> 3) Paste in a long JS comment:
>>
>>     // This buffer is for text that is not saved, and for Lisp evaluation.  To create a file, visit it
>>
>> 4) At end of line, press <Space>.
>>
>> The text wraps like so:
>>
>>     // This buffer is for text that is not saved, and for Lisp evaluation.
>>     //   To create a file, visit it
>>
>> In previous versions, it would wrap like so:
>>
>>     // This buffer is for text that is not saved, and for Lisp evaluation.
>>     // To create a file, visit it
> Adding people who know about js-ts-mode, in the hope they will have
> comments or suggestions.

I suppose the answer is somewhere around the fact that we have both 
normal-auto-fill-function and fill-paragraph-function, and that 
js-ts-mode (through c-ts-common-comment-setup) only configures the 
latter, while js-mode (in js--mode-setup) has settings for both.

Not sure why the default do-auto-fill doesn't skip over the space, though.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73900; Package emacs. Full text available.

Message received at 73900 <at> debbugs.gnu.org:


Received: (at 73900) by debbugs.gnu.org; 27 Oct 2024 23:54:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 19:54:15 2024
Received: from localhost ([127.0.0.1]:47790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t5D5J-00074I-Nq
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2024 19:54:14 -0400
Received: from mail-pg1-f180.google.com ([209.85.215.180]:58707)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1t5D5H-00073i-Cx
 for 73900 <at> debbugs.gnu.org; Sun, 27 Oct 2024 19:54:12 -0400
Received: by mail-pg1-f180.google.com with SMTP id
 41be03b00d2f7-7eab7622b61so2579631a12.1
 for <73900 <at> debbugs.gnu.org>; Sun, 27 Oct 2024 16:53:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1730073155; x=1730677955; 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=/DW4CHPoU/uYlsaDuyOT5dwE0vbj66u+vouwqRACVEY=;
 b=JpFlOkq1OO/fXqRqMOg+ftCkUsvlulDncTz6nwddtxU/nS7gxPcvj36axqEMz/2pqE
 c1/HlZkgJWXkg5dReKvcfLHL07oWzx6DHBQjG6s6C34+RcT1Hy/jmbkmC4kzXxP0w97f
 dGwU8H27Psc0Z/9YvvdMArzC4GdC8t274moDmO57GJYGlkQujzzBfuD+oLuh2o3sGlfr
 rghkntGYSjxZdAJAvwLfiqIJ04ulseDYd3r04V3eGtUOgFqkwTtl5CyTTqOoahC5EAqU
 wPiDXf4J8c+TnovBpIvroSgBfigjYM6OA61hAnTa9CJ8NUIysZyr+Raa5G8XbkbZN1Fl
 qV1Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1730073155; x=1730677955;
 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=/DW4CHPoU/uYlsaDuyOT5dwE0vbj66u+vouwqRACVEY=;
 b=wmZtehW2bPQdMSjRusBiykro3c/sQwTyjCoiETRownoV0lWUwrVy4uBTXPdQg7zhXB
 K1RTjfbaKLnO6fTeom8MIQbbM8GWbO8E1RqgByFtbMxdHdjwg8E8G/sS4smll8/xaYFU
 7v6AEpRjFpYC7GPg6bDecvx/vt0vbThfDR9Yi2/nzW34YZ/QNaHyFCp2FgII6ptcUmz/
 /DLKB5YMYF1M+SSYo43t02I10xkHaJPpOfT6mAeQJDuNLO1NzQOzm9xiyCGcOWc0CuS/
 uFp93CWxQaMK8xcI/iYoznM/k0I+A9xElHTXz+5ENSNOubXO08A6+6LXjy8JSzdOmREA
 y/4A==
X-Forwarded-Encrypted: i=1;
 AJvYcCUGjPWG0SUhodmXBkqu7n1uh+CbRGD5kCVEY9uCrT2Bp0AMqzYNcsqVNxMF/G4dH2W6p5w67Q==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwxRdXFl/aeiX0b7ykMNVvQU6IPXUU7AAjioeae0S3z+H2ntIGq
 ou5g5bXBEp5opKYxiBBiZvGubrJHO+j6R23o/xbe2EV8gH4l3pIP
X-Google-Smtp-Source: AGHT+IFgOC3mVkMBj5sWygI3+ek3GKnOrMrLtZhszUcbnFB05zNyBRtHytuyFW6oILfxmjNHXirK/Q==
X-Received: by 2002:a05:6a20:e198:b0:1d6:5f3d:4ab7 with SMTP id
 adf61e73a8af0-1d9a8402da9mr9557452637.22.1730073154754; 
 Sun, 27 Oct 2024 16:52:34 -0700 (PDT)
Received: from smtpclient.apple ([2601:646:8f81:6120:b5ef:89e:c4fd:dc7a])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-7205791d9a4sm4544734b3a.40.2024.10.27.16.52.33
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 27 Oct 2024 16:52:34 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\))
Subject: Re: bug#73900: 30.0.91; auto-fill adds extra space in js-ts-mode
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <867c9tak7q.fsf@HIDDEN>
Date: Sun, 27 Oct 2024 16:52:22 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <8076B4B0-2B9C-4E51-AA93-25C703CBF68F@HIDDEN>
References: <87ttd7o2q8.fsf@HIDDEN> <867c9tak7q.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3776.700.51)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73900
Cc: Dmitry Gutov <dmitry@HIDDEN>,
 Michael Kleehammer <michael@HIDDEN>, 73900 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Oct 27, 2024, at 3:55=E2=80=AFAM, Eli Zaretskii <eliz@HIDDEN> =
wrote:
>=20
>> From: Michael Kleehammer <michael@HIDDEN>
>> Date: Sat, 19 Oct 2024 22:46:55 -0500
>>=20
>> In Emacs 30, js-ts-mode auto-fill chooses an incorrect prefix when
>> wrapping comments.
>>=20
>> 1) emacs -Q=20
>>=20
>> 2) In the scratch buffer:
>>   a) M-x js-ts-mode
>>   b) M-x auto-fill-mode
>>   c) M-x erase-buffer
>>=20
>> 3) Paste in a long JS comment:
>>=20
>>   // This buffer is for text that is not saved, and for Lisp =
evaluation.  To create a file, visit it
>>=20
>> 4) At end of line, press <Space>.
>>=20
>> The text wraps like so:
>>=20
>>   // This buffer is for text that is not saved, and for Lisp =
evaluation.
>>   //   To create a file, visit it=20
>>=20
>> In previous versions, it would wrap like so:
>>=20
>>   // This buffer is for text that is not saved, and for Lisp =
evaluation.
>>   // To create a file, visit it=20
>=20
> Adding people who know about js-ts-mode, in the hope they will have
> comments or suggestions.

Thanks Eli, I=E2=80=99ll look into it.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73900; Package emacs. Full text available.

Message received at 73900 <at> debbugs.gnu.org:


Received: (at 73900) by debbugs.gnu.org; 27 Oct 2024 10:56:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 06:56:23 2024
Received: from localhost ([127.0.0.1]:44031 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t50wZ-0007bw-FS
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2024 06:56:23 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35900)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1t50wX-0007bf-Kq
 for 73900 <at> debbugs.gnu.org; Sun, 27 Oct 2024 06:56:22 -0400
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 <eliz@HIDDEN>)
 id 1t50vt-0007gL-FZ; Sun, 27 Oct 2024 06:55:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=zLuWXlIfeze3+RTcZYUsx0sayv4fA2MAcyIPVcH1YSY=; b=HYju7eeJ1xZZ
 sfpd7to37dQFkiPQ8QZddbed7mjJRGLKKtA7G+JcNT/kkGtzHFOEFzJjxyMH4BHOPPUaxy5Q9D4vC
 Kdp69pPgMBN8f8alf2V0CyIPOr1Do6d2BmHeHY7SX5S9ujHQ/SaXAjLAdN6jjEuV6hMh7gW5yel1H
 Pt+GBTvMWPHz8gPBxpW+mmGjlfg9f1+c0i6iTVpLaMNDHsvXfbr+y8iMrpnFcnTVTR86twHxPAUBy
 J6oRto//aLoXaFU9g4a0bb5mXYX+Ma1e7ro+eWERIxU1TqgFz2Kzo3yPwsfTR6q7dWepix4ehGdth
 NLgEcnJpDlKSVmswfJPePQ==;
Date: Sun, 27 Oct 2024 12:55:37 +0200
Message-Id: <867c9tak7q.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Kleehammer <michael@HIDDEN>,
 Yuan Fu <casouri@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87ttd7o2q8.fsf@HIDDEN> (message from Michael Kleehammer
 on Sat, 19 Oct 2024 22:46:55 -0500)
Subject: Re: bug#73900: 30.0.91; auto-fill adds extra space in js-ts-mode
References: <87ttd7o2q8.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 73900
Cc: 73900 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Michael Kleehammer <michael@HIDDEN>
> Date: Sat, 19 Oct 2024 22:46:55 -0500
> 
> In Emacs 30, js-ts-mode auto-fill chooses an incorrect prefix when
> wrapping comments.
> 
> 1) emacs -Q 
> 
> 2) In the scratch buffer:
>    a) M-x js-ts-mode
>    b) M-x auto-fill-mode
>    c) M-x erase-buffer
>    
> 3) Paste in a long JS comment:
> 
>    // This buffer is for text that is not saved, and for Lisp evaluation.  To create a file, visit it
> 
> 4) At end of line, press <Space>.
> 
> The text wraps like so:
> 
>    // This buffer is for text that is not saved, and for Lisp evaluation.
>    //   To create a file, visit it 
> 
> In previous versions, it would wrap like so:
> 
>    // This buffer is for text that is not saved, and for Lisp evaluation.
>    // To create a file, visit it 

Adding people who know about js-ts-mode, in the hope they will have
comments or suggestions.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73900; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Oct 2024 03:47:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 19 23:47:41 2024
Received: from localhost ([127.0.0.1]:45334 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t2Muq-0005mp-Fc
	for submit <at> debbugs.gnu.org; Sat, 19 Oct 2024 23:47:40 -0400
Received: from lists.gnu.org ([209.51.188.17]:42098)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael@HIDDEN>) id 1t2Muj-0005mT-Bh
 for submit <at> debbugs.gnu.org; Sat, 19 Oct 2024 23:47:38 -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 <michael@HIDDEN>)
 id 1t2MuJ-0006Jr-Ki
 for bug-gnu-emacs@HIDDEN; Sat, 19 Oct 2024 23:47:07 -0400
Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <michael@HIDDEN>)
 id 1t2MuG-0008RL-OM
 for bug-gnu-emacs@HIDDEN; Sat, 19 Oct 2024 23:47:07 -0400
Received: by mail-qv1-xf34.google.com with SMTP id
 6a1803df08f44-6cbd12b38b4so23418866d6.2
 for <bug-gnu-emacs@HIDDEN>; Sat, 19 Oct 2024 20:47:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=kleehammer-com.20230601.gappssmtp.com; s=20230601; t=1729396023; x=1730000823;
 darn=gnu.org; 
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=q7gOvZ1fqScA1L65A94U9chTG9XAifKXEmQ7ZQqAa3w=;
 b=bRgtt6jgT3DNDN6QnKzN1PXqr8SOJEHOHxlV4UwiXgDYFByBk0kvIdH4S9qMiiUREO
 tuy4veHYq1pk7ukONaUGpOyIkIfYZAgPZYdMpHSL45ccBAruxiPcgix4PN587bLvivKw
 n7bLGsXi0PLqgGYLvvEv3f9ouZ70ylp67ALB2HRCe22NWS/bKj1r2KtYG2pwTi4M1Wlj
 Oc7S0Yhhc6Cw7PwWgywThodjgZey4HQXWtGq5Z84Zf+bzKNzVrC37YdR+92p9n60aNzI
 xw0vM7juY1xtizI3n1IqscMJUT8Ir9Nx7jxebhzXpBFFsGVnELTdVSkWA07wql40pQRa
 RTrw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1729396023; x=1730000823;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=q7gOvZ1fqScA1L65A94U9chTG9XAifKXEmQ7ZQqAa3w=;
 b=lwIQgYoFm4odcSBNu78Ntr3xTw4kjDxC+zGKlUN+3L3NTI0wRl/+oWEnqVnRvxqc49
 8fTkXnfiUAp4uM60izpfkFBypXlDNjefhTYtAgETZAJNv/fa1CDT6CCCPA3BXHrvslYX
 HNtbfkByhOuI/PAa5ojjAGp0ev+zHSsu5pqb1nsduccHe+ZUruUN18riD0s02yEh31PY
 4/KF4aw4P2j+E9f0mk9+dOnSg+jaobn+LIbxjrh+w1O79Pd0LDDpM2imUnR9T9Zpxeiz
 FeXXsSb805pR5w7ZLKySWNdUKZYSYGe0pXS0vGMe0NtuSIwKH2shYcf2gpGWNEkGN/q6
 Rzhw==
X-Gm-Message-State: AOJu0YwGX2tKz4d7gdlRXML0cH5JYRR3sK6z22EwFrzICG7hPcN8DnLy
 /ICpek5Es2VZmcReSxI8pKxJVOZGFj7/t53bmN9oeEc4i9JieZ7wQn2ZSOsYWywPzVf0VGcDUm0
 57qI=
X-Google-Smtp-Source: AGHT+IFWXY+EcPIazK4Eq5/JiYfb34ygrtdiX7uWp+tK0f953hZWnaauK8Ji2Da1yvkO2Vo+R2MExQ==
X-Received: by 2002:a05:6214:5545:b0:6cc:255:202f with SMTP id
 6a1803df08f44-6cde16397a0mr122104276d6.51.1729396022902; 
 Sat, 19 Oct 2024 20:47:02 -0700 (PDT)
Received: from localhost (syn-068-185-193-001.res.spectrum.com. [68.185.193.1])
 by smtp.gmail.com with ESMTPSA id
 6a1803df08f44-6ce009e3bfbsm3820536d6.111.2024.10.19.20.47.01
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 19 Oct 2024 20:47:01 -0700 (PDT)
From: Michael Kleehammer <michael@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.91; auto-fill adds extra space in js-ts-mode
X-Debbugs-Cc: 
Date: Sat, 19 Oct 2024 22:46:55 -0500
Message-ID: <87ttd7o2q8.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: none client-ip=2607:f8b0:4864:20::f34;
 envelope-from=michael@HIDDEN; helo=mail-qv1-xf34.google.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

In Emacs 30, js-ts-mode auto-fill chooses an incorrect prefix when
wrapping comments.

1) emacs -Q 

2) In the scratch buffer:
   a) M-x js-ts-mode
   b) M-x auto-fill-mode
   c) M-x erase-buffer
   
3) Paste in a long JS comment:

   // This buffer is for text that is not saved, and for Lisp evaluation.  To create a file, visit it

4) At end of line, press <Space>.

The text wraps like so:

   // This buffer is for text that is not saved, and for Lisp evaluation.
   //   To create a file, visit it 

In previous versions, it would wrap like so:

   // This buffer is for text that is not saved, and for Lisp evaluation.
   // To create a file, visit it 


Thanks,
Michael Kleehammer

In GNU Emacs 30.0.91 (build 3, x86_64-pc-linux-gnu, GTK+ Version
 3.24.33, cairo version 1.16.0) of 2024-10-14 built on pangolin
Repository revision: b87fda63dd4a29c3c28e235904405f2d6709239e
Repository branch: emacs-30
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Pop!_OS 22.04 LTS

Configured using:
 'configure --with-tree-sitter --without-compress-install
 --without-mailutils 'CFLAGS=-O2 -march=native''

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: JavaScript

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr compile comint ansi-osc ansi-color ring comp-run
comp-common rx emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-seq js
c-ts-common treesit json subr-x map byte-opt gv bytecomp byte-compile
imenu cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs cl-loaddefs cl-lib rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process
native-compile emacs)

Memory information:
((conses 16 112390 11199) (symbols 48 9369 0) (strings 32 27327 1317)
 (string-bytes 1 999282) (vectors 16 15439)
 (vector-slots 8 200959 7612) (floats 8 28 7) (intervals 56 277 0)
 (buffers 992 11))




Acknowledgement sent to Michael Kleehammer <michael@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#73900; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.