From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wilhelm Kirschbaum Newsgroups: gmane.emacs.bugs Subject: bug#66183: elixir-ts-mode test failure Date: Wed, 27 Sep 2023 09:17:51 +0200 Message-ID: <874jjgqe2t.fsf@gmail.com> References: <87fs33wiki.fsf@pub.pink> <874jjg51mc.fsf@gmail.com> <87r0mky8iy.fsf@gmail.com> <9B77101A-02DA-4ED2-868C-A2D5AD353AA3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28680"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.3; emacs 30.0.50 Cc: 66183@debbugs.gnu.org, jm@pub.pink, 66183-done@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 27 09:19:18 2023 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 1qlOpK-0007I0-11 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Sep 2023 09:19:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlOp0-00023q-8x; Wed, 27 Sep 2023 03:18:58 -0400 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 1qlOor-00022u-1G for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 03:18:49 -0400 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 1qlOoq-00054e-Go for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 03:18:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qlOp3-0005tE-TF for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 03:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Wilhelm Kirschbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Sep 2023 07:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66183 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: Bug Report Emacs , john muhl , 66183-done@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169579913022619 (code B ref -1); Wed, 27 Sep 2023 07:19:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Sep 2023 07:18:50 +0000 Original-Received: from localhost ([127.0.0.1]:50391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlOor-0005sl-QB for submit@debbugs.gnu.org; Wed, 27 Sep 2023 03:18:50 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:47332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlOoo-0005sH-Jx for submit@debbugs.gnu.org; Wed, 27 Sep 2023 03:18:46 -0400 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 1qlOoU-00020S-D3 for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 03:18:26 -0400 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qlOoT-0004tu-0o for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 03:18:26 -0400 Original-Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-405505b07dfso50788505e9.0 for ; Wed, 27 Sep 2023 00:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695799103; x=1696403903; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=ToCGF0XzI994cXejTR8G5/Jbw23XEqL/rK0QPxWAzXY=; b=Kk3iE/fy5W43DQ1WzO89E8QutalAHIfr/OsNtVoL08yLNu6xa0k8SSpzJzQDzivddE ihMsvNoHOhP9UsT2srwoI4+vmOExXiv4JSV4o9lUQuqctBSqt0xJ2oylKrgxUxHXmxhd 3R9Pz5rg1AvGbwMrJCJxb7TlZH5hiQAiSqooUWHt/XsXGLbM6XBuQqYqCEYcZTJvlXV/ p7Mmf7bGtcVjtHRWkXpM0a9y6oVIterTjMk7PfLsPHMOihIM/AaUsQoPFv9IKTMuv2Nw 7M+DbnZPcgBC+S4yUL9QIEaoT8mv3J12j0GnKCANdG4sMAJG8XPX104K3ankgP9q/nEP DiJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695799103; x=1696403903; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ToCGF0XzI994cXejTR8G5/Jbw23XEqL/rK0QPxWAzXY=; b=QXILoCwYynjL/eeKzeEMZK4e3YgqjDJnSNAVL3+ppXrxkAgFfaClWFFMPYD/pBD+dn qlSmzU8stkSa54ThxLzvLXEpGk37QE+8iHvicxDu+xsuqpIRvyFnVzFHziqEP+G3ZpY7 36HDJ+0h/OG7FzM5j0O0270LMAexrjrpdL4kBuk35RtHHCm0pSeOnKR37w1lDQL+uG86 9PKirdfbg69aYQ0GF2Hwg5U9p/YeE6SpH7Mv41F/LlcI1XHOVfhT8hHSv9J+xHhs8SQx BSVADVw1ZLC9Var88ZcDfXsaMzhTlowBFuLAHxUPIPmlailXScokrarzER8DgCPAvKPJ ycSw== X-Gm-Message-State: AOJu0YyOzv1PUHBNuCynWBwtYqW63MtRn7Xv9Zy9BDlZr8Te9CeSgQ3g hceNXD+llg4YIp2WFvid1IFAOIpRgxvVUP4t X-Google-Smtp-Source: AGHT+IGH2Urla5Un2b8pc9Q4WWuClsF04l1CjdkoDEdFLVSP5HFXhVgMo2cy1Hmzto6xITwfl6pOag== X-Received: by 2002:a5d:5107:0:b0:31f:eb45:462e with SMTP id s7-20020a5d5107000000b0031feb45462emr884800wrt.28.1695799102879; Wed, 27 Sep 2023 00:18:22 -0700 (PDT) Original-Received: from melissa.local ([2c0f:ef18:1431:0:b09:9616:db04:c248]) by smtp.gmail.com with ESMTPSA id o11-20020a5d4a8b000000b0031fc4c31d77sm16556291wrq.88.2023.09.27.00.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 00:18:22 -0700 (PDT) In-reply-to: <9B77101A-02DA-4ED2-868C-A2D5AD353AA3@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=wkirschbaum@gmail.com; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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-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:271410 Archived-At: Yuan Fu writes: >> On Sep 26, 2023, at 1:26 PM, Wilhelm Kirschbaum=20 >> wrote: >>=20 >>>>> need to adjust it but the idea is there. >>>>> With the new language-at-point definition,=20 >>>>> treesit-language-at can >>>>> return the correct language, and the test passes again. >>>>> Yuan >>>>> [2. text/x-patch; example.diff]... >>>> This seems to work if you set named on:=20 >>>> treesit-node-prev-sibling, >>>> otherwise it just tries to match the \"\"\" against H or F. >>>> (let* ((node (treesit-node-at point 'elixir))) >>>> (if (and (equal (treesit-node-type node) "quoted_content") >>>> (string-match-p >>>> (rx bos (or "H" "F") eos) >>>> - (treesit-node-text (treesit-node-prev-sibling=20 >>>> node)))) >>>> + (treesit-node-text (treesit-node-prev-sibling=20 >>>> node t)))) >>>> 'heex >>>> 'elixir))) >>>> I will spend some time in the next couple of hours to catch=20 >>>> up to all >>>> the changes. >>>=20 >>> Ah, right. I=E2=80=99ll leave the specifics to you. As long as the=20 >>> language >>> is derived from the node at point rather than parser range, it=20 >>> will >>> be fine. Also, there=E2=80=99s no rush. >>>=20 >>=20 >> Hi Yuan, >>=20 >> With the new changes I had to update some indentation rules as=20 >> well. >> The following patch was tested against a couple of elixir=20 >> files. >>=20 >> There is another indentation issue with HEEx embeds, but think=20 >> its >> unrelated to this issue and will have a look this weekend. >>=20 > > [2. text/x-patch;=20 > 0001-Fix-treesit-langauge-at-point-for-elixir-ts-mode.patch]... > >>=20 >> Wilhelm > > Thanks. I made some minor change and pushed to master. > > Yuan Fantastic, thanks!