From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gabriel Santos via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#75141: [PATCH] Add button navigation to treesit-explorer Date: Sat, 04 Jan 2025 18:17:10 -0300 Message-ID: <87pll28ejt.fsf@disroot.org> References: <87msgh5j0j.fsf@disroot.org> Reply-To: Gabriel Santos Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11675"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Yuan Fu To: 75141@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 04 22:18:14 2025 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 1tUBXC-0002w7-H9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 22:18:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUBX2-0002vL-Ss; Sat, 04 Jan 2025 16:18:05 -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 1tUBX0-0002uw-J1 for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 16:18:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUBX0-0003RC-AM for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 16:18:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=5egU1tXxpHcNHZ05O7b2J4LxMx8HzwexDxuIMwQyw1w=; b=Lpb/Vp4kzd9B18GyvuZxCa06u4Rsmp6eJad1k68SINrMUwzwz6Mww8gGZrCKrtNniaqVpTZj/NH4RKfStZ6npuFFDo/xELpOM50l/A2IMpDTAPrFUqbLP1kBe9ShAZJpaq0BSvOo92qKf2frGUDPYYCvtTRkRX6wU3wS75OcoSxagXeXsf89NNg8otBDDKddjlcwIBdnua11Rb58BkPPlKVd+GKtKXHx2auYvFAr3p/8aDu3glCGGvw0fHG3zzdr+bY/DrTr+gDKAqIZNqi36iUPL8cWo7oE2I+J/ge0rfbP41pfcxASxutdhxwzDf9wcTAnu8mQfjZjcZCpXWhn9A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUBX0-0005T3-4i for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 16:18:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87msgh5j0j.fsf@disroot.org> Resent-From: Gabriel Santos Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2025 21:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75141 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 75141-submit@debbugs.gnu.org id=B75141.173602544420971 (code B ref 75141); Sat, 04 Jan 2025 21:18:02 +0000 Original-Received: (at 75141) by debbugs.gnu.org; 4 Jan 2025 21:17:24 +0000 Original-Received: from localhost ([127.0.0.1]:57689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUBWN-0005SA-NU for submit@debbugs.gnu.org; Sat, 04 Jan 2025 16:17:23 -0500 Original-Received: from layka.disroot.org ([178.21.23.139]:49840) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUBWL-0005S1-HG for 75141@debbugs.gnu.org; Sat, 04 Jan 2025 16:17:22 -0500 Original-Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id B05F925BFA; Sat, 4 Jan 2025 22:17:19 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Xk83x2SSl9j8; Sat, 4 Jan 2025 22:17:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1736025434; bh=jSfFrYMCPlyghW0c41tIO8rqY4pzBydeCaZ5r53tpgk=; h=From:To:Cc:Subject:Date; b=gVc+JRfIWvSFYjfHqGDcT+U/bfE1VeuhxLoyJdqihC5hlW68VsPXHSXwZo5I8zG9V DaB1QxCW0j6W4QAg8SHzzpun7Xga4jjb9bSL9ReHUCGsL6iQvaZ32A9rh8SFljF1e7 31ZzKp1sxM1d/iKkq98uP2VdVx1gP69z8VOip/WK9Mu6mhyeOWOBbe8cHzEuUz2D8H A41QhB44GkkmeTPaL4S4TvOBWzJ+/LqD0WYRFcXn06mjIkZYk+5eGge707OmpbXJT3 HnmOIkVkKGSDiBTWKj4/d5G9ysbjwf3Zx7em3VMxSUsWSIsIva8jr4omu9N3e/I3xp lgK75OhkZUJxA== 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:298477 Archived-At: --=-=-= Content-Type: text/plain Here is the updated patch, with "f" and "b" removed. -- Gabriel Santos --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-button-navigation-to-treesit-explorer.patch Content-Description: [PATCH] Add button navigation to treesit-explorer >From 1224d220985edd9de0731b26c0be96eb9f6b35a1 Mon Sep 17 00:00:00 2001 From: Gabriel Santos Date: Fri, 27 Dec 2024 10:43:20 -0300 Subject: [PATCH] Add button navigation to treesit-explorer * lisp/treesit.el (treesit--explorer-tree-mode-map): Define it as a child of special-mode-map, adding keys for button navigation. --- lisp/treesit.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/treesit.el b/lisp/treesit.el index e643eb48654..ef27a370bc2 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -4041,6 +4041,16 @@ covers point. PARSER-NAME are unique." "Mode for displaying syntax trees for `treesit-explore-mode'." nil) +(defvar-keymap treesit--explorer-tree-mode-map + :doc "Keymap for the treesit tree explorer. + +Navigates from button to button." + :parent special-mode-map + "n" #'forward-button + "p" #'backward-button + "TAB" #'forward-button + "" #'backward-button) + (defun treesit-explorer-switch-parser (parser) "Switch explorer to use PARSER." (interactive -- 2.47.1 --=-=-=--