From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior Resent-From: Brian Leung Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Dec 2022 06:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 59853@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167030770412233 (code B ref -1); Tue, 06 Dec 2022 06:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Dec 2022 06:21:44 +0000 Received: from localhost ([127.0.0.1]:40900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2RKo-0003BF-S5 for submit@debbugs.gnu.org; Tue, 06 Dec 2022 01:21:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:46324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2RKl-0003B8-Ky for submit@debbugs.gnu.org; Tue, 06 Dec 2022 01:21:41 -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 1p2RKl-0007aH-Fi for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 01:21:39 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2RKh-000803-Hd for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 01:21:39 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 59FB0240103 for ; Tue, 6 Dec 2022 07:21:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1670307685; bh=o1zFCDwePOcNaWHss8Qos+f4+Bfo0oZICI1x/QwXSOU=; h=From:To:Subject:Date:From; b=R3koNRhOyThVAaAlyPq8uZYkAUQ3eRoCx8+AuTaKcwfn0bLW5Y/Jt5Zdvd5IDBFQK wcinUZ3aoZsqNV7ezr6zOwdqxgQVvGOe6sEWSgR4S/gq0CpYIWsx6ZsErfoMRZ3g5Z 8uJfF8wM88HaoRvAsr5nZExYuBrQdgM6jLgvAPOzpt6PbdFDMkiesgvjqebsgzOCIb lzvRZd7DyE50FKPiw11yBL2UBGTadsqcZePplzWBHFd0YfsOkIioHvQrvg2Lb3jXwV Gj7M0CkNhJEcQWRa4zDz9mfX3ROMJpCZppX++4s+YvX+VgkP5POmFccy0kCz1v890b C8bU4NUBZHyag== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NR9Kc1lX5z9rxF for ; Tue, 6 Dec 2022 07:21:23 +0100 (CET) From: Brian Leung Date: Tue, 06 Dec 2022 06:21:18 +0000 Message-ID: <87lenlnjc1.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=leungbk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) Given the following Java file: public abstract class Class { public static interface Interface { void someMethod(); void [o]therMethod(); } } If point is at the "o" in otherMethod, pressing C-M-a in java-ts-mode moves point to the beginning of that line. However, in java-mode, point moves to the beginning of Interface's declaration. In the following Python file: def outer(): def inner(i): return i [r]eturn 42 If point is at the "r" in the outer return statement, pressing C-M-a in python-ts-mode moves point to the beginning of the line where the function "inner" is declared. However, in python-mode, point moves to the beginning of the line where "outer" is declared. This discrepancy in behavior makes it harder to use narrow-to-defun effectively. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) Repository revision: c1a3e8830bb2fa8c3e8056bb42360f3504c434e9 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: NixOS 23.05 (Stoat) Configured using: 'configure --prefix=/nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0 --disable-build-details --with-modules --with-x-toolkit=lucid --with-xft --with-cairo --with-native-compilation' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XIM XPM LUCID ZLIB Important settings: value of $EMACSLOADPATH: value of $EMACSNATIVELOADPATH: /nix/store/b05qvhh9dgsx4ixhbj6r9j55w9qzywwy-emacs-packages-deps/share/emacs/native-lisp:: value of $LANG: en_US.UTF8 locale-coding-system: utf-8-unix Major mode: Py Minor modes in effect: pdf-occur-global-minor-mode: t eval-sexp-fu-flash-mode: t radian-universal-keyboard-quit-mode: t eglot--managed-mode: t flymake-mode: t highlight-indentation-mode: t global-git-commit-mode: t magit-auto-revert-mode: t emms-mode-line-mode: t emms-playing-time-display-mode: t emms-playing-time-mode: t bug-reference-prog-mode: t global-auto-revert-mode: t winner-mode: t desktop-environment-mode: t beginend-global-mode: t beginend-prog-mode: t editorconfig-mode: t marginalia-mode: t company-prescient-mode: t prescient-persist-mode: t global-company-mode: t company-mode: t nix-modeline-mode: t org-roam-db-autosync-mode: t mu4e-column-faces-mode: t hl-line-mode: t global-hl-todo-mode: t hl-todo-mode: t global-whitespace-cleanup-mode: t whitespace-cleanup-mode: t global-subword-mode: t subword-mode: t global-origami-mode: t origami-mode: t pdfgrep-mode: t global-git-gutter-mode: t git-gutter-mode: t evil-owl-mode: t global-evil-fringe-mark-mode: t global-evil-surround-mode: t evil-surround-mode: t global-evil-matchit-mode: t evil-matchit-mode: t evil-lion-mode: t evil-traces-mode: t global-evil-mc-mode: t evil-mc-mode: t evil-escape-mode: t evil-goggles-mode: t global-evil-collection-unimpaired-mode: t evil-collection-unimpaired-mode: t evil-mode: t evil-local-mode: t windmove-mode: t yas-global-mode: t yas-minor-mode: t global-page-break-lines-mode: t doom-modeline-mode: t display-time-mode: t npm-global-mode: t npm-mode: t repeat-mode: t envrc-global-mode: t envrc-mode: t goto-address-prog-mode: t dired-async-mode: t helm-adaptive-mode: t async-bytecomp-package-mode: t recentf-mode: t vertico-indexed-mode: t vertico-mode: t minibuffer-electric-default-mode: t eshell-vterm-mode: t eshell-syntax-highlighting-global-mode: t save-place-mode: t global-undo-fu-session-mode: t undo-fu-session-mode: t global-dash-fontify-mode: t shell-dirtrack-mode: t server-mode: t savehist-mode: t minibuffer-depth-indicate-mode: t el-patch-use-package-mode: t global-display-line-numbers-mode: t display-line-numbers-mode: t general-override-mode: t straight-use-package-mode: t straight-package-neutering-mode: t straight-live-modifications-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t column-number-mode: 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/brian/.config/emacs/straight/build/ivy/elpa hides /home/brian/.config/emacs/straight/build/lispy/elpa /home/brian/.config/emacs/straight/build/cmake-mode/cmake-mode hides /etc/profiles/per-user/brian/share/emacs/site-lisp/cmake-mode /home/brian/.config/emacs/straight/build/password-store/password-store hides /etc/profiles/per-user/brian/share/emacs/site-lisp/password-store /home/brian/.config/emacs/straight/build/lv/lv hides /home/brian/.config/emacs/elpa/lv-20200507.1518/lv /home/brian/.config/emacs/straight/build/lv/lv-autoloads hides /home/brian/.config/emacs/elpa/lv-20200507.1518/lv-autoloads /home/brian/.config/emacs/straight/build/spinner/spinner-autoloads hides /home/brian/.config/emacs/elpa/spinner-1.7.3/spinner-autoloads /home/brian/.config/emacs/straight/build/spinner/spinner hides /home/brian/.config/emacs/elpa/spinner-1.7.3/spinner /home/brian/.config/emacs/straight/build/package-lint/package-lint hides /home/brian/.config/emacs/elpa/package-lint-20200616.2257/package-lint /home/brian/.config/emacs/straight/build/package-lint/package-lint-autoloads hides /home/brian/.config/emacs/elpa/package-lint-20200616.2257/package-lint-autoloads /home/brian/.config/emacs/straight/build/company/company-capf hides /home/brian/.config/emacs/elpa/company-0.9.13/company-capf /home/brian/.config/emacs/straight/build/company/company-yasnippet hides /home/brian/.config/emacs/elpa/company-0.9.13/company-yasnippet /home/brian/.config/emacs/straight/build/company/company-elisp hides /home/brian/.config/emacs/elpa/company-0.9.13/company-elisp /home/brian/.config/emacs/straight/build/company/company-tng hides /home/brian/.config/emacs/elpa/company-0.9.13/company-tng /home/brian/.config/emacs/straight/build/company/company-semantic hides /home/brian/.config/emacs/elpa/company-0.9.13/company-semantic /home/brian/.config/emacs/straight/build/company/company-dabbrev-code hides /home/brian/.config/emacs/elpa/company-0.9.13/company-dabbrev-code /home/brian/.config/emacs/straight/build/company/company-clang hides /home/brian/.config/emacs/elpa/company-0.9.13/company-clang /home/brian/.config/emacs/straight/build/company/company-css hides /home/brian/.config/emacs/elpa/company-0.9.13/company-css /home/brian/.config/emacs/straight/build/company/company-dabbrev hides /home/brian/.config/emacs/elpa/company-0.9.13/company-dabbrev /home/brian/.config/emacs/straight/build/company/company-keywords hides /home/brian/.config/emacs/elpa/company-0.9.13/company-keywords /home/brian/.config/emacs/straight/build/company/company-oddmuse hides /home/brian/.config/emacs/elpa/company-0.9.13/company-oddmuse /home/brian/.config/emacs/straight/build/company/company-tempo hides /home/brian/.config/emacs/elpa/company-0.9.13/company-tempo /home/brian/.config/emacs/straight/build/company/company-cmake hides /home/brian/.config/emacs/elpa/company-0.9.13/company-cmake /home/brian/.config/emacs/straight/build/company/company hides /home/brian/.config/emacs/elpa/company-0.9.13/company /home/brian/.config/emacs/straight/build/company/company-abbrev hides /home/brian/.config/emacs/elpa/company-0.9.13/company-abbrev /home/brian/.config/emacs/straight/build/company/company-ispell hides /home/brian/.config/emacs/elpa/company-0.9.13/company-ispell /home/brian/.config/emacs/straight/build/company/company-nxml hides /home/brian/.config/emacs/elpa/company-0.9.13/company-nxml /home/brian/.config/emacs/straight/build/company/company-etags hides /home/brian/.config/emacs/elpa/company-0.9.13/company-etags /home/brian/.config/emacs/straight/build/company/company-template hides /home/brian/.config/emacs/elpa/company-0.9.13/company-template /home/brian/.config/emacs/straight/build/company/company-files hides /home/brian/.config/emacs/elpa/company-0.9.13/company-files /home/brian/.config/emacs/straight/build/company/company-bbdb hides /home/brian/.config/emacs/elpa/company-0.9.13/company-bbdb /home/brian/.config/emacs/straight/build/company/company-gtags hides /home/brian/.config/emacs/elpa/company-0.9.13/company-gtags /home/brian/.config/emacs/straight/build/company/company-autoloads hides /home/brian/.config/emacs/elpa/company-0.9.13/company-autoloads /home/brian/.config/emacs/straight/build/markdown-mode/markdown-mode hides /home/brian/.config/emacs/elpa/markdown-mode-20200804.538/markdown-mode /home/brian/.config/emacs/straight/build/markdown-mode/markdown-mode-autoloads hides /home/brian/.config/emacs/elpa/markdown-mode-20200804.538/markdown-mode-autoloads /home/brian/.config/emacs/straight/build/yasnippet/yasnippet hides /home/brian/.config/emacs/elpa/yasnippet-0.14.0/yasnippet /home/brian/.config/emacs/straight/build/yasnippet/yasnippet-autoloads hides /home/brian/.config/emacs/elpa/yasnippet-0.14.0/yasnippet-autoloads /home/brian/.config/emacs/straight/build/project/project-autoloads hides /home/brian/.config/emacs/elpa/project-0.8.1/project-autoloads /home/brian/.config/emacs/straight/build/project/project hides /home/brian/.config/emacs/elpa/project-0.8.1/project /home/brian/.config/emacs/straight/build/xref/xref hides /home/brian/.config/emacs/elpa/xref-1.3.2/xref /home/brian/.config/emacs/straight/build/xref/xref-autoloads hides /home/brian/.config/emacs/elpa/xref-1.3.2/xref-autoloads /home/brian/.config/emacs/straight/build/vterm/vterm-autoloads hides /nix/store/b05qvhh9dgsx4ixhbj6r9j55w9qzywwy-emacs-packages-deps/share/emacs/site-lisp/elpa/vterm-20221118.1354/vterm-autoloads /home/brian/.config/emacs/straight/build/vterm/vterm hides /nix/store/b05qvhh9dgsx4ixhbj6r9j55w9qzywwy-emacs-packages-deps/share/emacs/site-lisp/elpa/vterm-20221118.1354/vterm /etc/profiles/per-user/brian/share/emacs/site-lisp/site-start hides /nix/store/b05qvhh9dgsx4ixhbj6r9j55w9qzywwy-emacs-packages-deps/share/emacs/site-lisp/site-start /etc/profiles/per-user/brian/share/emacs/site-lisp/site-start hides /nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0/share/emacs/site-lisp/site-start /home/brian/.config/emacs/straight/build/transient/transient hides /nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0/share/emacs/30.0.50/lisp/transient /home/brian/.config/emacs/elpa/jsonrpc-1.0.14/jsonrpc hides /nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0/share/emacs/30.0.50/lisp/jsonrpc /home/brian/.config/emacs/straight/build/xref/xref hides /nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0/share/emacs/30.0.50/lisp/progmodes/xref /home/brian/.config/emacs/elpa/flymake-1.2.1/flymake hides /nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0/share/emacs/30.0.50/lisp/progmodes/flymake /home/brian/.config/emacs/straight/build/project/project hides /nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0/share/emacs/30.0.50/lisp/progmodes/project /home/brian/.config/emacs/straight/build/soap-client/soap-client hides /nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0/share/emacs/30.0.50/lisp/net/soap-client /home/brian/.config/emacs/straight/build/soap-client/soap-inspect hides /nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0/share/emacs/30.0.50/lisp/net/soap-inspect /home/brian/.config/emacs/straight/build/map/map hides /nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0/share/emacs/30.0.50/lisp/emacs-lisp/map /home/brian/.config/emacs/elpa/eldoc-1.11.0/eldoc hides /nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0/share/emacs/30.0.50/lisp/emacs-lisp/eldoc /home/brian/.config/emacs/straight/build/let-alist/let-alist hides /nix/store/6fdp3wvxfdgrq2bd2p4a4ph3s6vyjsm9-emacs-git-20221205.0/share/emacs/30.0.50/lisp/emacs-lisp/let-alist Features: (shadow emacsbug consult-yasnippet gitignore-mode conf-mode pcmpl-git evil-nerd-commenter evil-nerd-commenter-operator evil-nerd-commenter-sdk sgml-mode java-ts-mode auto-yasnippet pdf-view-restore pdf-loader pdf-virtual pdf-sync pdf-outline pdf-occur ibuf-ext ibuffer ibuffer-loaddefs pdf-links pdf-isearch pdf-history pdf-dev pdf-annot evil-collection-tablist tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag cedet facemenu pdf-misc pdf-tools pdf-view pdf-cache pdf-info pdf-util pdf-macs tabify cl-print json-ts-mode misearch multi-isearch deadgrep spinner qp evil-collection-sh-script sh-script evil-collection-view view magit-patch magit-subtree magit-gitignore goto-chg evil-collection-eval-sexp-fu eval-sexp-fu executable evil-matchit-simple evil-matchit-prog c-ts-mode evil-collection-helpful elisp-demos helpful cc-langs trace info-look evil-collection-elisp-refs elisp-refs evil-collection-eglot eglot array jsonrpc evil-collection-ert ert ewoc evil-collection-flymake flymake-proc flymake highlight-indentation nix-mode smie nix-shell nix-store nix-log nix-instantiate nix-shebang nix-format pandoc-mode pandoc-mode-utils em-smart em-tramp em-script em-prompt em-glob em-basic eshell-toggle jka-compr crux multi-vterm evil-collection-magit orgit evil-collection-forge forge-list forge-commands forge-semi forge-bitbucket buck forge-gogs gogs forge-gitea gtea forge-gitlab glab forge-github ghub-graphql treepy gsexp ghub url-http url-gw nsm url-auth let-alist forge-notify forge-revnote forge-pullreq forge-issue forge-topic yaml forge-post evil-collection-markdown-mode markdown-preview-mode web-server web-server-status-codes websocket evil-markdown markdown-mode forge-repo forge forge-core forge-db closql magit-tbdiff magit-extras vdiff-magit magit-ediff evil-collection-ediff ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func magit-diff git-commit log-edit pcvs-util add-log magit-core magit-autorevert magit-margin magit-transient magit-process magit-mode magit-git magit-base crm gnus-cite smiley shr-color mm-archive mail-extr textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check tramp-cmds evil-collection-emms emms-librefm-stream emms-librefm-scrobbler emms-playlist-limit emms-i18n emms-history emms-score emms-stream-info emms-metaplaylist-mode emms-bookmarks emms-cue emms-mode-line-icon emms-browser sort emms-volume emms-volume-sndioctl emms-volume-mixerctl emms-volume-pulse emms-volume-amixer emms-playlist-sort emms-last-played emms-player-xine emms-player-mpd tq emms-lyrics emms-url emms-streams emms-show-all emms-tag-editor emms-tag-tracktag emms-mark emms-mode-line emms-cache emms-info-native bindat emms-info-exiftool emms-info-tinytag emms-info-metaflac emms-info-opusinfo emms-info-ogginfo emms-info-mp3info emms-playlist-mode emms-player-vlc emms-player-mpv emms-playing-time emms-info emms-later-do emms-player-mplayer emms-player-simple emms-source-playlist emms-source-file locate emms-setup emms emms-compat helm-exwm vertico-directory citre citre-global citre-tags citre-ctags citre-readtags citre-readtags-tables citre-backend-interface citre-ui-peek citre-ui-jump citre-common-tag citre-common-util cursor-sensor tramp-archive tramp-gvfs helm-linux-disks linux-disk company-elisp evil-collection-flycheck flycheck-guile flycheck bug-reference pinentry autorevert winner desktop-environment evil-collection-beginend beginend editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch marginalia company-keywords company-dabbrev-code company-dabbrev company-files company-capf company-restclient know-your-http-well http-status-codes http-relations http-methods http-headers company-prescient prescient char-fold company nix-modeline evil-collection-org-roam org-roam-migrate org-roam-log org-roam-mode org-roam-capture org-roam-id org-roam-node org-roam-db org-roam-utils org-roam-compat org-roam org-capture org-attach evil-collection-magit-section magit-section compat-27 compat-26 org-rich-yank mu4e-alert ht alert log4e notifications gntp evil-collection-mu4e mu4e-column-faces mu4e mu4e-org mu4e-main mu4e-view gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win evil-collection-gnus gnus nnheader range mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message shr pixel-fill kinsoku url-file svg xml dom flow-fill mule-util hl-line mu4e-contacts mu4e-update mu4e-folders mu4e-server mu4e-context mu4e-vars mu4e-helpers mu4e-config message sendmail yank-media puny rfc822 mml mml-sec evil-collection-epa epa epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader hl-todo whitespace-cleanup-mode whitespace cap-words superword subword origami origami-parsers cl pdfgrep evil-collection-wgrep wgrep grep git-gutter yasnippet lispyville evil-owl evil-fringe-mark evil-fringe-mark-overlays fringe-helper evil-visual-replace evil-surround evil-matchit evil-matchit-evil-setup evil-matchit-sdk semantic/lex semantic/fw evil-lion evil-textobj-syntax evil-indent-plus evil-replace-with-register evil-traces evil-args evil-exchange evil-collection-evil-mc evil-mc evil-mc-command-execute evil-mc-command-record evil-mc-cursor-make evil-mc-region evil-mc-cursor-state evil-mc-undo evil-mc-vars evil-mc-known-commands evil-mc-common evil-escape evil-mark-replace evil-goggles pulse evil-collection-unimpaired evil-collection-xref evil-collection-vterm evil-collection-vertico evil-collection-vdiff evil-collection-vc-git evil-collection-term evil-collection-tabulated-list evil-collection-shortdoc evil-collection-restclient evil-collection-python evil-collection-pass evil-collection-org evil-collection-man evil-collection-help evil-collection-helm evil-collection-git-timemachine evil-collection-elisp-mode evil-collection-eldoc evil-collection-edebug evil-collection-embark evil-collection-debug evil-collection-consult evil-collection-compile evil-collection-comint calc-ext evil-collection-calc evil-collection annalist evil-string-inflection string-inflection evil evil-integration evil-maps evil-commands reveal flyspell ispell evil-jumps evil-command-window evil-search evil-ex evil-types evil-macros evil-repeat evil-states evil-core evil-common windmove calc calc-loaddefs calc-macs rect evil-digraphs evil-vars page-break-lines doom-modeline doom-modeline-segments doom-modeline-env doom-modeline-core all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons shrink-path doom-modeline-autoloads shrink-path-autoloads doom-themes-ext-org doom-themes-ext-treemacs doom-themes-ext-visual-bell doom-one-light-theme time doom-themes doom-themes-base doom-themes-autoloads bundler-autoloads rspec-mode-autoloads robe-autoloads inf-ruby-autoloads go-mode-autoloads clojure-mode-autoloads utop-autoloads dune-autoloads tuareg-autoloads caml-autoloads z3-mode-autoloads haskell-mode-autoloads bison-mode-autoloads lua-mode-autoloads scribble-mode-autoloads racket-mode-autoloads macrostep-geiser-autoloads flycheck-guile-autoloads geiser-racket-autoloads geiser-mit-autoloads geiser-guile-autoloads geiser-autoloads ess-autoloads jupyter-autoloads zmq-autoloads simple-httpd-autoloads highlight-indentation-autoloads pip-requirements-autoloads elixir-autoloads company-restclient-autoloads know-your-http-well-autoloads php-mode-autoloads jq-mode-autoloads json-snatcher-autoloads nodejs-repl-autoloads npm-mode npm-mode-autoloads dotenv-mode-autoloads ts-comint-autoloads emmet-mode-autoloads zig-mode-autoloads nasm-mode-autoloads x86-lookup-autoloads cmake-font-lock-autoloads cmake-mode-autoloads rustic-autoloads xterm-color-autoloads rust-mode-autoloads repl-toggle fullframe repl-toggle-autoloads fullframe-autoloads make-it-so make-mode make-it-so-autoloads sx-autoloads gif-screencast-autoloads elfeed-org-autoloads elfeed-autoloads hackernews-autoloads company-reftex-autoloads evil-tex-autoloads company-auctex-autoloads auctex-autoloads tex-site unfill-autoloads symbol-overlay symbol-overlay-autoloads rainbow-delimiters rainbow-delimiters-autoloads page-break-lines-autoloads auto-yasnippet-autoloads consult-yasnippet-autoloads yasnippet-autoloads csv-mode-autoloads prodigy-autoloads erc-hl-nicks-autoloads flyspell-correct-autoloads edbi-autoloads epc-autoloads ctable-autoloads concurrent-autoloads sql-indent-autoloads emms-autoloads dockerfile-mode-autoloads docker-compose-mode-autoloads yaml-mode-autoloads docker-autoloads aio-autoloads browse-at-remote-autoloads git-modes-autoloads orgit-forge-autoloads orgit-autoloads magit-imerge-autoloads code-review-autoloads emojify-autoloads deferred-autoloads uuidgen-autoloads a-autoloads forge-autoloads yaml-autoloads ghub-autoloads treepy-autoloads closql-autoloads emacsql-sqlite emacsql emacsql-compiler git-timemachine transient vc-git git-timemachine-autoloads git-link-autoloads git-gutter-autoloads gitpatch-autoloads magit-tbdiff-autoloads pdfgrep-autoloads pdf-view-restore-autoloads pdf-tools-autoloads tablist-autoloads nov-autoloads esxml-autoloads kv-autoloads vimrc-mode-autoloads macrostep-autoloads el-mock-autoloads ert-runner-autoloads shut-up-autoloads ansi-autoloads commander-autoloads elisp-demos-autoloads helpful-autoloads elisp-refs-autoloads eval-sexp-fu-autoloads highlight-stages-autoloads lispyville-autoloads lispy lispy-inline avy etags fileloop help-fns lispy-tags mode-local zoutline lispy-autoloads zoutline-autoloads swiper-autoloads ivy-autoloads lisp-extra-font-lock lisp-extra-font-lock-autoloads origami-autoloads repeat link-hint-autoloads all-the-icons-autoloads treemacs-icons-dired-autoloads treemacs-magit-autoloads treemacs-evil-autoloads treemacs-perspective-autoloads treemacs-autoloads cfrs-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads harpoon-autoloads nswbuff-autoloads perspective-autoloads sesman-autoloads skeletor-autoloads envrc inheritenv envrc-autoloads inheritenv-autoloads crux-autoloads whitespace-cleanup-mode-autoloads apheleia apheleia-autoloads hl-todo-autoloads debpaste-autoloads xml-rpc-autoloads mu4e-column-faces-autoloads mu4e-alert-autoloads mbsync-autoloads w3m-load w3m-autoloads gnuplot-autoloads zotero-autoloads oauth-autoloads pandoc-mode-autoloads markdown-preview-mode-autoloads web-server-autoloads websocket-autoloads evil-markdown-autoloads markdown-mode-autoloads adoc-mode-autoloads markup-faces-autoloads deft deft-autoloads org-download-autoloads org-pomodoro-autoloads alert-autoloads log4e-autoloads gntp-autoloads org-fancy-priorities-autoloads org-modern-autoloads org-recur-autoloads org-sidebar-autoloads org-ql-autoloads peg-autoloads ov-autoloads org-super-agenda-autoloads ts-autoloads ht-autoloads org-rich-yank-autoloads ob-sql ob-shell ob-scheme ob-ruby ob-restclient restclient ob-python python treesit ob-org ob-ocaml ob-haskell ob-js ob-gnuplot ob-eshell ob-C cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs consult-org org-indent embark-org org-element org-persist org-id org-refile avl-tree org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs cal-menu calendar cal-loaddefs org-version org-compat org-macs ob-restclient-autoloads restclient-autoloads evil-org-autoloads goto-addr loaddefs-gen lisp-mnt radix-tree org-appear-autoloads org-roam-autoloads emacsql-sqlite-autoloads emacsql-autoloads org-pandoc-import-autoloads org-tree-slide-autoloads org-contrib-autoloads wgrep-autoloads deadgrep-autoloads spinner-autoloads ssh-config-mode-autoloads helm-wikipedia-autoloads helm-linux-disks-autoloads helm-comint helm-elisp helm-files image-dired image-dired-tags image-dired-external image-dired-util xdg image-mode dired-open dired-filter dired-narrow delsel dired-subtree dired-ranger dired-hacks-utils dired-rsync dired-async dired-aux dired-x dired dired-loaddefs exif filenotify helm-buffers helm-occur helm-tags helm-locate helm-grep helm-regexp helm-eval edebug debug backtrace helm-info helm-utils helm-types helm-help helm-adaptive helm helm-global-bindings helm-easymenu edmacro helm-core async-bytecomp helm-source helm-multi-match helm-lib async helm-config nix-update-autoloads nix-modeline-autoloads helm-nixos-options-autoloads nixos-options-autoloads nix-repl nix nix-mode-autoloads cape-autoloads corfu-autoloads consult-dash-autoloads dash-docs-autoloads citre-autoloads relint-autoloads ample-regexps-autoloads xr-autoloads run-command-autoloads consult-git-log-grep-autoloads consult-ls-git vc vc-dispatcher consult-ls-git-autoloads consult-dir-autoloads consult-recoll-autoloads consult-flycheck-autoloads flycheck-autoloads pkg-info-autoloads epl-autoloads consult-imenu consult-xref xref project embark-consult consult-vertico consult compat-28 recentf tree-widget marginalia-autoloads orderless orderless-autoloads vertico-repeat vertico-indexed vertico vertico-autoloads company-prescient-autoloads company-autoloads prescient-autoloads embark-consult-autoloads consult-autoloads embark ffap thingatpt embark-autoloads minibuf-eldef exec-path-from-shell exec-path-from-shell-autoloads editorconfig-autoloads posframe-autoloads evil-owl-autoloads evil-fringe-mark-autoloads fringe-helper-autoloads evil-visual-replace-autoloads evil-visualstar-autoloads evil-surround-autoloads evil-nerd-commenter-autoloads evil-expat-autoloads evil-matchit-autoloads evil-lion-autoloads evil-textobj-syntax-autoloads names-autoloads evil-indent-plus-autoloads evil-replace-with-register-autoloads evil-traces-autoloads evil-args-autoloads evil-exchange-autoloads evil-numbers-autoloads evil-multiedit-autoloads iedit-autoloads evil-mc-autoloads evil-escape-autoloads evil-mark-replace-autoloads evil-goggles-autoloads evil-collection-autoloads annalist-autoloads evil-string-inflection-autoloads string-inflection-autoloads evil-autoloads goto-chg-autoloads pcase beginend-autoloads desktop-environment-autoloads daemons-autoloads burly-autoloads map-autoloads windower-autoloads popper-autoloads shackle-autoloads exwm-edit exwm-edit-autoloads helm-exwm-autoloads helm-autoloads popup-autoloads helm-core-autoloads exwm-config ido exwm-randr xcb-randr exwm-systemtray xcb-systemtray xcb-xembed exwm exwm-input xcb-keysyms xcb-xkb exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types xcb-debug kmacro exwm-autoloads xelb-autoloads bluetooth-autoloads debbugs-autoloads soap-client-autoloads vdiff-magit-autoloads magit-autoloads magit-section-autoloads git-commit-autoloads transient-autoloads vdiff smerge-mode diff two-column hydra advice lv diff-mode vdiff-autoloads hydra-autoloads lv-autoloads dired-open-autoloads dired-filter-autoloads dired-narrow-autoloads dired-subtree-autoloads dired-ranger-autoloads dired-hacks-utils-autoloads dired-rsync-autoloads async-autoloads fd-dired-autoloads dired-toggle-sudo-autoloads detached-autoloads eshell-toggle-autoloads eshell-autojump eshell-autojump-autoloads eshell-up eshell-up-autoloads eshell-prompt-extras eshell-prompt-extras-autoloads eshell-vterm easy-mmode vterm bookmark tramp tramp-loaddefs trampver tramp-integration tramp-compat parse-time iso8601 time-date ls-lisp format-spec face-remap compile color find-func vterm-module term/xterm xterm eshell-vterm-autoloads eshell-syntax-highlighting em-alias eshell-syntax-highlighting-autoloads esh-help man em-unix esh-help-autoloads em-hist em-pred em-ls em-cmpl em-dirs esh-var esh-mode em-term term disp-table ehelp eshell esh-cmd generator esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util cus-edit pp cus-load wid-edit files-x multi-vterm-autoloads project-autoloads xref-autoloads saveplace vundo-autoloads undo-fu-session undo-fu-session-autoloads pinentry-autoloads pass f f-shortdoc shortdoc text-property-search dash s imenu pass-autoloads f-autoloads dash-autoloads password-store-otp-autoloads password-store with-editor comp comp-cstr warnings icons rx shell pcomplete comint ansi-osc ansi-color ring server password-store-autoloads with-editor-autoloads s-autoloads auth-source-pass init-misc-settings savehist mb-depth package-lint-autoloads let-alist-autoloads el-patch-autoloads el-patch el-patch-stub display-line-numbers compdef derived compdef-autoloads blackout blackout-autoloads general general-autoloads inline no-littering compat compat-macs no-littering-autoloads compat-autoloads use-package-ensure use-package-core use-package-autoloads info bind-key-autoloads straight-autoloads cl-extra help-mode straight finder-inf vterm-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 rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-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 x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 2304499 2810090) (symbols 48 88758 125) (strings 32 481399 671863) (string-bytes 1 20562054) (vectors 16 306884) (vector-slots 8 5696951 4972697) (floats 8 3600 21931) (intervals 56 87390 59863) (buffers 992 169)) From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Dec 2022 08:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Brian Leung Cc: 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.167031550517504 (code B ref 59853); Tue, 06 Dec 2022 08:32:02 +0000 Received: (at 59853) by debbugs.gnu.org; 6 Dec 2022 08:31:45 +0000 Received: from localhost ([127.0.0.1]:41476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2TMf-0004YB-2V for submit@debbugs.gnu.org; Tue, 06 Dec 2022 03:31:45 -0500 Received: from out2.migadu.com ([188.165.223.204]:46909) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2TMb-0004Y4-VI for 59853@debbugs.gnu.org; Tue, 06 Dec 2022 03:31:43 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1670315499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=klDA80WQGLiHmw5Ki1FFAE9ctlhPV1IY2sBJeeVLzjE=; b=1H1oytCzbhRv7Fbd2CaHDCna6nU4aUOIrgSkQ3Xt99jd+NqkNI6ITePYYcu0mdwbwNNIPr vp6wyJ+Z2nxA7p7IOgLCVwNtI5ejZLC0mmd2taoUf9BA2xzLzwekmlMRZYQ0GnomtDyrXt QzD5TYipJ9qTMzds3bqhUJ9bPkyAnmy+CxhIUpKI2Rw0dNWV2Bc7dSb6GdVl1kXCWO3d58 shIVXeOkmb6KXGXr+nhlrGoNbrlNioDJWK1qdrrTFdpjX70ImjTG7cwtiuEoEyqmCJKnlT RgOPGp5f/nfDUS703fZRoIayThgnY1ppb/WnL/zEQosdpJbWKgcyi9WMhTTYDQ== From: Theodor Thornhill In-Reply-To: <87lenlnjc1.fsf@posteo.net> (Brian Leung's message of "Tue, 06 Dec 2022 06:21:18 +0000") References: <87lenlnjc1.fsf@posteo.net> Date: Tue, 06 Dec 2022 09:31:38 +0100 Message-ID: <87k035vsph.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) 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 (-) Hi Brian and thanks for the report! Brian Leung writes: > Given the following Java file: > > public abstract class Class { > public static interface Interface { > void someMethod(); > > void [o]therMethod(); > } > } > > If point is at the "o" in otherMethod, pressing C-M-a in java-ts-mode > moves point to the beginning of that line. However, in java-mode, point > moves to the beginning of Interface's declaration. > I see. To me this looks like java-ts-mode is "correct", in that the next step "outwards" is to the method start itself. The point is in fact inside the method still, IIUC. > In the following Python file: > > def outer(): > def inner(i): > return i > > [r]eturn 42 > > If point is at the "r" in the outer return statement, pressing C-M-a in > python-ts-mode moves point to the beginning of the line where the > function "inner" is declared. However, in python-mode, point moves to > the beginning of the line where "outer" is declared. > In this case I think python-mode is correct, becase the 'inner' function is a sibling to the return statement, and it would make sense to go directly to outer. > This discrepancy in behavior makes it harder to use narrow-to-defun effectively. > Yeah, I understand. Do you agree on my points above? I just want to make the problem clear to me :-) Theo From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior Resent-From: Brian Leung Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Dec 2022 09:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Theodor Thornhill Cc: 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.167031790118847 (code B ref 59853); Tue, 06 Dec 2022 09:12:01 +0000 Received: (at 59853) by debbugs.gnu.org; 6 Dec 2022 09:11:41 +0000 Received: from localhost ([127.0.0.1]:41677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2TzJ-0004tv-77 for submit@debbugs.gnu.org; Tue, 06 Dec 2022 04:11:41 -0500 Received: from mout02.posteo.de ([185.67.36.66]:46915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2TzH-0004to-8V for 59853@debbugs.gnu.org; Tue, 06 Dec 2022 04:11:40 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BDEE8240106 for <59853@debbugs.gnu.org>; Tue, 6 Dec 2022 10:11:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1670317893; bh=cuJPimDoDQvvJGXbLxf2WrmgApJvvD0oJIghJZbvGUI=; h=From:To:Cc:Subject:Date:From; b=RJyVk2iifNW8OERb1ce6kppE1mjsm2srGFLi+Kgjod02YozKXDPZyz5yXYbBDcfYS FyeGSWkoVN/XDVCd3jFVsQTwlkUJncSimSkGRBdZFjaUysmxe0e5KnBvDYEuSsRaXy EXMh3UFg4WT82VCzZQ9pTVYahKUGS4bR+LBTy0wbUsMi9Vyw45PvP8+uEOW4E+t0gG ulAgZK3qb9GM6h2NWm+f+ddHA/iKmsipd1aOjQVubobnR2NS2rcSbCjWbF/ApCapfg nwZHGRG9UcDvwNthytdr+QlFGZy+uqhta92vOB5qLgAVjtKuNkrSK5ZSBhOHmIofxo ifTPl65udDqOw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NRF5w40rZz6tp2; Tue, 6 Dec 2022 10:11:32 +0100 (CET) References: <87lenlnjc1.fsf@posteo.net> <87k035vsph.fsf@thornhill.no> From: Brian Leung Date: Tue, 06 Dec 2022 08:41:40 +0000 In-reply-to: <87k035vsph.fsf@thornhill.no> Message-ID: <87h6y8oq0x.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: -0.7 (/) 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.7 (-) Thanks for your response! Theodor Thornhill writes: >> public abstract class Class { >> public static interface Interface { >> void someMethod(); >> >> void [o]therMethod(); >> } >> } >> >> If point is at the "o" in otherMethod, pressing C-M-a in >> java-ts-mode >> moves point to the beginning of that line. However, in >> java-mode, point >> moves to the beginning of Interface's declaration. >> > > I see. To me this looks like java-ts-mode is "correct", in that > the > next step "outwards" is to the method start itself. The point > is in > fact inside the method still, IIUC. I don't actually know Java, so my expectations/intuition for what is "right" may be off. But from what I've read about, interfaces should be used to group methods with empty bodies. Body-less forms don't particularly feel like defuns to me, which is why I bring this up. Additionally, interactively using narrow-to-defun in java-ts-mode when point is inside the interface body produces unusual results: > public abstract class Class { > public static interface Interface { > void someMethod(); > * * > void otherMethod(); > *}* > } If you narrow-to-defun with point inside the interface body and not touching either brace (such as between the two methods), you won't be able to capture the entire interface, and instead get just a single-line method. Meanwhile, if point touches the right brace, then narrow-to-defun yields > void otherMethod(); > } > } when capturing the entire interface might make more sense. >> def outer(): >> def inner(i): >> return i >> >> [r]eturn 42 >> >> If point is at the "r" in the outer return statement, pressing >> C-M-a in >> python-ts-mode moves point to the beginning of the line where >> the >> function "inner" is declared. However, in python-mode, point >> moves to >> the beginning of the line where "outer" is declared. >> > > In this case I think python-mode is correct, becase the 'inner' > function > is a sibling to the return statement, and it would make sense to > go > directly to outer. Yeah, I agree here. From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Dec 2022 10:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Brian Leung Cc: casouri@gmail.com, 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.167032299621936 (code B ref 59853); Tue, 06 Dec 2022 10:37:01 +0000 Received: (at 59853) by debbugs.gnu.org; 6 Dec 2022 10:36:36 +0000 Received: from localhost ([127.0.0.1]:42071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2VJU-0005hk-3Z for submit@debbugs.gnu.org; Tue, 06 Dec 2022 05:36:36 -0500 Received: from out-156.mta0.migadu.com ([91.218.175.156]:19269) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2VJR-0005he-Lv for 59853@debbugs.gnu.org; Tue, 06 Dec 2022 05:36:34 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1670322992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6FJo1nKUChCrrMWrt/xSA5IDTbiJk9OwrQ8RoBw7sto=; b=k5wKulz29uvH+a75Rl7pFp2RY3Q2YOMVIqc6I53INPmmQwEk1ZJDY8ofGFULGEF89FjBOp t0HmxxrUZsXkTkAcxrdKfm6c2zINwplbL/Wz0F+YRGDwkH4r4rVDtTAVUqeSXIN+3V5lNR KB7emrn0x66n2EnlymniHRTeQN3BDsAjxVc1A6XqpFlH0TpA/GGgZwyZp84yuFE7uvIlsD h6uxsojGUIa2GMwKYpsRHGpf+C6eUuyXA7tIbOn1r5IMk0qBCSqJsV0xPwuo9bUAe5KN5l TmOSYvtypE+qckw7E7vscFGVQztJ5LfTinnXaL5fnnIaKB1OY/lkXM5mmoDxIQ== From: Theodor Thornhill In-Reply-To: <87h6y8oq0x.fsf@posteo.net> References: <87lenlnjc1.fsf@posteo.net> <87k035vsph.fsf@thornhill.no> <87h6y8oq0x.fsf@posteo.net> Date: Tue, 06 Dec 2022 11:36:31 +0100 Message-ID: <875yeox1hs.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) 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 (-) Brian Leung writes: > Thanks for your response! > > Theodor Thornhill writes: > >>> public abstract class Class { >>> public static interface Interface { >>> void someMethod(); >>> >>> void [o]therMethod(); >>> } >>> } >>> >>> If point is at the "o" in otherMethod, pressing C-M-a in >>> java-ts-mode >>> moves point to the beginning of that line. However, in >>> java-mode, point >>> moves to the beginning of Interface's declaration. >>> >> >> I see. To me this looks like java-ts-mode is "correct", in that >> the >> next step "outwards" is to the method start itself. The point >> is in >> fact inside the method still, IIUC. > > I don't actually know Java, so my expectations/intuition for what > is "right" may be off. But from what I've read about, interfaces > should be used to group methods with empty bodies. Body-less forms > don't particularly feel like defuns to me, which is why I bring > this up. Additionally, interactively using narrow-to-defun in > java-ts-mode when point is inside the interface body produces > unusual results: > >> public abstract class Class { >> public static interface Interface { >> void someMethod(); >> * * >> void otherMethod(); >> *}* >> } Not sure I can reproduce this. I made two files: ``` package Foo; import some.thing; interface Foo { void foo(); } ```` ``` package Foo; import some.thing; public abstract class Fooo { public static interface Foo { void foo(); } } ``` In the first one, when point is on the 'f' of 'foo()' I get narrowed to that line. If I'm at column 0 of the same line, I see the whole interface, but not the package declaration or import statement. That seems correct to me. Also I see similar results on the other file. What am I missing? >>> def outer(): >>> def inner(i): >>> return i >>> >>> [r]eturn 42 >>> >>> If point is at the "r" in the outer return statement, pressing >>> C-M-a in >>> python-ts-mode moves point to the beginning of the line where >>> the >>> function "inner" is declared. However, in python-mode, point >>> moves to >>> the beginning of the line where "outer" is declared. >>> >> >> In this case I think python-mode is correct, becase the 'inner' >> function >> is a sibling to the return statement, and it would make sense to >> go >> directly to outer. > > Yeah, I agree here. Great! This sounds like a different bug report though. Theo From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior Resent-From: Brian Leung Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Dec 2022 10:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Theodor Thornhill Cc: casouri@gmail.com, 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.16704079227842 (code B ref 59853); Wed, 07 Dec 2022 10:13:01 +0000 Received: (at 59853) by debbugs.gnu.org; 7 Dec 2022 10:12:02 +0000 Received: from localhost ([127.0.0.1]:49195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2rPF-00022F-H5 for submit@debbugs.gnu.org; Wed, 07 Dec 2022 05:12:02 -0500 Received: from mout01.posteo.de ([185.67.36.65]:42957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2rPB-000222-OD for 59853@debbugs.gnu.org; Wed, 07 Dec 2022 05:11:59 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 96B71240027 for <59853@debbugs.gnu.org>; Wed, 7 Dec 2022 11:11:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1670407911; bh=Wvzgyxe0xGIwPm0aVKFQPJbJ8FZyuKzfmNogeWIOCI0=; h=From:To:Cc:Subject:Date:From; b=ZRK/OZwsVL26DORNFWVMjjACyl1zS/ZnP22icXHsz8m40w9W9CGjIpzFC388cWOMH CdAHL0qtSNaVGXWKJXvFT6cU+sihxhIrpn0nzlwuv9sY3wqvOwuIcKWvvCBYvr+kAE 4UPOZmiMSPi8wQv/KOaAsvm3Mf9AUZF4JoP4VuQA79/DvE9khqCfs2teJKksM2QDvz nKt2V9jZ8WByfMG7KK8W8jDLjiFKgOilqXuz6Sk2d/no0YliW2dJXfuke9zaMiRDNa Vkh4XZohvUJajQWtj0jwn2wOldX/fejy5qBdDsPjoF7uwvg1yKfwmzMUYizTbaYFW1 EpRThz1gg/nLA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NRtNy4PP4z6tqw; Wed, 7 Dec 2022 11:11:46 +0100 (CET) References: <87lenlnjc1.fsf@posteo.net> <87k035vsph.fsf@thornhill.no> <87h6y8oq0x.fsf@posteo.net> <875yeox1hs.fsf@thornhill.no> From: Brian Leung Date: Wed, 07 Dec 2022 09:51:35 +0000 In-reply-to: <875yeox1hs.fsf@thornhill.no> Message-ID: <87mt7zplpf.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: -2.3 (--) 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: -3.3 (---) Theodor Thornhill writes: > Not sure I can reproduce this. Sorry, I made a mistake in my description. I additionally noticed additional odd results in java-ts-mode. Let me try again: > p[u]blic abstract class Class { > public static interface Interface { > void someMethod(); > [*] > void otherMethod(); > [}] > } 1. When point is at the "u" in "public", narrow-to-defun cuts off "pu" and moves point to "b". 2. When point is anywhere in the first line of the class declaration, mark-defun highlights "void otherMethod()", instead of the entire class declaration. 3a. When point is at the [*] in between someMethod and otherMethod, narrow-to-defun captures "void otherMethod()". I feel that since the methods inside the interface declaration have no bodies, it makes more sense to capture the entire interface definition if point is at [*]. 3b. Arguably, even if point were on the method declarations, we might still want to (as plain java-mode does) capture the entire interface definition, since body-less method declarations don't feel especially defun-like. 4. When point is on the closing bracket of the interface definition, narrow-to-defun captures > void otherMethod(); > } > } which looks quite unusual to me. From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Dec 2022 11:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Brian Leung Cc: casouri@gmail.com, 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.167041282412944 (code B ref 59853); Wed, 07 Dec 2022 11:34:01 +0000 Received: (at 59853) by debbugs.gnu.org; 7 Dec 2022 11:33:44 +0000 Received: from localhost ([127.0.0.1]:49803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2sgK-0003Mi-8q for submit@debbugs.gnu.org; Wed, 07 Dec 2022 06:33:44 -0500 Received: from out2.migadu.com ([188.165.223.204]:41440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2sgH-0003Mc-OM for 59853@debbugs.gnu.org; Wed, 07 Dec 2022 06:33:43 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1670412819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iZm/kYYduV+SMHGWRbOldMvAD6hRK6TyRzNSZVfDYPc=; b=e489cQ6Pd/eKFylmhAVuuiB+UvRfu4C0Jc2X+0ze3Wxev0ENTw/Io9K39SOHZgidfBipAk zLjG+PtqPrIMvzvdVMtmZ7GJMEFfTqdynb+tfBXV2UlT3qCrXYdqvLfMnpnXyLi4mpWlCo AlFKEchc3ujnvg8kP5Y35XR2k11g2kCkQMwppeUIvmzjFDdqM999zhNS/Jce75Ilpm4j27 RUujWOHATN5u4RKCEVFkqJJK8sS3ok4My/iQXPUcugRK4IFonqgmmeKUZ2SjdbYr/9Ar6W 5iTIvTlPUYB+TJaEmKPPtVaaqK9GaXV5q4rVXcEEc6TjbPiw8dlBvK1WfFBtPQ== From: Theodor Thornhill In-Reply-To: <87mt7zplpf.fsf@posteo.net> References: <87lenlnjc1.fsf@posteo.net> <87k035vsph.fsf@thornhill.no> <87h6y8oq0x.fsf@posteo.net> <875yeox1hs.fsf@thornhill.no> <87mt7zplpf.fsf@posteo.net> Date: Wed, 07 Dec 2022 12:33:32 +0100 Message-ID: <87k033zbw3.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) 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 (-) --=-=-= Content-Type: text/plain Brian Leung writes: > Theodor Thornhill writes: > >> Not sure I can reproduce this. > > Sorry, I made a mistake in my description. I additionally noticed > additional odd results in java-ts-mode. Let me try again: > >> p[u]blic abstract class Class { >> public static interface Interface { >> void someMethod(); >> [*] >> void otherMethod(); >> [}] >> } Right - thanks! Now I understand what you describe. I'll try to answer them case by case. > > 1. When point is at the "u" in "public", narrow-to-defun cuts off > "pu" and moves point to "b". Yes, this definitely looks like a bug. This is probably because the whole 'public' keyword maps to the declaration, and we don't move to the actual beginning. I can look into this. > 2. When point is anywhere in the first line of the class > declaration, mark-defun highlights "void otherMethod()", instead > of the entire class declaration. Yeah, I think I've fixed this in a patch I just submitted. > 3a. When point is at the [*] in between someMethod and > otherMethod, narrow-to-defun captures "void otherMethod()". I feel > that since the methods inside the interface declaration have no > bodies, it makes more sense to capture the entire interface > definition if point is at [*]. Maybe, but I don't believe this is wrong either. > 3b. Arguably, even if point were on the method declarations, we > might still want to (as plain java-mode does) capture the entire > interface definition, since body-less method declarations don't > feel especially defun-like. Maybe. Can you try applying the below patch and see if this changes anything for you? > 4. When point is on the closing bracket of the interface > definition, narrow-to-defun captures > >> void otherMethod(); >> } >> } > > which looks quite unusual to me. Yes, I agree with this one. My guess is that this is the same as number one. What do you think? Theo --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Make-more-granular-defun-type-regexp.patch >From ef79549e793773b50faea9bad2cd35509e5714e1 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Wed, 7 Dec 2022 10:07:37 +0100 Subject: [PATCH] Make more granular defun-type-regexp We don't want to match local_variable_declaration and others to hit on beginning-of-defun. The fix is just to make the regexp a bit more granular. * lisp/progmodes/java-ts-mode.el (java-ts-mode): Use regexp-opt to distinguish more granularly. --- lisp/progmodes/java-ts-mode.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index 2c42505ac9..db2566d655 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@ -317,7 +317,15 @@ java-ts-mode (append "{}():;," electric-indent-chars)) ;; Navigation. - (setq-local treesit-defun-type-regexp "declaration") + (setq-local treesit-defun-type-regexp + (regexp-opt '("method_declaration" + "class_declaration" + "record_declaration" + "interface_declaration" + "enum_declaration" + "import_declaration" + "package_declaration" + "module_declaration"))) ;; Font-lock. (setq-local treesit-font-lock-settings java-ts-mode--font-lock-settings) -- 2.34.1 --=-=-=-- From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior References: <87lenlnjc1.fsf@posteo.net> In-Reply-To: <87lenlnjc1.fsf@posteo.net> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Dec 2022 19:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Theodor Thornhill Cc: Brian Leung , 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.16704416561180 (code B ref 59853); Wed, 07 Dec 2022 19:35:02 +0000 Received: (at 59853) by debbugs.gnu.org; 7 Dec 2022 19:34:16 +0000 Received: from localhost ([127.0.0.1]:51838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p30BL-0000Iy-Vu for submit@debbugs.gnu.org; Wed, 07 Dec 2022 14:34:16 -0500 Received: from mail-pg1-f170.google.com ([209.85.215.170]:42530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p30BI-0000Is-R3 for 59853@debbugs.gnu.org; Wed, 07 Dec 2022 14:34:14 -0500 Received: by mail-pg1-f170.google.com with SMTP id h33so17247531pgm.9 for <59853@debbugs.gnu.org>; Wed, 07 Dec 2022 11:34:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=BJFznxBqcjPmMe0hSH3521GJtLLN8fvuF+RKx3+HEZ0=; b=ZThSGPgZLcqceeG1Lsj6asJWs8u8y2bVp8AeMeX9GuB5QQAobdKoLj6UfNmaEnBZP6 IVEhda6yHysORXBeM3WdUFz5uhC333aYiDGHGQu6GpTQ5bDh4JXdkQdTnCjK4UNRw25K K7bHkx8fPonCR5X44HlB/rihqnUCgfVedJaby78iVJ8mDp2mESWvU1tSI0l5QAJ/hP4+ suyvLAZdndCDWCUmGSwy6ZBtGeOA4cVkNoVhM9308DPV31KWCrP7BakYyKqzFhYiZUGh BSc0nTvyuMBX4D2x739KBwrjFezUl+kHHcyQyOvmF5QbW5t8wDmyIZXAGP+xUASjBZcH /XcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BJFznxBqcjPmMe0hSH3521GJtLLN8fvuF+RKx3+HEZ0=; b=W/sUphDDvelwK+VcevKgApfL9pC9FU/2bMUDMM9IGqDZtsk1Fp1wOz7l2mAKmgC/jK 9BZdvxOdOIqOb/ZjFxEXgJ9uGPVJw7Kk0IpPdb8i0CR9qRjhUh7wJahCTIdhVmTxbimL RK3JlayhqsCfSud9sQzT0h6VkwVwPzIxNxKTDrrwbTCQ32kjb0OC7yhGbjLXpvWZzlB9 L/oToNLxejL4ncZSQn/0o9Njdg9MXD/Z2uKaMuyUw4riRRgrhmHjsB7gkhy14u4zzaVd I36di7X60oUHUj3cZ7PjsajbPOHEGpncAKf2eBEoVvkhHfu5KoVHodkrR+gcJvbY+R1e LCgw== X-Gm-Message-State: ANoB5plXkkpBi9BOsyxx6PzM2Uc4WjUmGUIxGu5EMPWRJKFcEYqAprXP FeXX6BLE2OgABTbRKkq2l7Q= X-Google-Smtp-Source: AA0mqf4hBBqXrfWABDRi24TU2U3U38IXaE/EGx4em2FpW/bpVGMCD/BLI91adEMSNSY//b2A4DAAyQ== X-Received: by 2002:a63:fc0a:0:b0:434:7885:6ade with SMTP id j10-20020a63fc0a000000b0043478856ademr70226812pgi.243.1670441646648; Wed, 07 Dec 2022 11:34:06 -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 190-20020a6205c7000000b00573eb4a775esm14378147pff.17.2022.12.07.11.34.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Dec 2022 11:34:06 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Message-Id: <5172C572-732C-4F2E-ADFA-F88FD54895CE@gmail.com> Date: Wed, 7 Dec 2022 11:34:05 -0800 X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: -0.0 (/) 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 (-) Theodor Thornhill writes: > Brian Leung writes: > >> Theodor Thornhill writes: >> >>> Not sure I can reproduce this. >> >> Sorry, I made a mistake in my description. I additionally noticed=20 >> additional odd results in java-ts-mode. Let me try again: >> >>> p[u]blic abstract class Class { >>> public static interface Interface { >>> void someMethod(); >>> [*] >>> void otherMethod(); >>> [}] >>> } > > Right - thanks! Now I understand what you describe. I'll try to = answer > them case by case. > >> >> 1. When point is at the "u" in "public", narrow-to-defun cuts off=20 >> "pu" and moves point to "b". > > Yes, this definitely looks like a bug. This is probably because the > whole 'public' keyword maps to the declaration, and we don't move to = the > actual beginning. I can look into this. > >> 2. When point is anywhere in the first line of the class=20 >> declaration, mark-defun highlights "void otherMethod()", instead=20 >> of the entire class declaration. > > Yeah, I think I've fixed this in a patch I just submitted. > >> 3a. When point is at the [*] in between someMethod and=20 >> otherMethod, narrow-to-defun captures "void otherMethod()". I feel=20 >> that since the methods inside the interface declaration have no=20 >> bodies, it makes more sense to capture the entire interface=20 >> definition if point is at [*]. > > Maybe, but I don't believe this is wrong either. > >> 3b. Arguably, even if point were on the method declarations, we=20 >> might still want to (as plain java-mode does) capture the entire=20 >> interface definition, since body-less method declarations don't=20 >> feel especially defun-like. > > Maybe. Can you try applying the below patch and see if this changes > anything for you? > >> 4. When point is on the closing bracket of the interface=20 >> definition, narrow-to-defun captures >> >>> void otherMethod(); >>> } >>> } >> >> which looks quite unusual to me. > > Yes, I agree with this one. My guess is that this is the same as = number > one. > > What do you think? > > Theo There=E2=80=99s a discussion semi-related to this on emacs-devel, where = Alan mentioned this: In CC Mode, it has been configurable via the user option c-defun-tactic for somewhere between ten and fifteen years. When c-defun-tactic is t, C-M-a/e go to the start/end of the top level defuns. When it is the symbol go-outward, C-M-a/e move to the next start/end of defun, if any, at the current level of class/namespace nesting, and move outwards to the next level of class/namespace nesting when a class/namespace = boundary is reached. If we add this option to tree-sitter, user could decide what bahavior they want. I=E2=80=99m planning to work on that. Though there is already something that can more-or-less do this: treesit-defun-prefer-top-level. Yuan From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior Resent-From: Brian Leung Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Dec 2022 03:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Theodor Thornhill Cc: casouri@gmail.com, 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.16705579024755 (code B ref 59853); Fri, 09 Dec 2022 03:52:02 +0000 Received: (at 59853) by debbugs.gnu.org; 9 Dec 2022 03:51:42 +0000 Received: from localhost ([127.0.0.1]:60919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3UQI-0001Ed-9O for submit@debbugs.gnu.org; Thu, 08 Dec 2022 22:51:42 -0500 Received: from mout02.posteo.de ([185.67.36.66]:44641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3UQF-0001EX-Gp for 59853@debbugs.gnu.org; Thu, 08 Dec 2022 22:51:40 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 64BDE240103 for <59853@debbugs.gnu.org>; Fri, 9 Dec 2022 04:51:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1670557893; bh=lHMKhCJohm9zqc4SbpodBeXRBn5BXSjEOqYWfdN7nDA=; h=From:To:Cc:Subject:Date:From; b=pqmvw4OahMJc4bUDUJJ+ew7eTzISyAqi0G+XFO8XjtAs+sOQUtn1RU/rnpmP1WLOh 6YvE6fRWiStvRFDw7yt7WsR4AdINBAfF7o8eLwPJ4E0v8l0Hd3FR2yn8pfLL96wLLY dTi+5t9mkflWRt//vNeHrPtjP352fRtEqmHd9vjv8I592tLpLDRff/QNvVg3Nb4tJj gbOOLvm534Y8mHPdnWtUzy8Svt9L0RIKbI89T+olozeFX1qcdnAJ8kgupqNqSsVW5e Fv6pTauzlnYEm4UlYd01QPY/i+qj94zmHxSa8g7xLO7DnPH2R5taKNJLoJhvgPKinx E3TS/3tIpFHuQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NSxsF1p81z9rxG; Fri, 9 Dec 2022 04:51:29 +0100 (CET) References: <87lenlnjc1.fsf@posteo.net> <87k035vsph.fsf@thornhill.no> <87h6y8oq0x.fsf@posteo.net> <875yeox1hs.fsf@thornhill.no> <87mt7zplpf.fsf@posteo.net> <87k033zbw3.fsf@thornhill.no> From: Brian Leung Date: Fri, 09 Dec 2022 03:35:21 +0000 In-reply-to: <87k033zbw3.fsf@thornhill.no> Message-ID: <87h6y51bgk.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: -0.7 (/) 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.7 (-) Theodor Thornhill writes: >> 2. When point is anywhere in the first line of the class >> declaration, mark-defun highlights "void otherMethod()", >> instead >> of the entire class declaration. > > Yeah, I think I've fixed this in a patch I just submitted. Which commit are you referring to? >> 3a. When point is at the [*] in between someMethod and >> otherMethod, narrow-to-defun captures "void otherMethod()". I >> feel >> that since the methods inside the interface declaration have no >> bodies, it makes more sense to capture the entire interface >> definition if point is at [*]. > > Maybe, but I don't believe this is wrong either. Let me rephrase my request. Consider the following example: > class Cow implements Animal { > public void animalSound() { > // The body of animalSound() is provided here > System.out.println("The cow says: moo"); > } > > [*] > > public void sleep() { > // The body of sleep() is provided here > System.out.println("Zzz"); > } > } Both the methods have bodies. If point is at the [*], I would like for narrow-to-defun to capture the entire class declaration, since point is not really contained in either method. (For this particular example, java-mode presently agrees with java-ts-mode.) Is there a clean way of ensuring that, when point lies between (and is not contained in) those two methods, point is not treated as if it were in one of those methods' tree-sitter nodes? >> 3b. Arguably, even if point were on the method declarations, we >> might still want to (as plain java-mode does) capture the >> entire >> interface definition, since body-less method declarations don't >> feel especially defun-like. > > Maybe. Can you try applying the below patch and see if this > changes > anything for you? It captures the entire interface definition only when I remove "method_declaration" (which we probably want to keep) from the regexp. From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Dec 2022 16:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Brian Leung Cc: casouri@gmail.com, 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.167060157023891 (code B ref 59853); Fri, 09 Dec 2022 16:00:02 +0000 Received: (at 59853) by debbugs.gnu.org; 9 Dec 2022 15:59:30 +0000 Received: from localhost ([127.0.0.1]:36968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3fmb-0006DH-U9 for submit@debbugs.gnu.org; Fri, 09 Dec 2022 10:59:30 -0500 Received: from out2.migadu.com ([188.165.223.204]:42850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3fmZ-0006DB-Cv for 59853@debbugs.gnu.org; Fri, 09 Dec 2022 10:59:28 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1670601566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NhKrrxDH5EiPFy5rrUv9ktVbHAu3neGB2z2v4rQYeVI=; b=D06yxJSfAchmjvZMeeYGthcsZJdGAbcNaKuNUSFvnSM8wQMMha2NBcC9g3k6eQ3Y4CEJ0s QLY1HrPLCL+PzGOPu7TMRUmOmoRXXp5ImHPGu/cHqTq/d/mNtb0t8Ghss7N9WtV96Y8DNS EsRK4fx5fHuV43swv4AhEJR7slPqIvO7g/H1AJtJrxeQIZ8MGKiztOzb5fRdygInrFo4gc 8hq0gewvFuoMoJ9et4hh45rjt8o9fmNzfFkaF9OPpboLXTpwGOuovIdYPH2DFmlGvc1V+c E2syfHMH4o8Qr0BcYHq447qat1Int2kOXFbyotffamK1+9sHs2hVPDzlqkN6/A== From: Theodor Thornhill In-Reply-To: <87h6y51bgk.fsf@posteo.net> References: <87lenlnjc1.fsf@posteo.net> <87k035vsph.fsf@thornhill.no> <87h6y8oq0x.fsf@posteo.net> <875yeox1hs.fsf@thornhill.no> <87mt7zplpf.fsf@posteo.net> <87k033zbw3.fsf@thornhill.no> <87h6y51bgk.fsf@posteo.net> Date: Fri, 09 Dec 2022 16:59:25 +0100 Message-ID: <87tu24in4y.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) 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 (-) Brian Leung writes: > Theodor Thornhill writes: > >>> 2. When point is anywhere in the first line of the class >>> declaration, mark-defun highlights "void otherMethod()", >>> instead >>> of the entire class declaration. >> >> Yeah, I think I've fixed this in a patch I just submitted. > > Which commit are you referring to? > I believe it was the one I included as a patch here. >>> 3a. When point is at the [*] in between someMethod and >>> otherMethod, narrow-to-defun captures "void otherMethod()". I >>> feel >>> that since the methods inside the interface declaration have no >>> bodies, it makes more sense to capture the entire interface >>> definition if point is at [*]. >> >> Maybe, but I don't believe this is wrong either. > > Let me rephrase my request. Consider the following example: > >> class Cow implements Animal { >> public void animalSound() { >> // The body of animalSound() is provided here >> System.out.println("The cow says: moo"); >> } >> >> [*] >> >> public void sleep() { >> // The body of sleep() is provided here >> System.out.println("Zzz"); >> } >> } > > Both the methods have bodies. If point is at the [*], I would like > for narrow-to-defun to capture the entire class declaration, since > point is not really contained in either method. (For this > particular example, java-mode presently agrees with java-ts-mode.) > > Is there a clean way of ensuring that, when point lies between > (and is not contained in) those two methods, point is not treated > as if it were in one of those methods' tree-sitter nodes? > I understand. I think that either we need to tweak the treesit-defun-type-regexp or make use of something like: (treesit-node-on (point) (point)) in the code that searches for beginning/end-of-defun. That code should return what you want, right? >>> 3b. Arguably, even if point were on the method declarations, we >>> might still want to (as plain java-mode does) capture the >>> entire >>> interface definition, since body-less method declarations don't >>> feel especially defun-like. >> >> Maybe. Can you try applying the below patch and see if this >> changes >> anything for you? > > It captures the entire interface definition only when I remove > "method_declaration" (which we probably want to keep) from the > regexp. Yeah. But I believe Yuan is cooking on some code wrt beginning/end-of-defun, so maybe we should just wait and see what he comes up with. Theo From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior References: <87lenlnjc1.fsf@posteo.net> In-Reply-To: <87lenlnjc1.fsf@posteo.net> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Dec 2022 05:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Theodor Thornhill Cc: leungbk@posteo.net, 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.16716002826320 (code B ref 59853); Wed, 21 Dec 2022 05:25:02 +0000 Received: (at 59853) by debbugs.gnu.org; 21 Dec 2022 05:24:42 +0000 Received: from localhost ([127.0.0.1]:49430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7rar-0001dq-VF for submit@debbugs.gnu.org; Wed, 21 Dec 2022 00:24:42 -0500 Received: from mail-pj1-f54.google.com ([209.85.216.54]:52161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7raq-0001df-Eb for 59853@debbugs.gnu.org; Wed, 21 Dec 2022 00:24:41 -0500 Received: by mail-pj1-f54.google.com with SMTP id gt4so14650518pjb.1 for <59853@debbugs.gnu.org>; Tue, 20 Dec 2022 21:24:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=tBZI1/sEXscJGxg6RjMGQJPlc7xCBMi59zOGTRGsKhw=; b=c09mxWIKp3iCLLecLIrVuMFGBzBttV+o9raR6y/9xPJQ17/HMbYg2GNQq9LdXjDBGS fIgMXtMREgwGlDW7B7el+lpQ7+YhI/9bzUVeqktPpmIomkkWFM18LaKbP9s/BRe0QrzP JpBs40TFPUJjgVwyg24Sfs1ZeUaXpB1MkDdjvnB8IZ6xoD5N73dMzzyFd8NFcbIZ2dzb BfGtn0/Gk07DgZ7CaBm9LLbPmpv2nb+n8g+fVnJuNjBtK957N+jsCIMHPPcEFn1bwMAD ZmWGziGh6rExrQ+aq0QBR2nyy9QL64KS4lm2whG+wfAARRxpRwhoVoyOrI9UFzJaVBgn 5heQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tBZI1/sEXscJGxg6RjMGQJPlc7xCBMi59zOGTRGsKhw=; b=K5dSlt9qGxAQBblyP+lyHhoHXIJPORo7m5MPpm1S1axR2ZBjfKmhJr5H+XrTdhM5Sf zOW+Pt5Ssvj2VqYSQK7zS5RB1Q6DI5gLZ3+R2NWkVBnqu6RUrOQ9xS6yLdAKx5inuGCx SyAYUp+YXxZywIFN9Om3snaIm90RprXa+ZJCQLm35pQ2vX9CwtEVGzkWi6u70l1dGDTc 4Mn3v1kHhyT8RjRleFMqYVLCE6DZ3kSpF994LTxys1S4XI5YhI8cxPaIohlm6sK11iqB 6kBjJcxNKFxBP8+w1m4Oni7pvVH+j6Z0NKmOnEIF89MuRk82ue7+rGlyiJtyno4aZd/r w9FA== X-Gm-Message-State: AFqh2kp765JbUQle6vlG8zSugTi2ZQRLOt7rJxjLdcmtQ7cNhSv2fW79 s5H4upleNmiCjTlhWA7tvYM= X-Google-Smtp-Source: AMrXdXuOX9sCOxM8cJ6XdqNaRMlj2KiT2VWqhwT/a81IKRKl3q73LygCdE2QQ836zQf81uR4S7xo0Q== X-Received: by 2002:a17:90a:e50d:b0:20d:bd60:ada4 with SMTP id t13-20020a17090ae50d00b0020dbd60ada4mr18328830pjy.32.1671600274494; Tue, 20 Dec 2022 21:24:34 -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 z15-20020a17090a66cf00b00223ed94759csm440086pjl.39.2022.12.20.21.24.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Dec 2022 21:24:34 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Message-Id: <59CB3DA5-FC95-4604-893B-2697114BD445@gmail.com> Date: Tue, 20 Dec 2022 21:24:32 -0800 X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: -0.0 (/) 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 (-) Theodor Thornhill writes: > Brian Leung writes: > >> Theodor Thornhill writes: >> >>>> 2. When point is anywhere in the first line of the class=20 >>>> declaration, mark-defun highlights "void otherMethod()",=20 >>>> instead=20 >>>> of the entire class declaration. >>> >>> Yeah, I think I've fixed this in a patch I just submitted. >> >> Which commit are you referring to? >> > > I believe it was the one I included as a patch here. > >>>> 3a. When point is at the [*] in between someMethod and=20 >>>> otherMethod, narrow-to-defun captures "void otherMethod()". I=20 >>>> feel=20 >>>> that since the methods inside the interface declaration have no=20 >>>> bodies, it makes more sense to capture the entire interface=20 >>>> definition if point is at [*]. >>> >>> Maybe, but I don't believe this is wrong either. >> >> Let me rephrase my request. Consider the following example: >> >>> class Cow implements Animal { >>> public void animalSound() { >>> // The body of animalSound() is provided here >>> System.out.println("The cow says: moo"); >>> } >>> >>> [*] >>> >>> public void sleep() { >>> // The body of sleep() is provided here >>> System.out.println("Zzz"); >>> } >>> } >> >> Both the methods have bodies. If point is at the [*], I would like=20 >> for narrow-to-defun to capture the entire class declaration, since=20 >> point is not really contained in either method. (For this=20 >> particular example, java-mode presently agrees with java-ts-mode.) >> >> Is there a clean way of ensuring that, when point lies between=20 >> (and is not contained in) those two methods, point is not treated=20 >> as if it were in one of those methods' tree-sitter nodes? >> > > I understand. I think that either we need to tweak the > treesit-defun-type-regexp or make use of something like: > > (treesit-node-on (point) (point)) in the code that searches for > beginning/end-of-defun. > > That code should return what you want, right? > >>>> 3b. Arguably, even if point were on the method declarations, we=20 >>>> might still want to (as plain java-mode does) capture the=20 >>>> entire=20 >>>> interface definition, since body-less method declarations don't=20 >>>> feel especially defun-like. >>> >>> Maybe. Can you try applying the below patch and see if this=20 >>> changes >>> anything for you? >> >> It captures the entire interface definition only when I remove=20 >> "method_declaration" (which we probably want to keep) from the=20 >> regexp. > > Yeah. But I believe Yuan is cooking on some code wrt > beginning/end-of-defun, so maybe we should just wait and see what he > comes up with. I=E2=80=99ve cooked and served said code. Now beginning/end-of-defun = should work reliably, and you can configure its behavior with treesit-defun-tactic. I also fixed c-ts-mode-indent-defun with the new defun functions. Yuan From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior References: <87lenlnjc1.fsf@posteo.net> In-Reply-To: <87lenlnjc1.fsf@posteo.net> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Dec 2022 05:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Theodor Thornhill Cc: leungbk@posteo.net, 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.16716005296528 (code B ref 59853); Wed, 21 Dec 2022 05:29:01 +0000 Received: (at 59853) by debbugs.gnu.org; 21 Dec 2022 05:28:49 +0000 Received: from localhost ([127.0.0.1]:49457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7req-0001hE-F3 for submit@debbugs.gnu.org; Wed, 21 Dec 2022 00:28:48 -0500 Received: from mail-pf1-f175.google.com ([209.85.210.175]:42808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7reo-0001h7-7j for 59853@debbugs.gnu.org; Wed, 21 Dec 2022 00:28:46 -0500 Received: by mail-pf1-f175.google.com with SMTP id 65so9934215pfx.9 for <59853@debbugs.gnu.org>; Tue, 20 Dec 2022 21:28:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=EmQhS2PmRckoar3rrw61mWIVeqmrJM1hpUfvMcvf00U=; b=peaGRko2oo3fg3ykQQWa0uHvcZJSXCftWMc3Y+u165tEJ2SWtiZA+wqWYv+bJckM8w kK8TJTXsBFGXU8X0RY52SoLFvrh4ncbeoVPocInz6hS1/dka4I4ot1vK3DB5sJxzCxpw fBk5Gjj+e2nMhlA2B6ksKdcB2BCJ3aHOX6fH24LqGI7+REjU3jTeEn4D9vvTwuPlp8D6 Drrj8JF8OnFpB/6ceqOQaMV08o70falBb/YmKcJHFDHtlzosWN059FpCKv3WNUt8xo3e uHht06LXCsJMAiKpo1Rjsy4yRsvZfX0p9BoRWu6uHh0ylt/OvDNoY9aOWTBm5kBIsV2L 07Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EmQhS2PmRckoar3rrw61mWIVeqmrJM1hpUfvMcvf00U=; b=PtB9kiopXe15E/2z8stbxw/7Jd/HCTpi3/z9BCAH8eohZkWxkk6vA+8ZLUhAdCcNbW Dwh2dAnjLQ1aaRapyf+3oRLggp+Rh/9gYdw8cAMguszzi0Kp59cPeJ30xKCG45WM1c3V wk/P45kp+CxHTbzfJNluKAYdrLbOCUFypUEFmUAQSrfQan0vDTlDDaoo1gdGQG0hPQ8O k+AHXJptddcp+u+vKgjY3i2JgVcUdO7cggNpi7dZC0CWAJl5fxnVy6rJb2tjqzuFviAF Tu223AhHvjDpl4lF+GnQHagI6/hkz4IGZA1b++jJLscBChUb+c8L1xBAs/eBLG7JYnlI F4gg== X-Gm-Message-State: AFqh2kpc0FhLh3jjrtJ9eigOUsbKrrx3k1V3M7QMpChiDC6tQgwY2Uda Pl5rm5ceiZJBhDOQmLim3/A= X-Google-Smtp-Source: AMrXdXuoh4qND+LvGdSqoOEFkWCuPXrM0PNLp30JgNugXaluMnFEgE637UaVi88rxvF04zuT1o0tjg== X-Received: by 2002:aa7:9e5d:0:b0:57d:c4f3:d4aa with SMTP id z29-20020aa79e5d000000b0057dc4f3d4aamr1125956pfq.23.1671600520061; Tue, 20 Dec 2022 21:28:40 -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 x20-20020aa79574000000b00528a097aeffsm9577939pfq.118.2022.12.20.21.28.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Dec 2022 21:28:39 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Message-Id: <03F610B9-9B11-4AB8-BE17-A8CB777AE73E@gmail.com> Date: Tue, 20 Dec 2022 21:28:38 -0800 X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: 0.0 (/) 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 (-) Theodor Thornhill writes: > Brian Leung writes: > >> Theodor Thornhill writes: >> >>>> 2. When point is anywhere in the first line of the class=20 >>>> declaration, mark-defun highlights "void otherMethod()",=20 >>>> instead=20 >>>> of the entire class declaration. >>> >>> Yeah, I think I've fixed this in a patch I just submitted. >> >> Which commit are you referring to? >> > > I believe it was the one I included as a patch here. > >>>> 3a. When point is at the [*] in between someMethod and=20 >>>> otherMethod, narrow-to-defun captures "void otherMethod()". I=20 >>>> feel=20 >>>> that since the methods inside the interface declaration have no=20 >>>> bodies, it makes more sense to capture the entire interface=20 >>>> definition if point is at [*]. >>> >>> Maybe, but I don't believe this is wrong either. >> >> Let me rephrase my request. Consider the following example: >> >>> class Cow implements Animal { >>> public void animalSound() { >>> // The body of animalSound() is provided here >>> System.out.println("The cow says: moo"); >>> } >>> >>> [*] >>> >>> public void sleep() { >>> // The body of sleep() is provided here >>> System.out.println("Zzz"); >>> } >>> } >> >> Both the methods have bodies. If point is at the [*], I would like=20 >> for narrow-to-defun to capture the entire class declaration, since=20 >> point is not really contained in either method. (For this=20 >> particular example, java-mode presently agrees with java-ts-mode.) >> >> Is there a clean way of ensuring that, when point lies between=20 >> (and is not contained in) those two methods, point is not treated=20 >> as if it were in one of those methods' tree-sitter nodes? >> > > I understand. I think that either we need to tweak the > treesit-defun-type-regexp or make use of something like: > > (treesit-node-on (point) (point)) in the code that searches for > beginning/end-of-defun. > > That code should return what you want, right? > >>>> 3b. Arguably, even if point were on the method declarations, we=20 >>>> might still want to (as plain java-mode does) capture the=20 >>>> entire=20 >>>> interface definition, since body-less method declarations don't=20 >>>> feel especially defun-like. >>> >>> Maybe. Can you try applying the below patch and see if this=20 >>> changes >>> anything for you? >> >> It captures the entire interface definition only when I remove=20 >> "method_declaration" (which we probably want to keep) from the=20 >> regexp. > > Yeah. But I believe Yuan is cooking on some code wrt > beginning/end-of-defun, so maybe we should just wait and see what he > comes up with. Oh wait, this report is about narrow-to-defun rather than c-ts-mode-indent-defun, err that=E2=80=99s not fixed yet, because beginning/end-of-defun doens=E2=80=99t use tree-sitter anymore = (headache). I=E2=80=99ll try to address this soon. Yuan From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior References: <87lenlnjc1.fsf@posteo.net> In-Reply-To: <87lenlnjc1.fsf@posteo.net> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Dec 2022 09:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Theodor Thornhill Cc: leungbk@posteo.net, 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.167169956517834 (code B ref 59853); Thu, 22 Dec 2022 09:00:02 +0000 Received: (at 59853) by debbugs.gnu.org; 22 Dec 2022 08:59:25 +0000 Received: from localhost ([127.0.0.1]:57104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8HQD-0004da-6X for submit@debbugs.gnu.org; Thu, 22 Dec 2022 03:59:25 -0500 Received: from mail-pj1-f44.google.com ([209.85.216.44]:55902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8HQA-0004dU-PL for 59853@debbugs.gnu.org; Thu, 22 Dec 2022 03:59:23 -0500 Received: by mail-pj1-f44.google.com with SMTP id u5so1249367pjy.5 for <59853@debbugs.gnu.org>; Thu, 22 Dec 2022 00:59:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=9QwiAIZpvxoUTVJ6WkD4xztmHuP++/B9NUlRibPYDOU=; b=ht5JHJQ732rITYt88t1ZektMKoCPEd7SIqwY2W8HJCyjH3OL64gqd/V9Qj0nhXw2BE kyqBTLkacHSfR0kWafO0+CrJ4W5ZvxGnOjhWpP4yqDmQnYRQ6ohTey/DP/VtpXTYSohI lQkE6EvfzlfIlbRKQeWlPXFX6+a8xo2dVKYs5/89j0IP6LDoC4SfDKHLLDI4bJzPI2AP 6Q6kdfyg+d8bRsZnafnBiOyR2AUkQUBL/0ttgBv2a1dm7HDar/xqu0Jgh1DCq7gQc4W3 5NaXZofdlKHhvCdESONLOQt+0Q8pJrA3iX25tnRg6fO0NnIBy6A1fki8mXqVk7OZj06b BR0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9QwiAIZpvxoUTVJ6WkD4xztmHuP++/B9NUlRibPYDOU=; b=avCP2qNhTEzMcz6RcMK+Heu/BkmmhqLghTaswXHAXMhMGXqlN9Eqaqpc8zbVcFqgI0 vW4hF1AlqLTJOo3XaQd36UMiegHNO8xRToEs1u2FkMv5q1NtFEtA7EKGOYkQPF58jplD kBKIrAYbd0cAzR4bGzRUevUnis6+OuaqpybOF73dLY0YSZRLc8NkGaCTKjxyl7GabbwS tjzyu2I4e8gDm4YRysSmXPakyiiwK0Rih4N4Axpjyq2yLlGgg4rSpr1zHlBnE+q+hJNV mLApK5FQh8yuy7uTXuu/t0TJehxFeAA5LU1JDiUrH8tN97sriR7Pc7qGkwZ2BZoSna0g 8xKg== X-Gm-Message-State: AFqh2kodW9DnOkdcByCo2uoHLfg5SFAMiDTfsv6ERDR7iaxPB7wJ9t3G lgGfwhbfUs5BKcOquxc/F4c= X-Google-Smtp-Source: AMrXdXunJk6HiHFKGlCXUxkQMg+bQAt2HJBplaOzm63CH2Bv3EHUdNsK32bepaKXSpIg5tXth9Z1HA== X-Received: by 2002:a17:902:8f87:b0:189:b36a:5448 with SMTP id z7-20020a1709028f8700b00189b36a5448mr4942760plo.44.1671699556817; Thu, 22 Dec 2022 00:59:16 -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 u6-20020a170902e5c600b00189e1522982sm12885535plf.168.2022.12.22.00.59.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Dec 2022 00:59:16 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Message-Id: Date: Thu, 22 Dec 2022 00:59:15 -0800 X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: -0.0 (/) 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 (-) Yuan Fu writes: > Theodor Thornhill writes: > >> Brian Leung writes: >> >>> Theodor Thornhill writes: >>> >>>>> 2. When point is anywhere in the first line of the class=20 >>>>> declaration, mark-defun highlights "void otherMethod()",=20 >>>>> instead=20 >>>>> of the entire class declaration. >>>> >>>> Yeah, I think I've fixed this in a patch I just submitted. >>> >>> Which commit are you referring to? >>> >> >> I believe it was the one I included as a patch here. >> >>>>> 3a. When point is at the [*] in between someMethod and=20 >>>>> otherMethod, narrow-to-defun captures "void otherMethod()". I=20 >>>>> feel=20 >>>>> that since the methods inside the interface declaration have no=20 >>>>> bodies, it makes more sense to capture the entire interface=20 >>>>> definition if point is at [*]. >>>> >>>> Maybe, but I don't believe this is wrong either. >>> >>> Let me rephrase my request. Consider the following example: >>> >>>> class Cow implements Animal { >>>> public void animalSound() { >>>> // The body of animalSound() is provided here >>>> System.out.println("The cow says: moo"); >>>> } >>>> >>>> [*] >>>> >>>> public void sleep() { >>>> // The body of sleep() is provided here >>>> System.out.println("Zzz"); >>>> } >>>> } >>> >>> Both the methods have bodies. If point is at the [*], I would like=20= >>> for narrow-to-defun to capture the entire class declaration, since=20= >>> point is not really contained in either method. (For this=20 >>> particular example, java-mode presently agrees with java-ts-mode.) >>> >>> Is there a clean way of ensuring that, when point lies between=20 >>> (and is not contained in) those two methods, point is not treated=20 >>> as if it were in one of those methods' tree-sitter nodes? That=E2=80=99s hard to do with the current narrow-to-defun, we can add a new version that is aware of nested defuns and remap narrow-to-defun to it in tree-sitter modes. In the future we can improve stock narrow-to-defun to support nested defuns. Yuan From unknown Mon Jun 23 23:51:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59853: 30.0.50; tree-sitter modes have unexpected beginning-of-defun behavior References: <87lenlnjc1.fsf@posteo.net> In-Reply-To: <87lenlnjc1.fsf@posteo.net> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Jan 2023 23:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Theodor Thornhill Cc: leungbk@posteo.net, 59853@debbugs.gnu.org Received: via spool by 59853-submit@debbugs.gnu.org id=B59853.167313314128493 (code B ref 59853); Sat, 07 Jan 2023 23:13:02 +0000 Received: (at 59853) by debbugs.gnu.org; 7 Jan 2023 23:12:21 +0000 Received: from localhost ([127.0.0.1]:59216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEIMP-0007PU-FL for submit@debbugs.gnu.org; Sat, 07 Jan 2023 18:12:21 -0500 Received: from mail-pj1-f45.google.com ([209.85.216.45]:42780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEIMO-0007PH-7E for 59853@debbugs.gnu.org; Sat, 07 Jan 2023 18:12:20 -0500 Received: by mail-pj1-f45.google.com with SMTP id z9-20020a17090a468900b00226b6e7aeeaso5550928pjf.1 for <59853@debbugs.gnu.org>; Sat, 07 Jan 2023 15:12:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=WlgvYknCHZpeh4ciuLPDawytdkoeyQaBsUvgJO7HMx0=; b=MUrLo9adUZbs1GzL+Fu6cQ4eGzMDSi89j9B73GDV8hWW1hcX0Sv9JgfQA2kSIXbLnZ vIHK43f86YMhQSX6bmTFewMtuPdnsLW6kIVn49/wPrMg45oTkcfjDLnJ+7/MDQkqg+ZC C6vlEQSqOavWGvqp1z+IBE3ytjCzxCu6fuGCu+JXC2aqidJu4YJ5enGY8sr9+V6L2O3T ZkhC7GFel9ocxlekBWZoi/DrX38WBN/rJMJSOABfeuOVYC7BH8PrTZOHRtBWFFEpNrEk S1qvogZBWk0FnIJWcQN/phrWGHiK0nwcCHKTKZJrMqwfGRKqh1BZZnkZwp7y28KpD68L BlaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WlgvYknCHZpeh4ciuLPDawytdkoeyQaBsUvgJO7HMx0=; b=wdTJp0Qw2hJPUks/X7qWKEHHoY8SAkAxd0mHbYuradH42ugnPcNE9OM9qm3cdD/CeG gbQpplmrBio3TT+lgYAdro8Hs9fiyXYn5wCFr/9+siKRjNWxAOZ8RkBddlvWkTOjmrRe 4fxgFzYtwFYzKJkBSdYxzDXQqTZ7xPh2XGrYphPuSZpKjJ4Cv3rcccsmBydrgkqTrZT0 xlHozdfYg7mwKu/YUhu6scdqUCY0tSFkWG6t7zk9nNoHjBUZsme+vDci4FWLbQUQYUk7 FaMSA3ixqNNr0DHO1PHxynuI9jZc/iqVXAc2o1CpWwhsvPz2y/289cG4LaC2nd4nTsfn S4AQ== X-Gm-Message-State: AFqh2kqz09ofdQuZKw6G4NBo2wPnnqdgyEQ48+Q2wo0R57d23P6IJVg6 uheMqlGhZQ2VotbkHHAAuSo= X-Google-Smtp-Source: AMrXdXvSsQqA2GeoglbBsHxuMuWAJFNZ8NzflTggXf7jw+NP3476KrpRXRXEbudOGUM69XT9lzdmDw== X-Received: by 2002:a05:6a20:1bd9:b0:ad:efda:5e5d with SMTP id cv25-20020a056a201bd900b000adefda5e5dmr61678396pzb.61.1673133134633; Sat, 07 Jan 2023 15:12:14 -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 u7-20020a17090341c700b00186e34524e3sm3239472ple.136.2023.01.07.15.12.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jan 2023 15:12:14 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Message-Id: Date: Sat, 7 Jan 2023 15:12:13 -0800 X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: 0.0 (/) 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 (-) Yuan Fu writes: > Yuan Fu writes: > >> Theodor Thornhill writes: >> >>> Brian Leung writes: >>> >>>> Theodor Thornhill writes: >>>> >>>>>> 2. When point is anywhere in the first line of the class=20 >>>>>> declaration, mark-defun highlights "void otherMethod()",=20 >>>>>> instead=20 >>>>>> of the entire class declaration. >>>>> >>>>> Yeah, I think I've fixed this in a patch I just submitted. >>>> >>>> Which commit are you referring to? >>>> >>> >>> I believe it was the one I included as a patch here. >>> >>>>>> 3a. When point is at the [*] in between someMethod and=20 >>>>>> otherMethod, narrow-to-defun captures "void otherMethod()". I=20 >>>>>> feel=20 >>>>>> that since the methods inside the interface declaration have no=20= >>>>>> bodies, it makes more sense to capture the entire interface=20 >>>>>> definition if point is at [*]. >>>>> >>>>> Maybe, but I don't believe this is wrong either. >>>> >>>> Let me rephrase my request. Consider the following example: >>>> >>>>> class Cow implements Animal { >>>>> public void animalSound() { >>>>> // The body of animalSound() is provided here >>>>> System.out.println("The cow says: moo"); >>>>> } >>>>> >>>>> [*] >>>>> >>>>> public void sleep() { >>>>> // The body of sleep() is provided here >>>>> System.out.println("Zzz"); >>>>> } >>>>> } >>>> >>>> Both the methods have bodies. If point is at the [*], I would like=20= >>>> for narrow-to-defun to capture the entire class declaration, since=20= >>>> point is not really contained in either method. (For this=20 >>>> particular example, java-mode presently agrees with java-ts-mode.) >>>> >>>> Is there a clean way of ensuring that, when point lies between=20 >>>> (and is not contained in) those two methods, point is not treated=20= >>>> as if it were in one of those methods' tree-sitter nodes? > > That=E2=80=99s hard to do with the current narrow-to-defun, we can add = a > new version that is aware of nested defuns and remap narrow-to-defun = to > it in tree-sitter modes. In the future we can improve stock > narrow-to-defun to support nested defuns. > > Yuan Defun navigatio is largely fixed now, so I=E2=80=99m closing this. For narrow-to-defun to completely work we need to improve beginning/end-of-defun to support nested defuns. Yuan From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 18:12:29 2023 Received: (at control) by debbugs.gnu.org; 7 Jan 2023 23:12:29 +0000 Received: from localhost ([127.0.0.1]:59219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEIMW-0007Pv-S8 for submit@debbugs.gnu.org; Sat, 07 Jan 2023 18:12:29 -0500 Received: from mail-pl1-f180.google.com ([209.85.214.180]:46064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEIMV-0007Pd-Dk for control@debbugs.gnu.org; Sat, 07 Jan 2023 18:12:27 -0500 Received: by mail-pl1-f180.google.com with SMTP id g16so5560796plq.12 for ; Sat, 07 Jan 2023 15:12:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=l+B6GUzkiBvUqz5Kb3pIEUKjvL88zFRQ468UwnPmnic=; b=qBrr1vy+9tm26jB++bROur0kL7+I3nJIExorfqfol7HnQlBZEmmQoFOgUOZuFY6BIE RMd91RLzM/X5Pi0u2Fm8kCBbDlKAGLx00YEgCTmBoI0TDeNVToljKPuKTE6eHtqJhBNS rfN5HbfwfSTeWRpKT7LcO3QX8TXd0MM15e8Uxivvb+P0iQRkSx4LIokL62gYT2Km7tBk THC59d3tK/cAH0czjbWIIBdB9JUEzSeFhLHCLLKsgWGyo59oAJWrGNQ7gguEAp+k2JoX 1u6KDjhz22hmrkMcCCPbwf96uSCkWS49zInwhzeazKaGt4gfQvQgsjPVhL4ZKsGmuuQj iDvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l+B6GUzkiBvUqz5Kb3pIEUKjvL88zFRQ468UwnPmnic=; b=Aa5a8aIQ0QMbcO71bk5JJ6LP4DDHD5Atxug1CMiRDV8UJWFcdx6agaUtd5pZLZGZJ8 aoEHyK2XQYTeLs99qz5EMXmOXzTqSwlRvh9ha8nQSP7h8bY8mMt67bBROPrJTPrXk5uD pwZnY2R9/igS2EcIwUJE0O9m1+DlIZDM4+COiIszteV8B3nOD0FVQKtziUxnV005HqcD ZQnp3p7g8HqoUyN4f/BjPWZG3KNMDxcNKdGRVHHEfnG/cBdhlCGi4RJgiU5O4fZyyLR8 mcGlUmTYg9My8h2UBEQ+eCHN74HGkjQn+6kS0jQLsPvPVP2u/sN+k/kGI1JeLeUL7uIt UDiw== X-Gm-Message-State: AFqh2krG4y2Sr6L9KL94dmPd58hAeTxvtNSKBxKVi8upvL/75kNZwV4a Z2GtwJHceoFMQOI0lE1eXZ+4c9en+R4= X-Google-Smtp-Source: AMrXdXsaR4cnc2gDeGVr09JBy5cQc2/xwWoiPQALpc7y0VssFbA/CrKtX49DoCZkqmjrzvc5+ZVwbg== X-Received: by 2002:a17:902:f80c:b0:189:340c:20c4 with SMTP id ix12-20020a170902f80c00b00189340c20c4mr62446264plb.66.1673133141629; Sat, 07 Jan 2023 15:12:21 -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 u7-20020a17090341c700b00186e34524e3sm3239472ple.136.2023.01.07.15.12.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jan 2023 15:12:21 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: control message for bug #59853 Message-Id: Date: Sat, 7 Jan 2023 15:12:20 -0800 To: control@debbugs.gnu.org X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) close 59853 29.1 quit