all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Augustin Chéneau (BTuin)" <btuin@mailo.com>, 65540-done@debbugs.gnu.org
Subject: bug#65540: 29.1.50; treesit-inspect-mode does not escape `treesit--inspect-name`
Date: Sun, 27 Aug 2023 14:55:20 -0700	[thread overview]
Message-ID: <E0147356-D52A-49F9-AAE9-91F548254195@gmail.com> (raw)
In-Reply-To: <83ttsmml3p.fsf@gnu.org>



> 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	other threads:[~2023-08-27 21:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 22:08 bug#65540: 29.1.50; treesit-inspect-mode does not escape `treesit--inspect-name` Augustin Chéneau
2023-08-26  5:24 ` Eli Zaretskii
2023-08-27 21:55   ` Yuan Fu [this message]

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

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

  git send-email \
    --in-reply-to=E0147356-D52A-49F9-AAE9-91F548254195@gmail.com \
    --to=casouri@gmail.com \
    --cc=65540-done@debbugs.gnu.org \
    --cc=btuin@mailo.com \
    --cc=eliz@gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.