GNU bug report logs - #60880
30.0.50; tree-sitter `treesit-explore-mode' is buggy and does not behave properly

Previous Next

Package: emacs;

Reported by: Mickey Petersen <mickey <at> masteringemacs.org>

Date: Tue, 17 Jan 2023 13:50:02 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #8 received at 60880 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Mickey Petersen <mickey <at> masteringemacs.org>
Cc: 60880 <at> debbugs.gnu.org
Subject: Re: bug#60880: 30.0.50; tree-sitter `treesit-explore-mode' is buggy 
 and does not behave properly
Date: Thu, 19 Jan 2023 14:30:46 -0800
Mickey Petersen <mickey <at> masteringemacs.org> writes:

> A medley of issues here:
>
> 1. Executing `treesit-explore-mode' on a buffer with no valid grammar
> support causes the minor mode (and playground buffer) to stick around and "load" anyway.
>
> 2. Bailing out of the grammar prompt does not, in actual fact, stop
> explore mode from proceeding. Instead it creates an empty buffer and
> it still engages the minor mode.
>
> 3. Killing the playground buffer does not remove the explore mode buffer.
>
> 4. treesit-explore-mode is stored against a buffer during
> `desktop-save' (and subsequently read with) `desktop-read'. Thus
> broken buffers or files inherit the explore mode. This is especially
> pernicious due to #1, #2, and #3.

Ok, I fixed those problems. Now if the language is not available,
treesit-explore-mode raises an error instead of continuing, desktop-save
will not save the explorer buffer, and killing the source buffer also
kills the explorer buffer.

Invalid language doesn’t stop treesit-explore-mode from turning on, even
if it doesn’t create buffers, etc, since I think this is how minor modes
usually behave.

Yuan




This bug report was last modified 2 years and 150 days ago.

Previous Next


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