GNU bug report logs - #75079
Default parser for treesit-explore

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 25 Dec 2024 08:12:02 UTC

Severity: normal

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: 75079 <at> debbugs.gnu.org
Cc: Yuan Fu <casouri <at> gmail.com>
Subject: Re: bug#75079: Window for treesit-explore
Date: Thu, 23 Jan 2025 09:40:44 +0200
BTW, wouldn't it be nicer to display the treesit-explore window
below the current buffer, this would keep the user's window layout:

diff --git a/lisp/treesit.el b/lisp/treesit.el
index 8d86d142e3f..a22c335ae22 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -4122,7 +4224,8 @@ treesit-explorer-switch-parser
     (user-error "Not in `treesit-explore-mode'"))
   (setq-local treesit--explorer-parser parser)
   (display-buffer treesit--explorer-buffer
-                  (cons nil '((inhibit-same-window . t))))
+                  '(display-buffer-below-selected
+                    (inhibit-same-window . t)))
   (setq-local treesit--explorer-last-node nil)
   (treesit--explorer-refresh))
 
@@ -4176,7 +4279,9 @@ treesit-explore
   (interactive)
   (if (and treesit-explore-mode
            (buffer-live-p treesit--explorer-buffer))
-      (display-buffer treesit--explorer-buffer '(nil (inhibit-same-window . t)))
+      (display-buffer treesit--explorer-buffer
+                      '(display-buffer-below-selected
+                        (inhibit-same-window . t)))
     (treesit-explore-mode)))




This bug report was last modified 173 days ago.

Previous Next


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