From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs 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 Message-ID: <616F5C5A-1D12-4E14-90D4-8ABE7FD869BD@gmail.com> References: <87wn5ls2bu.fsf@masteringemacs.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20496"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60880@debbugs.gnu.org To: Mickey Petersen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 19 23:32:21 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pIdSH-00055K-FB for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Jan 2023 23:32:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIdS4-0003qF-4N; Thu, 19 Jan 2023 17:32:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIdRz-0003po-AG for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2023 17:32:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIdRz-00039a-1D for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2023 17:32:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pIdRy-0002oy-Ak for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2023 17:32:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87wn5ls2bu.fsf@masteringemacs.org> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Jan 2023 22:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60880 X-GNU-PR-Package: emacs Original-Received: via spool by 60880-submit@debbugs.gnu.org id=B60880.167416746810778 (code B ref 60880); Thu, 19 Jan 2023 22:32:02 +0000 Original-Received: (at 60880) by debbugs.gnu.org; 19 Jan 2023 22:31:08 +0000 Original-Received: from localhost ([127.0.0.1]:44920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIdR6-0002nm-75 for submit@debbugs.gnu.org; Thu, 19 Jan 2023 17:31:08 -0500 Original-Received: from mail-pf1-f175.google.com ([209.85.210.175]:38517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIdR2-0002nD-HO for 60880@debbugs.gnu.org; Thu, 19 Jan 2023 17:31:06 -0500 Original-Received: by mail-pf1-f175.google.com with SMTP id 207so2638666pfv.5 for <60880@debbugs.gnu.org>; Thu, 19 Jan 2023 14:31:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=8l5RWG7bv1zkbqfw3lIX3xC1o1DlU7tSIj/BlzMF+H4=; b=BdUrNL2q4KUvlB8eaoyehiLR12rSbrvBgxGMerOQ7CML7c/MLmj2sGTFaouWwSpMUu 0wJk+xOd06AdZKW1Ms2xKq0JErMY6bj60FkxkRX5/lNzrZR8RSb9hItXQ0sAgOEbMAPC kl1RfAL4tXCZMFlOy/khlk8OYXcd8DjUTamHpcafpTU8WL4Advxpj8qQwmVof0DBbTmk VIVTDrIOJKIKWoTvePFbEZwmONWN0k+QuM5Je6kblkN6anbEaX46rrLqIhFmlGrbiqLP sGZevVyJIgeFZ7WI1JNv6Dgf0oee+dNnv5czd3s1G5DnJQKzLWnD844Y6fWpxP/x7WXC /5AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8l5RWG7bv1zkbqfw3lIX3xC1o1DlU7tSIj/BlzMF+H4=; b=2gntTg7GPciC2sQGfjQNA+RgG8975/3fKMZ5Q6wITbQHVvEbhnvjUcA+Uo40POpuTy RTSHoRvBtClWRFYaqWZIcozPtqsgWDl8MnqOk/LSWHQN6qPCBlYS6mvm4TrE+aBtP9is KBIl5NpXlf1/CXYJhb7hVog+QYZVuvsCbAUch7q0Y2Y6rSOXZ/RRHmHE5+aIIXnezaOv AZ+1J1gwLStq8ccI+Fo5qNwhtxrHMDf7icPbbR1zQqYcA9dnjeWiLG9gWedg2YP3Rq+H mqfk86KLrJ3JbeR572R/WsXStOQ5EPWnEodDo64l70pESrN1oDTn/hkwmJqToe+UgXv1 P2eA== X-Gm-Message-State: AFqh2kqsBTbCDVaZyG17phIuXH9pnAaxS7A5GCCSlgKWMQN6IiFJiaQz OqJ5KvOk4i0BCChxy4IqT784TWxUnKk= X-Google-Smtp-Source: AMrXdXt1NeIZkWoY0gcu8CPUJx148bAmSo+UQEulyfywWMcqe+f5/qyergzkSnyCiz+wI/Do5G7tRQ== X-Received: by 2002:a05:6a00:4c9c:b0:56e:a7a7:35a0 with SMTP id eb28-20020a056a004c9c00b0056ea7a735a0mr13652117pfb.25.1674167458600; Thu, 19 Jan 2023 14:30:58 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id f13-20020aa7968d000000b0056b4c5dde61sm12847908pfk.98.2023.01.19.14.30.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2023 14:30:58 -0800 (PST) X-Mailer: Apple Mail (2.3731.300.101.1.3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253736 Archived-At: Mickey Petersen 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=E2=80=99t stop treesit-explore-mode from turning = on, even if it doesn=E2=80=99t create buffers, etc, since I think this is how = minor modes usually behave. Yuan