unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: casouri@gmail.com
Cc: dominique@quatravaux.org, 68956@debbugs.gnu.org
Subject: bug#68956: M-q → Invalid predicate, see ‘treesit-thing-settings’ for valid forms for a predicate: nil
Date: Sat, 24 Feb 2024 11:32:10 +0200	[thread overview]
Message-ID: <86jzmuyzqd.fsf@gnu.org> (raw)
In-Reply-To: <864jegvhda.fsf@gnu.org> (message from Eli Zaretskii on Sat, 10 Feb 2024 10:44:01 +0200)

Ping!  Yuan, any comments?

> Cc: 68956@debbugs.gnu.org
> Date: Sat, 10 Feb 2024 10:44:01 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Dominique Quatravaux <dominique@quatravaux.org>
> > 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.
> 
> 
> 
> 





  reply	other threads:[~2024-02-24  9:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06 17:32 bug#68956: M-q → Invalid predicate, see ‘treesit-thing-settings’ for valid forms for a predicate: nil Dominique Quatravaux
2024-02-06 17:44 ` bug#68956: Workaround Dominique Quatravaux
2024-02-10  8:44   ` bug#68956: M-q → Invalid predicate, see ‘treesit-thing-settings’ for valid forms for a predicate: nil Eli Zaretskii
2024-02-24  9:32     ` Eli Zaretskii [this message]
     [not found] <27A9A540-66CC-4017-AC7A-5D8937A780B4@gmail.com>
2024-04-10  6:03 ` Yuan Fu
2024-04-10 10:51   ` Eli Zaretskii
2024-04-20  7:45     ` Eli Zaretskii
2024-04-22 10:53       ` Dominique Quatravaux
2024-04-22 10:55         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86jzmuyzqd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=68956@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=dominique@quatravaux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).