GNU logs - #78503, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#78503: 30.0.92; tree-sitter elixir-ts-mode structural movement broken
Resent-From: Bart Otten <bart.otten85@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 20 May 2025 04:30:03 +0000
Resent-Message-ID: <handler.78503.B.17477153602706 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 78503
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 78503 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.17477153602706
          (code B ref -1); Tue, 20 May 2025 04:30:03 +0000
Received: (at submit) by debbugs.gnu.org; 20 May 2025 04:29:20 +0000
Received: from localhost ([127.0.0.1]:51120 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uHEbP-0000hO-7t
	for submit <at> debbugs.gnu.org; Tue, 20 May 2025 00:29:19 -0400
Received: from lists.gnu.org ([2001:470:142::17]:60380)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <bart.otten85@HIDDEN>)
 id 1uH8ha-0002R1-09
 for submit <at> debbugs.gnu.org; Mon, 19 May 2025 18:11:18 -0400
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 <bart.otten85@HIDDEN>)
 id 1uH8hU-0006Xq-A5
 for bug-gnu-emacs@HIDDEN; Mon, 19 May 2025 18:11:12 -0400
Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <bart.otten85@HIDDEN>)
 id 1uH8hS-0002aD-Ds
 for bug-gnu-emacs@HIDDEN; Mon, 19 May 2025 18:11:11 -0400
Received: by mail-ed1-x534.google.com with SMTP id
 4fb4d7f45d1cf-6000f2f217dso4431055a12.1
 for <bug-gnu-emacs@HIDDEN>; Mon, 19 May 2025 15:11:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1747692667; x=1748297467; darn=gnu.org;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=FzW4R3F38uoD0WXILpL6jMYbnkbZRSPY3dU+gaSb2Sg=;
 b=JwrLsjaqDTr+Lj/DU+FFgCpkcPnkywOuFucEIF8/8aIXjEwzltOKiZA6VjPt88QnGY
 b5R1v0VDjkG2M9ltdJYJkvPYTOURmAblvSTsNW+UtI+xYreQ0o7SYGUsRpZmeTf1fPxU
 u9F1xkFgn8XpWhqcjpB/1cBZzXOvFVhxIO/QrzsoeRjHicYa4NvjX5uszcroVQMbLju6
 WSORz9Lgvdke8cIchUsevUFdq5duluTHeSkJt0r/kNZr6ewXP5BMCiTcaON5XyYyID+C
 75WzOsA63NjIFpOtMYrXAULW6XENdxYcNdzJo/G539QCceETx6dOxZLKrEMunoi9vB0m
 hbog==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1747692667; x=1748297467;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=FzW4R3F38uoD0WXILpL6jMYbnkbZRSPY3dU+gaSb2Sg=;
 b=uyzFeZpswAaT0teYFAdWD1S4iLtzeBckKgny6nr86Ayo3XJlB/CA9BqWBm1ZxQIVVC
 DHYF2ERtdGAJaXlSQMIDnukhBn3YwHVytg+4cRqp++1wELA78wy7BXbgyD3Cq9JSH9aY
 CEVzXXU3Lf0K3nHBchWlpdwPRpzZTAvNpwwvmJjZsqZcnPmy3GsADu1meBZ0Z+Jbzfk+
 smj1lMRrclSmMRoHRRF4kTsR1icG81IQ71UC3++0Y3Nzn8kmbMqr6vT72QduuBX0yahQ
 Y+4opld3RF+OViIBWuph8Sup6sBUlogj2Kx9+FmZo0c3i8XtlvLh9qLPuhINHDjUZ+xX
 U1hg==
X-Gm-Message-State: AOJu0Yxy03cjXuy8Nf4Cnlamr90e8Gg+8K0Rwmtm4jFH7ucjq+4AeLRX
 EUsM0bQf0mBzFGfCW0k9D9aM2YTx419cvBgRYwExaeYl5DA54RZ8GJGHJT2CGQ==
X-Gm-Gg: ASbGncuZyCrsictluPIrep1PLiv+daCkhSy+aZ1tj9ihY55PJAtyNFn+Ek/aXfPys23
 cq+n+yz4TV7FivT+z5Wf7fPwFCuapCGdZfHbyi4GPZzES8OdbmDBzssV7eAz1+ZqAwXndOtZ59F
 ARBLGHzFFUftjQPulm5DebaM9/3us3g4Lan6fURA9ub/wImYnlJdQa8g7LlzL9oDr2dhRIlgaQF
 xonfxzcimUYSGrFHLCl/ZKM4waNhnahBfYDdPf7oQPP3+8MGS3HIBjR/nYvmYNEi7/XJol5kwOP
 gbl1BGzNkKQkMz9Kzuksspq+mS5jzYgBtxtm+pJhZx0OjFEjsdEihzYgGBamRAhltC3lJYOcy3A
 a86YkJq6RZI+ysYGuo47Iqaifi94NmmC7N4z4HQsP7MD1R3FJhvMcsiFYT27moYZIpw==
X-Google-Smtp-Source: AGHT+IFrKWwlaAUya8Yli1nCOorEA/KpxuqS3v1hVkOz15yubQ07yn8IQ9kf46okWkSiras7gmOlhg==
X-Received: by 2002:a05:6402:42d4:b0:5ff:f524:90e0 with SMTP id
 4fb4d7f45d1cf-6008a5a10c5mr13057489a12.11.1747692666809; 
 Mon, 19 May 2025 15:11:06 -0700 (PDT)
