all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Mickey Petersen <mickey@masteringemacs.org>
Cc: 60880@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <616F5C5A-1D12-4E14-90D4-8ABE7FD869BD@gmail.com> (raw)
In-Reply-To: <87wn5ls2bu.fsf@masteringemacs.org>


Mickey Petersen <mickey@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





  reply	other threads:[~2023-01-19 22:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 13:44 bug#60880: 30.0.50; tree-sitter `treesit-explore-mode' is buggy and does not behave properly Mickey Petersen
2023-01-19 22:30 ` Yuan Fu [this message]
2023-01-20  7:02   ` Eli Zaretskii
2023-01-20  7:59     ` Juri Linkov
2023-01-20 13:13       ` Eli Zaretskii
2023-01-20  9:08     ` Mickey Petersen

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=616F5C5A-1D12-4E14-90D4-8ABE7FD869BD@gmail.com \
    --to=casouri@gmail.com \
    --cc=60880@debbugs.gnu.org \
    --cc=mickey@masteringemacs.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.