X-Loop: help-debbugs@HIDDEN Subject: bug#76788: treesit-thing-settings for elixir-ts-mode Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: wkirschbaum@HIDDEN, bug-gnu-emacs@HIDDEN Resent-Date: Thu, 06 Mar 2025 18:18:01 +0000 Resent-Message-ID: <handler.76788.B.17412850304078 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 76788 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 76788 <at> debbugs.gnu.org Cc: Wilhelm Kirschbaum <wkirschbaum@HIDDEN> X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN X-Debbugs-Original-Xcc: Wilhelm Kirschbaum <wkirschbaum@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.17412850304078 (code B ref -1); Thu, 06 Mar 2025 18:18:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Mar 2025 18:17:10 +0000 Received: from localhost ([127.0.0.1]:45368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tqFmQ-00013h-2e for submit <at> debbugs.gnu.org; Thu, 06 Mar 2025 13:17:10 -0500 Received: from lists.gnu.org ([2001:470:142::17]:44106) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1tqFmK-000136-7s for submit <at> debbugs.gnu.org; Thu, 06 Mar 2025 13:17:04 -0500 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 <juri@HIDDEN>) id 1tqFmE-0004vg-OK for bug-gnu-emacs@HIDDEN; Thu, 06 Mar 2025 13:16:58 -0500 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1tqFmC-000393-1k for bug-gnu-emacs@HIDDEN; Thu, 06 Mar 2025 13:16:58 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 435784443B for <bug-gnu-emacs@HIDDEN>; Thu, 6 Mar 2025 18:16:49 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> Organization: LINKOV.NET Date: Thu, 06 Mar 2025 20:12:12 +0200 Message-ID: <87o6yedo5f.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-GND-State: clean X-GND-Score: 0 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdekgeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecunecujfgurhephffvufhofffkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeevteefieeuhfdtgeeuudekgfejjeekvddvvefhvdeftdeifeekveelieekffefudenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepuddprhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhg X-GND-Sasl: juri@HIDDEN Received-SPF: pass client-ip=2001:4b98:dc4:8::228; envelope-from=juri@HIDDEN; helo=relay8-d.mail.gandi.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.3 (/) --=-=-= Content-Type: text/plain Hi Wilhelm, Currently I'm adding the new 'list' thing to all ts-modes and noticed that elixir-ts-mode defines the function 'elixir-ts--forward-sexp'. This function can be superseded by the 'list' definition in treesit-thing-settings that supports such commands as 'forward-sexp', 'forward-list', 'up-list', 'down-list', and modes 'show-paren-mode', 'hs-minor-mode'. I have tested all cases, and this patch covers all list nodes. The only doubtful case is the commented out definition ;; (and "\\`call\\'" ,#'elixir-ts--defun-p) When enabled, it causes too much trouble with e.g. 'show-paren-mode', etc. OTOH, this definition is not much needed since 'C-M-a' (beginning-of-defun) and 'C-M-e' (end-of-defun) already cover this need instead of using 'C-M-f/b', so 'C-M-a/e' could be used to navigate between functions. And 'C-M-f/b' navigate in all other cases such as between 'do' and 'end', parens, etc. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=elixir--ts--thing-settings.patch diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index d50692d87c0..e5a6448fc8f 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -111,13 +111,6 @@ elixir-ts-attribute "Face used for attributes in Elixir files." :group 'elixir-ts) -(defconst elixir-ts--sexp-regexp - (rx bol - (or "call" "stab_clause" "binary_operator" "list" "tuple" "map" "pair" - "sigil" "string" "atom" "alias" "arguments" "identifier" - "boolean" "quoted_content" "bitstring") - eol)) - (defconst elixir-ts--test-definition-keywords '("describe" "test")) @@ -574,21 +567,10 @@ elixir-ts--treesit-range-rules (:match "^[HF]$" @_name) (quoted_content) @heex))))) -(defvar heex-ts--sexp-regexp) +(defvar heex-ts--thing-settings) (defvar heex-ts--indent-rules) (defvar heex-ts--font-lock-settings) -(defun elixir-ts--forward-sexp (&optional arg) - "Move forward across one balanced expression (sexp). -With ARG, do it many times. Negative ARG means move backward." - (or arg (setq arg 1)) - (funcall - (if (> arg 0) #'treesit-end-of-thing #'treesit-beginning-of-thing) - (if (eq (treesit-language-at (point)) 'heex) - heex-ts--sexp-regexp - elixir-ts--sexp-regexp) - (abs arg))) - (defun elixir-ts--treesit-anchor-grand-parent-bol (_n parent &rest _) "Return the beginning of non-space characters for the parent node of PARENT." (save-excursion @@ -636,6 +618,14 @@ elixir-ts--defun-name (_ nil)))) (_ nil))) +(defun elixir-ts--with-parens-0-p (node) + (equal (treesit-node-type (treesit-node-child node 0)) + "(")) + +(defun elixir-ts--with-parens-1-p (node) + (equal (treesit-node-type (treesit-node-child node 1)) + "(")) + (defvar elixir-ts--syntax-propertize-query (when (treesit-available-p) (treesit-query-compile @@ -722,7 +712,30 @@ elixir-ts-mode (setq-local treesit-simple-indent-rules elixir-ts--indent-rules) ;; Navigation. - (setq-local forward-sexp-function #'elixir-ts--forward-sexp) + (setq-local treesit-thing-settings + `((elixir + (list + (or ;; (and "\\`call\\'" ,#'elixir-ts--defun-p) + (and "\\`arguments\\'" ,#'elixir-ts--with-parens-0-p) + (and "\\`unary_operator\\'" ,#'elixir-ts--with-parens-1-p) + ,(rx bos (or "block" + "quoted_atom" + "string" + "interpolation" + "sigil" + "quoted_keyword" + "list" + "tuple" + "bitstring" + "map" + "do_block" + "anonymous_function") + eos))) + (sentence + ,(rx bos (or "call") eos)) + (text + ,(rx bos (or "string" "sigil" "comment") eos))) + (heex ,@heex-ts--thing-settings))) (setq-local treesit-defun-type-regexp '("call" . elixir-ts--defun-p)) diff --git a/lisp/progmodes/heex-ts-mode.el b/lisp/progmodes/heex-ts-mode.el index 65aaa0d488d..88f58041c1b 100644 --- a/lisp/progmodes/heex-ts-mode.el +++ b/lisp/progmodes/heex-ts-mode.el @@ -56,12 +56,6 @@ heex-ts-indent-offset :safe 'integerp :group 'heex-ts) -(defconst heex-ts--sexp-regexp - (rx bol - (or "directive" "tag" "component" "slot" - "attribute" "attribute_value" "quoted_attribute_value" "expression") - eol)) - ;; There seems to be no parent directive block for tree-sitter-heex, ;; so we ignore them for now until we learn how to query them. ;; https://github.com/phoenixframework/tree-sitter-heex/issues/28 @@ -139,14 +133,24 @@ heex-ts--defun-name (treesit-node-child (treesit-node-child node 0) 1) nil))) (_ nil))) -(defun heex-ts--forward-sexp (&optional arg) - "Move forward across one balanced expression (sexp). -With ARG, do it many times. Negative ARG means move backward." - (or arg (setq arg 1)) - (funcall - (if (> arg 0) #'treesit-end-of-thing #'treesit-beginning-of-thing) - heex-ts--sexp-regexp - (abs arg))) +(defvar heex-ts--thing-settings + `((list + ,(rx bos (or "doctype" + "tag" + "component" + "slot" + "expression" + "directive" + "comment") + eos)) + (sentence + ,(rx bos (or "tag_name" + "component_name" + "attribute") + eos)) + (text + ,(rx bos (or "comment" "text") eos))) + "`treesit-thing-settings' for HEEx.") ;;;###autoload (define-derived-mode heex-ts-mode html-mode "HEEx" @@ -158,10 +162,7 @@ heex-ts-mode ;; Comments (setq-local treesit-thing-settings - `((heex - (text ,(regexp-opt '("comment" "text")))))) - - (setq-local forward-sexp-function #'heex-ts--forward-sexp) + `((heex ,@heex-ts--thing-settings))) ;; Navigation. (setq-local treesit-defun-type-regexp --=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Juri Linkov <juri@HIDDEN> Subject: bug#76788: Acknowledgement (treesit-thing-settings for elixir-ts-mode) Message-ID: <handler.76788.B.17412850304078.ack <at> debbugs.gnu.org> References: <87o6yedo5f.fsf@HIDDEN> X-Gnu-PR-Message: ack 76788 X-Gnu-PR-Package: emacs Reply-To: 76788 <at> debbugs.gnu.org Date: Thu, 06 Mar 2025 18:18:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to Wilhelm Kirschbaum <wkirschbaum@HIDDEN> (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 76788 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 76788: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76788 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#76788: treesit-thing-settings for elixir-ts-mode Resent-From: Wilhelm Kirschbaum <wkirschbaum@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 10 Mar 2025 06:41:02 +0000 Resent-Message-ID: <handler.76788.B76788.174158880620676 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 76788 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov <juri@HIDDEN> Cc: 76788 <at> debbugs.gnu.org Received: via spool by 76788-submit <at> debbugs.gnu.org id=B76788.174158880620676 (code B ref 76788); Mon, 10 Mar 2025 06:41:02 +0000 Received: (at 76788) by debbugs.gnu.org; 10 Mar 2025 06:40:06 +0000 Received: from localhost ([127.0.0.1]:36049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1trWo1-0005N5-JJ for submit <at> debbugs.gnu.org; Mon, 10 Mar 2025 02:40:06 -0400 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]:52310) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <wkirschbaum@HIDDEN>) id 1trWnz-0005Ko-Uw for 76788 <at> debbugs.gnu.org; Mon, 10 Mar 2025 02:40:04 -0400 Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-4768f90bf36so3054441cf.0 for <76788 <at> debbugs.gnu.org>; Sun, 09 Mar 2025 23:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741588798; x=1742193598; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=im8cmjj5aTyuxtFwUZlAL9RE+HTqp4/eYwLn7+xhyWU=; b=Ll8fMIe+FUNkz9Vt6Qooo95ullY0Caquwmg2f7obUQETJYtZbUL3d1EJ08vckfeESY ntdrH3uOAWzPWrqhwn9VMl8MaIkl1Roy2sAaGBO7xuQ7C37oJvrD0QcqG9HgHjVnP0WY 0APhgt12y1D+Z47vig8mgK5K8InqHx4ZfDYSNk99nyCwoCsnjxA6kGVWbvS+E39Ktq2+ LGErYTlTWGCEGx3x0h9UQe6Gf71kZ9q8P10Z9b4TCOrYq5zvY+eRKPDIgBRvv/gucA1V U59wrVI2v9gPORlujWIR5DHoVX4EjvbgvLTuEafG4pOI+MDpRp4ozfKPuzriIUviwcZi kMHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741588798; x=1742193598; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=im8cmjj5aTyuxtFwUZlAL9RE+HTqp4/eYwLn7+xhyWU=; b=R5Sl097/bRtLHeCn3AlKSGId7v4C9SwYnz9P1eg+FHxdhEMCrJ7Qzy/yRcvau0iXJQ aKI91FhNXwTOT/r9AYpz/2UHxgdAlhsVnqd6EuvBjDDg+t80fN8RXnGobVSe3acFFGeP V30ew7zih2mlZ08+h0oIZUsEirgGkkgTEcurz8rJLsr5SPyuWsnTBxzfMDXZtlx+grf6 tKFVvEHrQ9xLn1eH5GiirC+lRjIt+1HMHmDPlZ/ItqgE5rpBvw+j9ttn82xXGwJhVzDU ukXVxlR+btM1IFqKygMIyP5p8H2kJghGcOWpOxR0eQkU4H3k+CvBWmR9XD3trD+1jddq 3gPQ== X-Gm-Message-State: AOJu0YxjAdaT0JablvBORjHu3PFe8wesrUwvvlymT1Tqc+EraYX6mrmD 7p7QNrg+49tX2C5r6AOzXqeIMc/vzfvxadvluPbMcpa8tVDCPzgTeB2y+odGQOGK1wyPHRpjYDf eZdl2bHf6nhPEHjaghmeeYBps/kQ= X-Gm-Gg: ASbGncvrFHqR0m8U6tb35zk5yt5uJ27CvKS4g85c63Qj1vr0y3BPAiyR8NdjoqLHOee 0o92E5JXklvWD6X2cZaplNqiwGs4KqSDm3yneJ4laPeKbXXnkHPmRSlM15jeys4P2r9z3HT4ilz MPXwO9Erv84+nFoUTam6qdNpNmOJk= X-Google-Smtp-Source: AGHT+IFK/mRfuWQhqXVrQ6LVQ2i4nK3nml8EzPwfXIzee/I1OFRRdqt6mNw9Cq3Q/ra/uVhLkBfKwZn/+bUNsqxM13s= X-Received: by 2002:a05:622a:1a23:b0:475:b05:5050 with SMTP id d75a77b69052e-47618af6c28mr165376211cf.49.1741588797302; Sun, 09 Mar 2025 23:39:57 -0700 (PDT) MIME-Version: 1.0 References: <87o6yedo5f.fsf@HIDDEN> In-Reply-To: <87o6yedo5f.fsf@HIDDEN> From: Wilhelm Kirschbaum <wkirschbaum@HIDDEN> Date: Mon, 10 Mar 2025 08:39:46 +0200 X-Gm-Features: AQ5f1JrKZXZJzbA1inmGpb0HA-fGuvf0lw6cPvcEY3slrgn4KbdN_CCQcXgc2Gk Message-ID: <CAOS0-35EPsQyrxohoDWDR0aSrNh6jexs+vKU26b-F8YcoM7sXA@HIDDEN> Content-Type: multipart/alternative; boundary="0000000000009badb5062ff73d84" X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.3 (/) --0000000000009badb5062ff73d84 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Juri, I will have a look at this early this week. The forward-sexp was added very early, so there is perhaps a better way now. On Thu, Mar 6, 2025 at 8:18=E2=80=AFPM Juri Linkov <juri@HIDDEN> wrote: > Hi Wilhelm, > > Currently I'm adding the new 'list' thing to all ts-modes > and noticed that elixir-ts-mode defines the function > 'elixir-ts--forward-sexp'. > > This function can be superseded by the 'list' definition > in treesit-thing-settings that supports such commands > as 'forward-sexp', 'forward-list', 'up-list', 'down-list', > and modes 'show-paren-mode', 'hs-minor-mode'. > > I have tested all cases, and this patch covers all list nodes. > The only doubtful case is the commented out definition > > ;; (and "\\`call\\'" ,#'elixir-ts--defun-p) > > When enabled, it causes too much trouble > with e.g. 'show-paren-mode', etc. > OTOH, this definition is not much needed since > 'C-M-a' (beginning-of-defun) and 'C-M-e' (end-of-defun) > already cover this need instead of using 'C-M-f/b', > so 'C-M-a/e' could be used to navigate between functions. > And 'C-M-f/b' navigate in all other cases such as > between 'do' and 'end', parens, etc. > --0000000000009badb5062ff73d84 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Thanks Juri,=C2=A0<div><br></div><div>I will have a look a= t this early this week. The forward-sexp was added very early, so there is = perhaps a better way now.=C2=A0</div><div><br></div><div>=C2=A0</div></div>= <br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu= , Mar 6, 2025 at 8:18=E2=80=AFPM Juri Linkov <<a href=3D"mailto:juri@lin= kov.net" target=3D"_blank">juri@HIDDEN</a>> wrote:<br></div><blockqu= ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px= solid rgb(204,204,204);padding-left:1ex">Hi Wilhelm,<br> <br> Currently I'm adding the new 'list' thing to all ts-modes<br> and noticed that elixir-ts-mode defines the function<br> 'elixir-ts--forward-sexp'.<br> <br> This function can be superseded by the 'list' definition<br> in treesit-thing-settings that supports such commands<br> as 'forward-sexp', 'forward-list', 'up-list', '= down-list',<br> and modes 'show-paren-mode', 'hs-minor-mode'.<br> <br> I have tested all cases, and this patch covers all list nodes.<br> The only doubtful case is the commented out definition<br> <br> =C2=A0 ;; (and "\\`call\\'" ,#'elixir-ts--defun-p)<br> <br> When enabled, it causes too much trouble<br> with e.g. 'show-paren-mode', etc.<br> OTOH, this definition is not much needed since<br> 'C-M-a' (beginning-of-defun) and 'C-M-e' (end-of-defun)<br> already cover this need instead of using 'C-M-f/b',<br> so 'C-M-a/e' could be used to navigate between functions.<br> And 'C-M-f/b' navigate in all other cases such as<br> between 'do' and 'end', parens, etc.<br> </blockquote></div> --0000000000009badb5062ff73d84--
Received: (at control) by debbugs.gnu.org; 10 Mar 2025 21:07:47 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 17:07:47 2025 Received: from localhost ([127.0.0.1]:40118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1trkLj-0003rB-27 for submit <at> debbugs.gnu.org; Mon, 10 Mar 2025 17:07:47 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:57403) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1trkLg-0003qo-QM for control <at> debbugs.gnu.org; Mon, 10 Mar 2025 17:07:45 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5e677f59438so2981295a12.2 for <control <at> debbugs.gnu.org>; Mon, 10 Mar 2025 14:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741640858; x=1742245658; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=EEMYxJUxuWGkXPzXs7ROVM1L07vpHS9Z81LPZo3LeSI=; b=H70eVLoHXUQLIzTo0P5UeMMEbbdGurn1eyK4yY797JfAzS7HQVeuX9Y5wOHCue71bB 46uecCgPmjHpo9unmqyCYDv1AeE+kB913irUcDEVGQuAmDGwgyGELpBdoNaizuxoGtkb 9eeEmxZJ26tP9WfncMo3ajObNUCkK8pAbshrP+RjSQx4k2PP1rRmbj0P3ACAGD/1ReTw 97CM9cIO4YJOUBfdxuY6xGOtZkRHtFW0mEw5VjRAHRApNDK8G4pbc6p8vcwsRVtPl9nw f95nIEcjCZKhkLAv40ZWP054fCsnSd8quablA1KZ235jSZz34kAJPaUEBe8paeNcXyIL gOCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741640858; x=1742245658; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=EEMYxJUxuWGkXPzXs7ROVM1L07vpHS9Z81LPZo3LeSI=; b=K+vhxWIxOg+mv09gw41gzBfVoqww6No1M1hV1SoEzMVVUJrgSESvfyhqyp2HyeCYVy Hb7FNOKHl/0IkQafbvpdxb2TYrOjyHazS/Vu2YWnCeRfiS6yzSfQ6XSeZ9wmM3YLsn6U 7ujyxEhQO5AGO+y0D1rPaPTVSRFnI+Od3M35hhjf/m3mHlIochxZ4PBBMfmBS3co2m2u rCaCR2ry8mX9/qQK5ekkHZ1181tPF7reFwrHGbiPgyh7Tor7kgkCF23Eqi2jnqHN7uI8 xWTQapy7KhU6cMwHb0u6PphufVt4NuVu0brtSvxn4FEzZo7YshNlnzJ6ecPju9NfZ2Pu zw8w== X-Gm-Message-State: AOJu0Yygx5kqIHuP8CKVkUmkAWqA4suIbDIiqAu9sntqYlFY1ehTMbs0 WnNNWtaNyUqsGCy6T4IcsfhFFFZHuuvr1O3nRUY96lyxLhvOHGsR6GOTh1mbAQARAtYBnxpho32 XD1qnijLpan6ebBblRKP+ORxxxveQWtzC X-Gm-Gg: ASbGncvg1q4gSDEMAw/2LtwDEYTLN9jyes4T/gIgyoxQBP4dk/KBl7id2xZpuDiHuHA hOPiOu4XuIRsg3mZXfQbCZC26RXvzoh1YsPYL7WLr5Nlu3qgY5cbpbTMnB6tH88mkUb1amDSaow aBSLHBOHOmMlaw8bfwj/r9FHdL4/0= X-Google-Smtp-Source: AGHT+IE/fDXgZPuH2ssVzagcLQkDnAxLaiKud9g/Xi2UyAyQeW951fR9Lg6LbVsmqdolrvJlgkFd9C0dnYI1+26/vaM= X-Received: by 2002:a05:6402:34c8:b0:5dc:ebb8:fe64 with SMTP id 4fb4d7f45d1cf-5e5e22daa95mr15426770a12.14.1741640858467; Mon, 10 Mar 2025 14:07:38 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 10 Mar 2025 17:07:38 -0400 From: Stefan Kangas <stefankangas@HIDDEN> MIME-Version: 1.0 Date: Mon, 10 Mar 2025 17:07:38 -0400 X-Gm-Features: AQ5f1JqPFpiKRuOmSnr2v0wI-gRjzpuf5WNVhInVD5HMafzfxqCL65vSdS_F6KE Message-ID: <CADwFkmng==a9bioncQZoq-hzha8-911SbCNCcS31eGuTx_Dteg@HIDDEN> Subject: control message for bug #76788 To: control <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 76788 wishlist quit
X-Loop: help-debbugs@HIDDEN Subject: bug#76788: treesit-thing-settings for elixir-ts-mode Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 10 Apr 2025 16:38:02 +0000 Resent-Message-ID: <handler.76788.B76788.174430305811677 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 76788 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Wilhelm Kirschbaum <wkirschbaum@HIDDEN> Cc: 76788 <at> debbugs.gnu.org Received: via spool by 76788-submit <at> debbugs.gnu.org id=B76788.174430305811677 (code B ref 76788); Thu, 10 Apr 2025 16:38:02 +0000 Received: (at 76788) by debbugs.gnu.org; 10 Apr 2025 16:37:38 +0000 Received: from localhost ([127.0.0.1]:46507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u2uuH-00032F-Lm for submit <at> debbugs.gnu.org; Thu, 10 Apr 2025 12:37:37 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46673) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1u2uuB-00031l-RN; Thu, 10 Apr 2025 12:37:32 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 3E5A042EF2; Thu, 10 Apr 2025 16:37:23 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> In-Reply-To: <CAOS0-35EPsQyrxohoDWDR0aSrNh6jexs+vKU26b-F8YcoM7sXA@HIDDEN> Organization: LINKOV.NET References: <87o6yedo5f.fsf@HIDDEN> <CAOS0-35EPsQyrxohoDWDR0aSrNh6jexs+vKU26b-F8YcoM7sXA@HIDDEN> Date: Thu, 10 Apr 2025 19:35:03 +0300 Message-ID: <87v7rc2cw8.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtdelgeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepfedprhgtphhtthhopegtohhnthhrohhlseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepjeeijeekkeesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopeifkhhirhhstghhsggruhhmsehgmhgrihhlrdgtohhm X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) close 76788 31.0.50 thanks On Mon, Mar 10 2025, Wilhelm Kirschbaum wrote: > I will have a look at this early this week. The forward-sexp was added very > early, so there is perhaps a better way now. Indeed, there is a better way now, so I adapted it. BTW, I was a surprise that only elixir can embed heex, but not vice versa. So I tried to embed elixir in heex using injections.scm queries from tree-sitter-heex repo: #+begin_src emacs-lisp (define-derived-mode heex-ts-mode html-mode "HEEx" ... (setq-local treesit-range-settings (treesit-range-rules :embed 'elixir :host 'heex '((directive [(partial_expression_value) (ending_expression_value)] @cap)) :embed 'elixir :host 'heex :local t '((directive (expression_value) @cap) (expression (expression_value) @cap)))) #+end_src together with combined treesit-font-lock-settings/feature-list. And these ranges work nicely only separately, but not when combined. So need to investigate more. Maybe will create a new report.
Received: (at control) by debbugs.gnu.org; 10 Apr 2025 16:37:38 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 10 12:37:38 2025 Received: from localhost ([127.0.0.1]:46509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u2uuI-00032N-19 for submit <at> debbugs.gnu.org; Thu, 10 Apr 2025 12:37:38 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46673) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1u2uuB-00031l-RN; Thu, 10 Apr 2025 12:37:32 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 3E5A042EF2; Thu, 10 Apr 2025 16:37:23 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Wilhelm Kirschbaum <wkirschbaum@HIDDEN> Subject: Re: bug#76788: treesit-thing-settings for elixir-ts-mode In-Reply-To: <CAOS0-35EPsQyrxohoDWDR0aSrNh6jexs+vKU26b-F8YcoM7sXA@HIDDEN> Organization: LINKOV.NET References: <87o6yedo5f.fsf@HIDDEN> <CAOS0-35EPsQyrxohoDWDR0aSrNh6jexs+vKU26b-F8YcoM7sXA@HIDDEN> Date: Thu, 10 Apr 2025 19:35:03 +0300 Message-ID: <87v7rc2cw8.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtdelgeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepfedprhgtphhtthhopegtohhnthhrohhlseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepjeeijeekkeesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopeifkhhirhhstghhsggruhhmsehgmhgrihhlrdgtohhm X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control Cc: 76788 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) close 76788 31.0.50 thanks On Mon, Mar 10 2025, Wilhelm Kirschbaum wrote: > I will have a look at this early this week. The forward-sexp was added very > early, so there is perhaps a better way now. Indeed, there is a better way now, so I adapted it. BTW, I was a surprise that only elixir can embed heex, but not vice versa. So I tried to embed elixir in heex using injections.scm queries from tree-sitter-heex repo: #+begin_src emacs-lisp (define-derived-mode heex-ts-mode html-mode "HEEx" ... (setq-local treesit-range-settings (treesit-range-rules :embed 'elixir :host 'heex '((directive [(partial_expression_value) (ending_expression_value)] @cap)) :embed 'elixir :host 'heex :local t '((directive (expression_value) @cap) (expression (expression_value) @cap)))) #+end_src together with combined treesit-font-lock-settings/feature-list. And these ranges work nicely only separately, but not when combined. So need to investigate more. Maybe will create a new report.
X-Loop: help-debbugs@HIDDEN Subject: bug#76788: treesit-thing-settings for elixir-ts-mode Resent-From: Wilhelm Kirschbaum <wkirschbaum@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 15 Apr 2025 07:02:02 +0000 Resent-Message-ID: <handler.76788.B76788.174470047412022 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 76788 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov <juri@HIDDEN>, 76788 <at> debbugs.gnu.org Received: via spool by 76788-submit <at> debbugs.gnu.org id=B76788.174470047412022 (code B ref 76788); Tue, 15 Apr 2025 07:02:02 +0000 Received: (at 76788) by debbugs.gnu.org; 15 Apr 2025 07:01:14 +0000 Received: from localhost ([127.0.0.1]:50263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u4aID-00037q-Gm for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 03:01:13 -0400 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:57511) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <wkirschbaum@HIDDEN>) id 1u4aI9-00037U-GH for 76788 <at> debbugs.gnu.org; Tue, 15 Apr 2025 03:01:12 -0400 Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-47686580529so54795581cf.2 for <76788 <at> debbugs.gnu.org>; Tue, 15 Apr 2025 00:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744700463; x=1745305263; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=x/lLMX8yuUF0K9mjES8ZcDKT/yjqziiVTcDIgES8wBE=; b=bluOi6bRtOkGCWRGhlkuncmVLSVzsL67vHByD0xwSNs9xKDjHrJSfr9AaIG/cQBizG sd2EujJ3IflqWQKqx0xQFrcwmPaSzyzZhDeVZdOBPC0twom0lMHwR0hV+ackqzAO7Lyp 13iQHKSd9dV10MF74uICbb3la4rQyhX/hehQgy6R6QYYpKW62cL6x1wwOJDh87NRwFnj gR86TnFxW4tL0LuFuJXi2QuP4ekkbgES+QrTe2zaVsKaXWfNDfQ+djmxRUsu+BP8l13m fVVonYJv+H4Q0uygOj+ZIdVJv1y4wTrT8pDyHUPxvw8TejfKoj4Klc4E0wAYqGhm7lWr dwGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744700463; x=1745305263; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=x/lLMX8yuUF0K9mjES8ZcDKT/yjqziiVTcDIgES8wBE=; b=NB1Rl0GOeOquu6Pc3xnoKdQjAMqg/ffyyzTgiwcHSbBOSlhoS5oymQhAePJdo4cKb8 pkcZwvCJrti9quPZwPRb/tc+LVgt2xFaC6ifgLfRKXjhFygrEWKVqBvm1jRx1yzA/0Hz PT7WvB9bnsVFbsxWHk6unUNxdGO52Q1n9xpxQoUrlKMk1cO62ljlh7Zxv3zQFrrDuXhM T4D3Yd05apurvHPRPUS81GfCPIt8tiALY6M4cgzx2dwZOfXeBFIAo5fAovanmvQLu1nJ KwWnfLME1ev9aH+YXgXTKszLOIsAEGcQop4fWY2J46IAXvJ9ttNXFuL0y2gHY8mU3v6C fQHg== X-Forwarded-Encrypted: i=1; AJvYcCX7lXqfMrdZ+w6JQWgZAZQElVhtFXnn7HsepCf5rP4u20Ycpl3SqaUqSoQZ0o+4Cwhz9IYjMQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yz21rMkyOz2FqZLCEjPDOgI8nRSQSG+WGqBm5Vtw/cSAjbR+PRT OfWWExiJKIJbHTin4S2YWGf4S83ePodRpdBdTlJlpkrXxO383mvakaaMm9feKIU4HtzhTbowpMQ bSDRRH8LcoMQs8+1dfeMVFkOtyL3F1eJr X-Gm-Gg: ASbGncuAcCWsUHFLjlAavze2tz6NaASTmxXWPI5GhXFdWMWLkOX+exPHMDT5owxR7Ju MnBBp1LZ6OtLpH1DOIHQOwq3h7efEnqmRDUSBB/5b8VnZ+F9AmKXw+b+1nkDCDcT4hXjNk3md4Q VAhlvsv1zAUxxJgv3wYFEro78= X-Google-Smtp-Source: AGHT+IG+0+AVMsOeScYyovpPIIyVKETp+TKoVQYoaAS22NBPM91u/FTeuPXcOyOlOS47egNmxcwiU8IzYJyDLk7hu20= X-Received: by 2002:ac8:5a8f:0:b0:476:9ec4:5006 with SMTP id d75a77b69052e-479775d5e5fmr229011221cf.37.1744700463365; Tue, 15 Apr 2025 00:01:03 -0700 (PDT) MIME-Version: 1.0 References: <87o6yedo5f.fsf@HIDDEN> <CAOS0-35EPsQyrxohoDWDR0aSrNh6jexs+vKU26b-F8YcoM7sXA@HIDDEN> <87v7rc2cw8.fsf@HIDDEN> <CAOS0-35a+XUu2Cmmaq4jyOB2rcqwHAGMzvKXcOgGnvswJOmXGA@HIDDEN> <CAOS0-35hegL3GjC+VN-seHUdpq1s4kq_uRd07T-BHN1_Np4kzw@HIDDEN> <877c3m4qpg.fsf@HIDDEN> In-Reply-To: <877c3m4qpg.fsf@HIDDEN> From: Wilhelm Kirschbaum <wkirschbaum@HIDDEN> Date: Tue, 15 Apr 2025 09:00:52 +0200 X-Gm-Features: ATxdqUHtGcyYes8ZcdT12eYVww24l6SBGNjwrLuqEjm3K7Zl44FiRW8XFTRDeNs Message-ID: <CAOS0-35fBc_y3f8tMqJ-GUhfJeSzwBS1-9_OV7-h7B3as7aygw@HIDDEN> Content-Type: multipart/alternative; boundary="0000000000005bc4a60632cbbb1d" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --0000000000005bc4a60632cbbb1d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 14, 2025 at 7:08=E2=80=AFPM Juri Linkov <juri@HIDDEN> wrote= : > > I just tested the latest changes and the forward-sexp is not working > > correctly. I will look at the changes when I have a minute. > > Previously C-M-f jumped from "def" to "end": > Yes, this is desired. The expression starts with "def" and the do -> end is just an argument to the "def" macro. > > def fun(a) do > end > > The change is to jump only from "do" to "end" like in other ts-modes. > Why is this better? The one huge advantage that elixir-ts-mode brought to the table was to navigate between functions, the existing elixir-mode could not get this right. Before the changes it is possible to navigate or kill the next x functions, now it is unpredictable. The Elixir grammar is a bit more complicated than most other languages unfortunately. > > To keep jumping from "def" to "end" a possible change is to add > > (or (and "\\`call\\'" ,#'elixir-ts--defun-p) > > to the 'list' thing in 'treesit-thing-settings'. > It's not just for the "def" to "end" this change breaks forward-sexp for function calls, case blocks etc... > > But there is a new command 'treesit-cycle-sexp-type' > that switches from jumping "do"->"end" to "def"->"end". > I don't see any scenario where this will be useful to navigate Elixir code. Apologies, I see I replied to you directly and not to the thread. Added the thread again. --0000000000005bc4a60632cbbb1d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><div class=3D"gmail_quote gmail= _quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Apr 14, 202= 5 at 7:08=E2=80=AFPM Juri Linkov <<a href=3D"mailto:juri@HIDDEN">jur= i@HIDDEN</a>> wrote:<br></div><blockquote class=3D"gmail_quote" styl= e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin= g-left:1ex">> I just tested the latest changes and the forward-sexp is n= ot working<br> > correctly. I will look at the changes when I have a minute. <br> <br> Previously C-M-f jumped from "def" to "end":<br></block= quote><div><br></div><div>Yes, this is desired. The expression starts with = "def" and the do -> end is just an argument to the "def&q= uot; macro.=C2=A0=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"mar= gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1= ex"> <br> =C2=A0 def fun(a) do<br> =C2=A0 end<br> <br> The change is to jump only from "do" to "end" like in o= ther ts-modes.<br></blockquote><div><br></div><div>Why is this better? The = one huge advantage that elixir-ts-mode brought to the table was to navigate= between functions, the existing elixir-mode could not get this right.=C2= =A0</div><div>Before the changes it is possible to navigate or kill the nex= t x functions, now it is unpredictable. The Elixir grammar is a bit more co= mplicated than most other languages unfortunately.=C2=A0</div><div>=C2=A0</= div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bor= der-left:1px solid rgb(204,204,204);padding-left:1ex"> <br> To keep jumping from "def" to "end" a possible change i= s to add<br> <br> =C2=A0 (or (and "\\`call\\'" ,#'elixir-ts--defun-p)<br> <br> to the 'list' thing in 'treesit-thing-settings'.<br></block= quote><div><br></div><div>It's not just for the "def" to &quo= t;end" this change breaks forward-sexp for function calls, case blocks= etc...</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"ma= rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:= 1ex"> <br> But there is a new command 'treesit-cycle-sexp-type'<br> that switches from jumping "do"->"end" to "def&= quot;->"end".<br></blockquote><div><br></div><div>I don't = see any scenario where this will be useful to navigate Elixir code.=C2=A0</= div><div><br></div><div><br></div><div>Apologies, I see I replied to you di= rectly and not to the thread.=C2=A0 Added the thread again.=C2=A0</div></di= v></div> --0000000000005bc4a60632cbbb1d--
X-Loop: help-debbugs@HIDDEN Subject: bug#76788: treesit-thing-settings for elixir-ts-mode Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 15 Apr 2025 17:38:04 +0000 Resent-Message-ID: <handler.76788.B76788.174473867326251 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 76788 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Wilhelm Kirschbaum <wkirschbaum@HIDDEN> Cc: 76788 <at> debbugs.gnu.org Received: via spool by 76788-submit <at> debbugs.gnu.org id=B76788.174473867326251 (code B ref 76788); Tue, 15 Apr 2025 17:38:04 +0000 Received: (at 76788) by debbugs.gnu.org; 15 Apr 2025 17:37:53 +0000 Received: from localhost ([127.0.0.1]:54946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u4kEK-0006pH-JW for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 13:37:53 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:45469) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1u4kEH-0006nQ-Cm for 76788 <at> debbugs.gnu.org; Tue, 15 Apr 2025 13:37:50 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 75A0543290; Tue, 15 Apr 2025 17:37:41 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> In-Reply-To: <CAOS0-35fBc_y3f8tMqJ-GUhfJeSzwBS1-9_OV7-h7B3as7aygw@HIDDEN> Organization: LINKOV.NET References: <87o6yedo5f.fsf@HIDDEN> <CAOS0-35EPsQyrxohoDWDR0aSrNh6jexs+vKU26b-F8YcoM7sXA@HIDDEN> <87v7rc2cw8.fsf@HIDDEN> <CAOS0-35a+XUu2Cmmaq4jyOB2rcqwHAGMzvKXcOgGnvswJOmXGA@HIDDEN> <CAOS0-35hegL3GjC+VN-seHUdpq1s4kq_uRd07T-BHN1_Np4kzw@HIDDEN> <877c3m4qpg.fsf@HIDDEN> <CAOS0-35fBc_y3f8tMqJ-GUhfJeSzwBS1-9_OV7-h7B3as7aygw@HIDDEN> Date: Tue, 15 Apr 2025 20:30:34 +0300 Message-ID: <87h62pcp2x.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvvdegudduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepvddprhgtphhtthhopeejieejkeekseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepfihkihhrshgthhgsrghumhesghhmrghilhdrtghomh X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) > Previously C-M-f jumped from "def" to "end": > > Yes, this is desired. The expression starts with "def" and the do -> end is > just an argument to the "def" macro. > > def fun(a) do > end > > The change is to jump only from "do" to "end" like in other ts-modes. > > Why is this better? Because otherwise there is no easy way to navigate to the function name and its arguments. There were many complaints that unlike smie-based sexp now tree-sitter jumps too far directly to the end of functions. So sadly an idealistic promise of tree-sitter doesn't fit perfectly into the real world. For many years I used elixir-mode before switching to elixir-ts-mode. And it caused a minor disruption by the inability to move to the function name and arguments as before in elixir-mode. > The one huge advantage that elixir-ts-mode brought to > the table was to navigate between functions, the existing elixir-mode could > not get this right. The new command 'treesit-cycle-sexp-type' keeps this advantage while allowing the users to toggle the traditional behavior where C-M-f moves over the arguments. > Before the changes it is possible to navigate or kill the next x functions, > now it is unpredictable. The Elixir grammar is a bit more complicated than > most other languages unfortunately. This is still possible with 'treesit-cycle-sexp-type'.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.