Received: from localhost (2a02-a45d-7bea-1-5c2d-42a0-14cf-f29c.fixed6.kpn.net.
 [2a02:a45d:7bea:1:5c2d:42a0:14cf:f29c])
 by smtp.gmail.com with UTF8SMTPSA id
 4fb4d7f45d1cf-6005ac32f9esm6277655a12.55.2025.05.19.15.11.06
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 19 May 2025 15:11:06 -0700 (PDT)
From: Bart Otten <bart.otten85@HIDDEN>
Date: Tue, 20 May 2025 00:10:54 +0200
Message-ID: <m2wmacdzf5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::534;
 envelope-from=bart.otten85@HIDDEN; helo=mail-ed1-x534.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Greetings and salutions, Trying to use elixir treesit mode, 
 it seems the navigation of defun and lists seems broken. 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 [...] 
 Content analysis details:   (1.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (bart.otten85[at]gmail.com)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (bart.otten85[at]gmail.com)
X-Mailman-Approved-At: Tue, 20 May 2025 00:29:16 -0400
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.2 (/)

Greetings and salutions,

Trying to use elixir treesit mode, it seems the navigation of defun and lists seems broken.

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)))


2.) When you use `down-list` while on a function definition line,
nothing happens. I tried to fix it, ony to find out that
`backward-up-list` will jump to `defmodule` when invoked while point is at a
function argument, instead of navigating out of the argument list only.  

Structural movement might need some extra love.

Cheers,
Bart


Major mode: Elixir

Minor modes in effect:
  electric-pair-mode: t
  eglot--managed-mode: t
  exunit-mode: t
  mix-minor-mode: t
  global-org-modern-mode: t
  display-line-numbers-mode: t
  global-treesit-auto-mode: t
  doom-modeline-mode: t
  which-key-mode: t
  org-super-agenda-mode: t
  undo-fu-session-global-mode: t
  undo-fu-session-mode: t
  apprentice-mode: t
  apprentice-hooks-mode: t
  flymake-mode: t
  yas-minor-mode: t
  treesit-inspect-mode: t
  global-visual-wrap-prefix-mode: t
  visual-wrap-prefix-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  prettify-symbols-mode: t





Message sent:


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: Bart Otten <bart.otten85@HIDDEN>
Subject: bug#78503: Acknowledgement (30.0.92; tree-sitter elixir-ts-mode
 structural movement broken)
Message-ID: <handler.78503.B.17477153602706.ack <at> debbugs.gnu.org>
References: <m2wmacdzf5.fsf@HIDDEN>
X-Gnu-PR-Message: ack 78503
X-Gnu-PR-Package: emacs
Reply-To: 78503 <at> debbugs.gnu.org
Date: Tue, 20 May 2025 04:30:03 +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.

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 78503 <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
78503: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78503
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#78503: 30.0.92; tree-sitter elixir-ts-mode structural movement broken
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, 20 May 2025 06:56:02 +0000
Resent-Message-ID: <handler.78503.B78503.174772415810302 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 78503
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Bart Otten <bart.otten85@HIDDEN>
Cc: Wilhelm H Kirschbaum <wkirschbaum@HIDDEN>, 78503 <at> debbugs.gnu.org
Received: via spool by 78503-submit <at> debbugs.gnu.org id=B78503.174772415810302
          (code B ref 78503); Tue, 20 May 2025 06:56:02 +0000
Received: (at 78503) by debbugs.gnu.org; 20 May 2025 06:55:58 +0000
Received: from localhost ([127.0.0.1]:52756 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uHGtJ-0002g2-MC
	for submit <at> debbugs.gnu.org; Tue, 20 May 2025 02:55:58 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:54505)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uHGtG-0002f8-49
 for 78503 <at> debbugs.gnu.org; Tue, 20 May 2025 02:55:55 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id BBE2B43C67;
 Tue, 20 May 2025 06:55:45 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <m2wmacdzf5.fsf@HIDDEN>
Organization: LINKOV.NET
References: <m2wmacdzf5.fsf@HIDDEN>
Date: Tue, 20 May 2025 09:46:34 +0300
Message-ID: <87bjrnn5r5.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: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdefvdefheelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepfedprhgtphhtthhopeejkeehtdefseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepfihkihhrshgthhgsrghumhesghhmrghilhdrtghomhdprhgtphhtthhopegsrghrthdrohhtthgvnhekheesghhmrghilhdrtghomh
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -1.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: -2.7 (--)

> Trying to use elixir treesit mode, it seems the navigation of defun and lists seems broken.
>
> 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 behavior may look logically flawed,
but still it makes sense for user convenience:
while navigating with 'C-M-a' it's handy
to use the same key to move over modules too.

The same navigation exists in other ts-modes as well:
for example, in java-ts-mode 'C-M-a' moves over classes, etc.
OTOH, in ruby-ts-mode it's restricted to methods only.

> 2.) When you use `down-list` while on a function definition line,
> nothing happens. I tried to fix it, ony to find out that
> `backward-up-list` will jump to `defmodule` when invoked while point is at a
> function argument, instead of navigating out of the argument list only.  
>
> Structural movement might need some extra love.

This part is not reproducible.  Do you use the latest master?





Last modified: Tue, 20 May 2025 07:00:02 UTC

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