From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#68956: M-q =?UTF-8?Q?=E2=86=92?= Invalid predicate, see =?UTF-8?Q?=E2=80=98treesit-thing-settings=E2=80=99?= for valid forms for a predicate: nil Date: Wed, 10 Apr 2024 13:51:33 +0300 Message-ID: <865xwpwkwa.fsf@gnu.org> References: <27A9A540-66CC-4017-AC7A-5D8937A780B4@gmail.com> <83B8FE6B-7C87-4D79-AF1A-2A0D265632C5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15157"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68956@debbugs.gnu.org To: Yuan Fu , Dominique Quatravaux Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 10 12:53:09 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 1ruVZl-0003eK-EN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Apr 2024 12:53:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruVZY-000810-Ir; Wed, 10 Apr 2024 06:52:56 -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 1ruVZW-00080Y-Rh for bug-gnu-emacs@gnu.org; Wed, 10 Apr 2024 06:52:54 -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 1ruVZW-0004nk-Ht for bug-gnu-emacs@gnu.org; Wed, 10 Apr 2024 06:52:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ruVZf-0002wf-2c for bug-gnu-emacs@gnu.org; Wed, 10 Apr 2024 06:53:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Apr 2024 10:53:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68956 X-GNU-PR-Package: emacs Original-Received: via spool by 68956-submit@debbugs.gnu.org id=B68956.171274632211002 (code B ref 68956); Wed, 10 Apr 2024 10:53:03 +0000 Original-Received: (at 68956) by debbugs.gnu.org; 10 Apr 2024 10:52:02 +0000 Original-Received: from localhost ([127.0.0.1]:52214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruVYg-0002rF-BI for submit@debbugs.gnu.org; Wed, 10 Apr 2024 06:52:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruVYb-0002ph-6R for 68956@debbugs.gnu.org; Wed, 10 Apr 2024 06:52:00 -0400 Original-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 1ruVYM-0004iI-Ru; Wed, 10 Apr 2024 06:51:42 -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=prIqoveGlOIsFx9CQfQcU592X+uQ7xvcXTjXXm0wegM=; b=P3RetLjUnM+z/IxQCXCT CH0BcMZ1RliHrSllnxXaX6NApSVGJGZc1xBGDrHjGC0y3cLuNUjaR6t5QOyP04XJsEn9Z7GztzT6L zrdiwDYQCDx8F7vfovwRPSyG8s6wg9DBGVX+2PgOnuiEd3aGTLUlUqsdHJPZ4rG5q2033f4tpHx1E Q7/3wvNQ+fSOpfaydjEEYfoJpsKapT8KNapEogCtJpUr1mkaK0DXfD+AF7W/hmVfqJfIvT0N2Halo BBzWeG5SbUJBDlexeFVhf4WTD2zWWJu1NGI2b26XCGKsJKJkQx7MBs3qEngmLGGe7qwyR+Pz0jNR+ w1p/IxtCuLDLjg==; In-Reply-To: <83B8FE6B-7C87-4D79-AF1A-2A0D265632C5@gmail.com> (message from Yuan Fu on Tue, 9 Apr 2024 23:03:21 -0700) 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:283041 Archived-At: > From: Yuan Fu > Date: Tue, 9 Apr 2024 23:03:21 -0700 > Cc: 68956@debbugs.gnu.org > > [Adding the bug tracker back, forgot to replay-all] And it might be a good idea to add Dominique as well ;-) > > > On Apr 8, 2024, at 8:42 PM, Yuan Fu wrote: > > > > > > Eli Zaretskii writes: > > > >>> Cc: 68956@debbugs.gnu.org > >>> Date: Sat, 10 Feb 2024 10:44:01 +0200 > >>> From: Eli Zaretskii > >>> > >>>> From: Dominique Quatravaux > >>>> Date: Tue, 6 Feb 2024 18:32:27 +0100 > >>>> > >>>> When invoking `prog-fill-reindent-defun' from inside a bash-ts-mode buffer, an exception (regardless of where > >>>> point is), an error is raised that reads > >>>> > >>>> Invalid predicate, see ‘treesit-thing-settings’ for valid forms for a predicate: nil > >>>> > >>>> Investigation reveals that `prog-fill-reindent-defun' calls `treesit-node-match-p' with 'text as the second > >>>> argument, which can only succeed if `(assq 'text (assq 'bash treesit-thing-settings))' is non-nil; whereas the > >>>> corresponding setting for `treesit-thing-settings' prepared by `bash-ts-mode', doesn't provide a value for 'text > >>>> (only for 'sentence). > >>>> > >>>> I had success applying the following workaround: > >>>> > >>>> (advice-add 'bash-ts-mode > >>>> :after (lambda (&rest ignored) > >>>> (when-let ((bash-things (assq 'bash treesit-thing-settings))) > >>>> (setf (alist-get 'text (cdr bash-things)) '(sentence))))) > >>>> > >>>> Now M-q does the right thing for me everywhere in bash-ts-mode. > >>> > >>> Yuan, any comments or ideas? > >>> > >>> Thanks. > > > > Sorry for the delay. Dominique, what version are you using? I can see > > that this is fixed on master[1], but not on emacs-29, perhaps due to > > the size of the change. > > > > [1] b392d05089014ac6d41e35a016d46f496964f879 > > > > Yuan > >