From: Daan Ro <daanturo@gmail.com>
To: "liaotx2@gmail.com" <liaotx2@gmail.com>
Cc: "74412@debbugs.gnu.org" <74412@debbugs.gnu.org>
Subject: bug#74412: 31.0.50; Treesit-outline conflict with outli in Emacs 31
Date: Thu, 21 Nov 2024 00:06:41 +0700 [thread overview]
Message-ID: <8316FFB6-1373-4EC5-9EFB-5B05A1DE0F72@getmailspring.com> (raw)
In-Reply-To: <9e9fcc46-e6ca-42e6-bb0e-6770ae65f150@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 224 bytes --]
Personally I also find treesit's decision to set outline variables
somewhat intrusive. I have to advice `treesit-major-mode-setup` to
disable that. If only there is an easier way to do it like the
attached patch.
Daanturo
[-- Attachment #1.2: Type: text/html, Size: 889 bytes --]
[-- Attachment #2: 0001-Add-custom-option-treesit-enable-outline-settings.patch --]
[-- Type: application/octet-stream, Size: 1324 bytes --]
From a6aa6420640922c748b173cfeb1cf20ee1baade8 Mon Sep 17 00:00:00 2001
From: Daanturo <daanturo@gmail.com>
Date: Wed, 20 Nov 2024 14:33:02 +0000
Subject: [PATCH] Add custom option treesit-enable-outline-settings
* lisp/treesit.el: Define the variable and use it in
treesit-major-mode-setup.
---
lisp/treesit.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 2518204ce93..45720325f73 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -943,6 +943,11 @@ treesit-font-lock-level
:set #'treesit--font-lock-level-setter
:version "29.1")
+(defcustom treesit-enable-outline-settings t
+ "Non-nil means Tree sitter-based outline settings are enabled."
+ :type 'boolean
+ :version "31.1")
+
(defvar-local treesit--font-lock-query-expand-range (cons 0 0)
"The amount to expand the start and end of the region when fontifying.
This should be a cons cell (START . END). When fontifying a
@@ -3155,6 +3160,7 @@ treesit-major-mode-setup
;; Outline minor mode.
(when (and (or treesit-outline-predicate treesit-simple-imenu-settings)
+ treesit-enable-outline-settings
(not (seq-some #'local-variable-p
'(outline-search-function
outline-regexp outline-level))))
--
2.47.0
next prev parent reply other threads:[~2024-11-20 17:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 2:59 bug#74412: 31.0.50; Treesit-outline conflict with outli in Emacs 31 Taka Obsid
2024-11-18 12:29 ` Eli Zaretskii
2024-11-19 1:47 ` Taka Obsid
2024-11-19 15:37 ` Eli Zaretskii
2024-11-19 18:09 ` Juri Linkov
2024-11-20 3:34 ` Taka Obsid
2024-11-20 7:15 ` Juri Linkov
2024-11-20 14:06 ` Taka Obsid
2024-11-20 17:21 ` Juri Linkov
2024-11-20 18:23 ` Juri Linkov
2024-11-21 1:48 ` Taka Obsid
2024-11-21 6:51 ` Eli Zaretskii
2024-11-20 17:06 ` Daan Ro [this message]
2024-11-20 17:18 ` Juri Linkov
2024-11-20 17:51 ` Daan Ro
2024-11-20 18:25 ` Juri Linkov
2024-11-20 18:53 ` Eli Zaretskii
2024-11-20 18:50 ` Eli Zaretskii
2024-11-21 8:16 ` Daan Ro
2024-11-21 9:07 ` Eli Zaretskii
2024-11-23 20:46 ` Yuan Fu
2024-11-21 17:58 ` Juri Linkov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8316FFB6-1373-4EC5-9EFB-5B05A1DE0F72@getmailspring.com \
--to=daanturo@gmail.com \
--cc=74412@debbugs.gnu.org \
--cc=liaotx2@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).