GNU bug report logs - #78503
30.0.92; tree-sitter elixir-ts-mode structural movement broken

Previous Next

Package: emacs;

Reported by: Bart Otten <bart.otten85 <at> gmail.com>

Date: Tue, 20 May 2025 04:30:03 UTC

Severity: normal

Found in version 30.0.92

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
Cc: Bart Otten <bart.otten85 <at> gmail.com>, 78503 <at> debbugs.gnu.org
Subject: Re: bug#78503: 30.0.92; tree-sitter elixir-ts-mode structural
 movement broken
Date: Fri, 23 May 2025 21:23:11 +0300
> Hi, sorry for the delay. 
>
> I had a look at the latest changes and it makes sense to me. Thanks again
> Juri :).

This was only the second part.  But what do you think about the
first part about removing `defmodule` from 'C-M-a' defun navigation:

  1.) `defmodule` is considered a function definition and so moving up from the first
  actual function definition `def my_fun do` causes the point to jump to
  'defmodule my_mod do'. Invoking `end-of-defun` jumps to the end of the defmodule block.
  Effectively, you have been ejected from the module body.

  ;; current scoped workaround
  ;; does not jump up to defmodule when using `beginning-of-defun`
  (defun elixir-ts--defun-p (node)
    "Return non-nil when NODE is a defun."
    (member (treesit-node-text
             (treesit-node-child-by-field-name node "target"))
            (append
             (remove "defmodule" elixir-ts--definition-keywords)
             elixir-ts--test-definition-keywords)))




This bug report was last modified 12 days ago.

Previous Next


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