From unknown Mon Aug 18 14:26:43 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#67007 <67007@debbugs.gnu.org> To: bug#67007 <67007@debbugs.gnu.org> Subject: Status: 29.1.90; treesit-simple-indent-presets example on match Reply-To: bug#67007 <67007@debbugs.gnu.org> Date: Mon, 18 Aug 2025 21:26:43 +0000 retitle 67007 29.1.90; treesit-simple-indent-presets example on match reassign 67007 emacs submitter 67007 Maxim Kim severity 67007 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 08 21:58:57 2023 Received: (at submit) by debbugs.gnu.org; 9 Nov 2023 02:58:57 +0000 Received: from localhost ([127.0.0.1]:46496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0vFx-0005u7-2j for submit@debbugs.gnu.org; Wed, 08 Nov 2023 21:58:57 -0500 Received: from lists.gnu.org ([2001:470:142::17]:53508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0vFs-0005tl-2b for submit@debbugs.gnu.org; Wed, 08 Nov 2023 21:58:55 -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 ) id 1r0vF9-0000hl-C1 for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 21:58:07 -0500 Received: from mail-ot1-x32a.google.com ([2607:f8b0: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 1r0vEr-0007Wv-KF for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 21:58:06 -0500 Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-6d30d9f4549so209669a34.0 for ; Wed, 08 Nov 2023 18:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699498666; x=1700103466; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=XabkV4wcqdyYYtPwCkixsX3GJu4Pli+aegbZ8OT/THc=; b=haBsr6YuBVxCDLcW1MYoAY4ZOYDKgq9T6fgI0AWixnYpMx8IIAtaBUwTJuRnibH0gy 3w6LW50x9gnaGuFxqgOIn5WRddZZ66onsoToMWDzsM3IXHQMXmHKl9ssYnFrn29rtqMo 05qPLryEnT0UAJlZsP+2WcWxM6hir70s/i/+qyvCir+Fv29nLqE/Gnn2FGvHJljGyeW0 HritKtX4CbGbXjZgxweG+DplyBmWGn0m236Y+L4fKpa9SBuHM5j61DC7n9TH8n4RgIS9 BosPrMRmniVrOenuQBLzJDrO22d1Fc7Bj8k5rkWfYGTRtwY1vYLTXTMdaGIK/K75lPFA M22A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699498666; x=1700103466; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XabkV4wcqdyYYtPwCkixsX3GJu4Pli+aegbZ8OT/THc=; b=IP3Cd0Nr3zlt13HXDA0opY5oAOmDxOKbGQlPr23nqsmtNzXmYLwW+b+18YrR2E0Y8H BohytTYc8nLZyuJpZxsUT21exnAYjqKlCAQ+04MO7aJfDTnR6i8JVZrwrVaM4V8g/+Up c6DQxdM5nS297zEgMA15ANxSwBj+qD2O8NXkytrFlL7ox83yYqR77RvCrFxTO7FsPtMT 3BLvO9tsMVdoEgU+yWyHfBzK5b06FudM1xwQtARi0km67+psM8VSq8CuKcSJeKNKx1Zb idQFrFwQEG+IBHB/GFD6OMEx1U/d8GlwGaIv9oEjJ8g+NrOzkpoOD11WoTapWMq1d0// KLDA== X-Gm-Message-State: AOJu0YzLtnfOlP0ZPPHJKMcozO3AKDlD8c7py2R4OeVxw+emW39EEJ4R /f8Nu5dvdwmnjPLwfAPlT8JzucWOunU= X-Google-Smtp-Source: AGHT+IH+XSxyjF/wYZg8guTm0zgK0XsmnEZO0xG+ZWuL9NUx9KU3fLwgG8oNLMB/IW0EsWKWx7idog== X-Received: by 2002:a05:6830:4394:b0:6bd:ba2c:fbbd with SMTP id s20-20020a056830439400b006bdba2cfbbdmr4772935otv.20.1699498666176; Wed, 08 Nov 2023 18:57:46 -0800 (PST) Received: from AUWW00125 ([202.138.73.130]) by smtp.gmail.com with ESMTPSA id 34-20020a630c62000000b005b83bc255fbsm3696824pgm.71.2023.11.08.18.57.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 18:57:45 -0800 (PST) From: Maxim Kim To: bug-gnu-emacs@gnu.org Subject: 29.1.90; treesit-simple-indent-presets example on match Date: Thu, 09 Nov 2023 13:40:21 +1100 Message-ID: <87h6lvr6ne.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::32a; envelope-from=habamax@gmail.com; helo=mail-ot1-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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) While trying to play with treesit indent rules I came across `treesit-simple-indent-presets' where I believe example given is wrong: C-x o treesit-simple-indent-presets RET ---- (match NODE-TYPE PARENT-TYPE NODE-FIELD NODE-INDEX-MIN NODE-INDEX-MAX) NODE-TYPE checks for NODE=E2=80=99s type, PARENT-TYPE checks for PARENT=E2=80=99s type, NODE-FIELD checks for the field name of NODE in PARENT, NODE-INDEX-MIN and NODE-INDEX-MAX check for NODE=E2=80=99s index in PARENT. Therefore, to match the first child where PARENT is "argument_list", use (match nil "argument_list" nil nil 0 0). ---- (match NODE-TYPE PARENT-TYPE NODE-FIELD NODE-INDEX-MIN NODE-INDEX-MAX) (match nil "argument_list" nil nil 0 = 0). 5 args in signature vs 6 in example. In GNU Emacs 29.1.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-10-20 built on AUWW00125 Repository revision: 62920dcb0de440aac8e7d69ee33f27d5400d405e Repository branch: emacs-29 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --prefix=3D/home/habamax/.local --with-pgtk --with-native-compilation=3Daot --with-json --with-tree-sitter' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Help Minor modes in effect: marginalia-mode: t vertico-mode: t winner-mode: t override-global-mode: t pixel-scroll-precision-mode: t savehist-mode: t save-place-mode: t delete-selection-mode: t electric-pair-mode: t repeat-mode: t shell-dirtrack-mode: t recentf-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t isearch-fold-quotes-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t abbrev-mode: t Load-path shadows: /home/habamax/.config/emacs/elpa/transient-20231103.2312/transient hides /h= ome/habamax/.local/share/emacs/29.1.90/lisp/transient Features: (shadow sort emacsbug mail-extr message sendmail yank-media dired dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader pp cl-print habamax-gdscript gdscript-mode gdscript-eglot gdscript-hydra gdscript-godot gdscript-project gdscript-history gdscript-comint gdscript-debug bindat gdscript-format gdscript-comint-gdformat gdscript-completion gdscript-fill-paragraph gdscript-imenu gdscript-indent-and-nav gdscript-rx gdscript-utils gdscript-syntax inline gdscript-keywords gdscript-docs habamax-eww eww xdg url-queue shr pixel-fill kinsoku url-file svg xml dom puny mm-url gnus nnheader gnus-util mail-utils range mm-util mail-prsvr gdscript-customization gdscript-ts-mode derived shortdoc treesit mule-util thingatpt help-fns radix-tree add-log log-view pcvs-util compile text-property-search vc vc-git diff-mode vc-dispatcher orderless comp comp-cstr warnings icons time term/xterm xterm rainbow-delimiters disp-table whitespace company-oddmuse company-keywords company-etags etags fileloop generator xref project company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-capf company-cmake company-semantic company-template company-bbdb company use-package-diminish marginalia vertico compat finder-inf diminish winner use-package-ensure edmacro kmacro cl-extra help-mode use-package-bind-key bind-key easy-mmode use-package-core pixel-scroll cua-base savehist saveplace delsel elec-pair repeat tramp-cache time-stamp tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat rx shell pcomplete comint ansi-osc ring parse-time iso8601 time-date format-spec ansi-color recentf tree-widget wid-edit company-autoloads devdocs-autoloads diminish-autoloads elfeed-autoloads embark-autoloads emms-autoloads gdscript-mode-autoloads htmlize-autoloads iedit-autoloads magit-autoloads pcase git-commit-autoloads magit-section-autoloads dash-autoloads marginalia-autoloads markdown-mode-autoloads orderless-autoloads rainbow-delimiters-autoloads rainbow-mode-autoloads sly-autoloads tempel-autoloads transient-autoloads verb-autoloads vertico-autoloads webpaste-autoloads request-autoloads wgrep-autoloads with-editor-autoloads info compat-autoloads xclip-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib nocharm-p-theme rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 308567 149303) (symbols 48 20983 10) (strings 32 71158 9845) (string-bytes 1 2880013) (vectors 16 34669) (vector-slots 8 623575 243279) (floats 8 240 350) (intervals 56 1713 204) (buffers 984 16)) From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 09 02:51:00 2023 Received: (at 67007-done) by debbugs.gnu.org; 9 Nov 2023 07:51:00 +0000 Received: from localhost ([127.0.0.1]:46740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0zoa-00082D-5b for submit@debbugs.gnu.org; Thu, 09 Nov 2023 02:51:00 -0500 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:42077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0zoX-00081w-Je for 67007-done@debbugs.gnu.org; Thu, 09 Nov 2023 02:50:58 -0500 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6bd73395bceso531101b3a.0 for <67007-done@debbugs.gnu.org>; Wed, 08 Nov 2023 23:50:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699516212; x=1700121012; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=i4X9YTdl7CpaxpuxUPQ0AuuqvF9aSiT1PjxgbK067RM=; b=S97HwYKSzU7uOIsIuPmlUgzSb8TJ8gBEIO/kVzFDt1cQRPbAdLlE9Qsji62gXvlFn3 clfF0af1k3AERT7LdSKm0O54aoaRsGf8hTtYdmCXrhbsm9upXJhDVIAaFYN3jUy1+ZHA XXsyowzsr7uVKiUhxck/iYJhFxaJWxp1Ee6MA/gL2hV4r8PU6mla20cQ++OSuJt3y0Oq /7z1BDvtwifFlysdVPJ/FTsDGYBOBwCYSUunwUXgaB9UMD4DABJnEzUcr+duay1GPuy1 6RutiTG3RcBmUVoZKI/33I7ntEwoS1Oy8YEDbsNOAahce84YLkyuMlaj5W+trKPNk4bD irTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699516212; x=1700121012; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i4X9YTdl7CpaxpuxUPQ0AuuqvF9aSiT1PjxgbK067RM=; b=ELn8SPHWVKwcmMcNE3UWKsilOvtkeL9JeQ3OlHZRLpIJjaK23MmiBUeobhLq/0tW53 3IPT/MJEzEGnaKtQdAbmhYWCEtoYC1+454rekdG/IiKs9d482GqaKFf8Pd80v1AKSz1q UBCKBqaEkWVM96Tztfy5w6TZzCYeww4576JfqzAv79kuPQSOwpbU4i3j/VbY5Zy9ytaj XeCc15wJCwo9oCKjdOKzDiM7l/RZj4zQ/5wUeoQ952gdsfy+yLfv4GPAUCFF+l4sksGt HJiIgnwdehvrlVTgWG2HFfxFKfXpzKittTOyuY/T+zrk8jG1fkMT+cJwhBtXoF2NVhBW dlGA== X-Gm-Message-State: AOJu0Yw9FkkQaImGXWZ4BtXtttuIF3o868+GAT6w5ietOTZ8ikFL/mAh TYX8x4J6CHlEKKYu20hR+h0= X-Google-Smtp-Source: AGHT+IGT8ZF1M87IaIFxVQzJF3bBxsTewaFoUBqmwXIeyKQK4Mc3nH8U+U6QFq3bc6t8mdnVcx+hFQ== X-Received: by 2002:aa7:8514:0:b0:68f:cbd3:5b01 with SMTP id v20-20020aa78514000000b0068fcbd35b01mr5767171pfn.13.1699516212620; Wed, 08 Nov 2023 23:50:12 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id k76-20020a636f4f000000b005b529d633b7sm4058535pgc.14.2023.11.08.23.50.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Nov 2023 23:50:12 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: bug#67007: 29.1.90; treesit-simple-indent-presets example on match From: Yuan Fu In-Reply-To: <87h6lvr6ne.fsf@gmail.com> Date: Wed, 8 Nov 2023 23:50:01 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87h6lvr6ne.fsf@gmail.com> To: Maxim Kim X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 67007-done Cc: 67007-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Nov 8, 2023, at 6:40 PM, Maxim Kim wrote: >=20 >=20 > While trying to play with treesit indent rules I came across > `treesit-simple-indent-presets' where I believe example given is = wrong: >=20 > C-x o treesit-simple-indent-presets RET > ---- > (match NODE-TYPE PARENT-TYPE NODE-FIELD NODE-INDEX-MIN NODE-INDEX-MAX) >=20 > NODE-TYPE checks for NODE=E2=80=99s type, PARENT-TYPE checks for > PARENT=E2=80=99s type, NODE-FIELD checks for the field name of NODE > in PARENT, NODE-INDEX-MIN and NODE-INDEX-MAX check for > NODE=E2=80=99s index in PARENT. Therefore, to match the first = child > where PARENT is "argument_list", use >=20 > (match nil "argument_list" nil nil 0 0). > ---- >=20 > (match NODE-TYPE PARENT-TYPE NODE-FIELD NODE-INDEX-MIN = NODE-INDEX-MAX) > (match nil "argument_list" nil nil 0 = 0). >=20 > 5 args in signature vs 6 in example. Good catch. I fixed it on emacs-29. Thank you! Yuan= From unknown Mon Aug 18 14:26:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 07 Dec 2023 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator