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: Sat, 24 Feb 2024 11:32:10 +0200 Message-ID: <86jzmuyzqd.fsf@gnu.org> References: <864jegvhda.fsf@gnu.org> 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="16860"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dominique@quatravaux.org, 68956@debbugs.gnu.org To: casouri@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 24 10:56:53 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 1rdom3-00047t-I3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Feb 2024 10:56:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdolw-0007IV-Ub; Sat, 24 Feb 2024 04:56:44 -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 1rdols-0007Ha-1j for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 04:56:40 -0500 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 1rdolq-0002wp-NP for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 04:56:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdomE-0008OI-N7 for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 04:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Feb 2024 09:57:02 +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.170876858932145 (code B ref 68956); Sat, 24 Feb 2024 09:57:02 +0000 Original-Received: (at 68956) by debbugs.gnu.org; 24 Feb 2024 09:56:29 +0000 Original-Received: from localhost ([127.0.0.1]:43986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdold-0008ME-V1 for submit@debbugs.gnu.org; Sat, 24 Feb 2024 04:56:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdolW-0008LG-6l for 68956@debbugs.gnu.org; Sat, 24 Feb 2024 04:56:20 -0500 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 1rdoOD-0004jg-Uw; Sat, 24 Feb 2024 04:32:13 -0500 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=NZ5jL0xTDGoPBgs1W55SQy7YSkLBImJew+/HsMUuEZU=; b=MkT80eE0tnLQfagWtZTv XpZlA0wPIW+oT0fH0iCkQ4n6ekRT6dEXm244ILRqm3djpvm413m1JB2qB3THPvBALKhPFvg7AyQDe 1y8jKQDLzyJaqV0KdOTfS4CFbRNGCMfixNjGMAprqRgu4H8dhL/W+g6Is4gAGPP9yP2iE7bjEeUGI OfwEzmpQY1OhH5j15IXUL/LReZMvTJcOfyZJEqfxDSvgENp2CTLYe5O1lLrqSbZ/7lReTZM6C+vmm doJueNbMEGgS9ov3CUXV+vHfQStanU4DC2vajWoKD0e4W4qlPBkId8ma3TlJDd44x3/iWbOgg8scp FwIhFY3r+xMXKw==; In-Reply-To: <864jegvhda.fsf@gnu.org> (message from Eli Zaretskii on Sat, 10 Feb 2024 10:44:01 +0200) 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:280533 Archived-At: Ping! Yuan, any comments? > 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. > > > >