From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Cassou Newsgroups: gmane.emacs.bugs Subject: bug#71760: 31.0.50; Filling jsdoc text doesn't work in js-ts-mode Date: Mon, 24 Jun 2024 22:23:06 +0200 Message-ID: <871q4mxf85.fsf@cassou.me> 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="35565"; mail-complaints-to="usenet@ciao.gmane.io" To: 71760@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 24 22:24:21 2024 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 1sLqEe-00091L-SU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Jun 2024 22:24:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLqEN-0006AW-Nl; Mon, 24 Jun 2024 16:24: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 1sLqEL-0006A5-LX for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2024 16:24:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLqEL-0004Ua-Dk for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2024 16:24:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sLqEM-000507-9x for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2024 16:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jun 2024 20:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71760 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.171926060019169 (code B ref -1); Mon, 24 Jun 2024 20:24:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Jun 2024 20:23:20 +0000 Original-Received: from localhost ([127.0.0.1]:35696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLqDg-0004z7-7E for submit@debbugs.gnu.org; Mon, 24 Jun 2024 16:23:20 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLqDf-0004yz-2D for submit@debbugs.gnu.org; Mon, 24 Jun 2024 16:23:19 -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 1sLqDd-000672-Fn for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2024 16:23:17 -0400 Original-Received: from mail.reprendre.net ([193.23.30.35]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLqDb-0004N3-7K for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2024 16:23:17 -0400 Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 5C2222C911B for ; Mon, 24 Jun 2024 22:23:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cassou.me; s=dkim; t=1719260592; h=from:subject:date:message-id:to:mime-version:content-type; bh=IHWCgx655vhd+UPvLeeqrIx870+D+oRT+rOW8fenkQ0=; b=TiLLbyg8nMfYMSTIWalfuSN6CKYZkIkZbR9Vqdik/p2CQnbaXVeM14wbKJi5Gz2xQ9y8p9 DIxSJ8EDycuxlwOcmTo2MNHoADF/7xFdX0NdwTUHoyO4dOu7FyNE0Er5Vm1aMyyfuU0xdW tMFnAgX47mqJw7ubSw/n1ehwi9Um3wjfDIUswdlgoyJqCq9mZKrMlSLt2MtRrvQYJ9zuw4 Fd6XB6LFopU0ox+p+nH6wS0Up1dkJgHlWCT27pqD7rxKlnX6+RnaojzZBY3095mu+ow6tx z/7wgU5rZheCpkOSWPIHFGOQtvWAxw7w1UTiTzRyIZNx31QGNoowUe90qf/3SA== X-Last-TLS-Session-Version: TLSv1.3 Received-SPF: pass client-ip=193.23.30.35; envelope-from=damien@cassou.me; helo=mail.reprendre.net 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-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:287857 Archived-At: --=-=-= Content-Type: text/plain Hi, in a commit recently merged in master (0edacf2aa7e53), js-ts-mode has been improved to use the jsdoc treesitter grammar on documentation. Font lock works great but M-q doesn't fill long lines. To reproduce, make sure your Emacs contains the above-mentioned commit and make sure you have the jsdoc treesitter grammar available. Then, save the attached JavaScript file to your disk and execute: $ emacs -Q --eval "(progn (find-file \"/home/cassou/tmp/test.js\") (js-ts-mode))" Move point to the middle of line 2 (or line 4) and press M-q. Expected: The paragraph is filled. Actual: Nothing changes. I tried changing the value of `c-ts-common--comment-regexp' to include "description" (as this is what the jsdoc parser uses for text) but the result is worse. I also tried reusing `js-fill-paragraph' but that fails as well. I would be happy to implement something and send a patch but I have no idea were to start. -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill --=-=-= Content-Type: text/javascript Content-Disposition: attachment; filename=test.js /** * Test. rat art srs tr tr st rst artsar t arstienartsioenaroti eanrtsoi aerntso iaerst * * @param {string} bla - Some documentation of this parameter. ar tar star tsa rst arstar st arst art rs */ function f(bla) { } --=-=-=--