bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65540: 29.1.50; treesit-inspect-mode does not escape `treesit--inspe


From: Yuan Fu
Subject: bug#65540: 29.1.50; treesit-inspect-mode does not escape `treesit--inspect-name`
Date: Sun, 27 Aug 2023 14:55:20 -0700


> On Aug 25, 2023, at 10:24 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> Date: Sat, 26 Aug 2023 00:08:00 +0200
>> From: Augustin Chéneau (BTuin) <btuin@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?

Thanks, Augustin, and Eli. I pushed a simpler patch (we only set 
treesit--inspect-name in that one place, so probably don’t need a function for 
it).

> 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)?

That’s an possible approach, but what we have now works just fine.

Yuan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]