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, 10 Feb 2024 10:44:01 +0200 Message-ID: <864jegvhda.fsf@gnu.org> References: 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="2368"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68956@debbugs.gnu.org To: Dominique Quatravaux , Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 10 09:55:48 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 1rYj9I-0000SZ-4V for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Feb 2024 09:55:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYj8K-0000jj-RK; Sat, 10 Feb 2024 03:54:48 -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 1rYj8J-0000jR-Lr for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 03:54:47 -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 1rYj8J-0002Zy-6Y for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 03:54:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rYj8Y-0007r1-9g for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 03:55: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, 10 Feb 2024 08:55: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.170755524829993 (code B ref 68956); Sat, 10 Feb 2024 08:55:02 +0000 Original-Received: (at 68956) by debbugs.gnu.org; 10 Feb 2024 08:54:08 +0000 Original-Received: from localhost ([127.0.0.1]:53567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYj7f-0007nc-87 for submit@debbugs.gnu.org; Sat, 10 Feb 2024 03:54:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYj7c-0007mm-7s for 68956@debbugs.gnu.org; Sat, 10 Feb 2024 03:54:05 -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 1rYixw-00010g-2A; Sat, 10 Feb 2024 03:44:04 -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=aSm4SXjWVj6Pm/4KcsWxrvRCUr01i5mFtG3/eX+xivw=; b=hYdVnO99156ONsF/90RO CjLamcIURoU/1AeXScXF5Zebgdpz4/mZJTG5yUCWPhSXSzFEc1Vkc/CudGXjhAiwnVnGWMfUVKVxL ae/omTM1Ocokmj6uWxf4DFmk92RIYTl8Uuicmg3y8+zLnT8VCCNm/9IToybSLLoFoKu2jLPa8DmjZ 6xKIjx8gw/dEzKatti9EJPjJsgjkwKVgDs+T02PmwSm8Qxab/IluH+u21KgF0fpFKEl+3QzoU4KpP cyp/OjLpj+94AwC7AJKWrsgNAmVOmSMg4HgQSqgFfF/YebaV9KBHs2l7ZTm7cfX1vGKnKqrM/zNys sa4+IFmLWUtONg==; In-Reply-To: (message from Dominique Quatravaux on Tue, 6 Feb 2024 18:44:18 +0100) 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:279727 Archived-At: > 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.