GNU bug report logs - #65540
29.1.50; treesit-inspect-mode does not escape `treesit--inspect-name`

Previous Next

Package: emacs;

Reported by: Augustin Chéneau (BTuin) <btuin <at> mailo.com>

Date: Fri, 25 Aug 2023 22:09:02 UTC

Severity: normal

Found in version 29.1.50

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Augustin Chéneau (BTuin) <btuin <at> mailo.com>, Yuan Fu <casouri <at> gmail.com>
Cc: 65540 <at> debbugs.gnu.org
Subject: bug#65540: 29.1.50; treesit-inspect-mode does not escape `treesit--inspect-name`
Date: Sat, 26 Aug 2023 08:24:58 +0300
> Date: Sat, 26 Aug 2023 00:08:00 +0200
> From: Augustin Chéneau (BTuin) <btuin <at> mailo.com>
> 
> The minor mode `treesit-inspect-mode` uses the mode-line to display the
> current node. However, a node name containing a string is displayed
> incorrecly because mode-line will try to interpret it as a
> '%-contruct'. Each '%' needs to be escaped as a double percent ('%%').
> 
> The attached patch should fix the issue (works for me).

Thanks.  Yuan, any comments, or should I install this?

I thought about an alternative: do something like that in
treesit-inspect-node-at-point, where the value of
treesit--inspect-name is computed, but perhaps we want to allow that
variable to be set by other Lisp programs (although it's an internal
variable)?




This bug report was last modified 1 year and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.