From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=E5=B7=9D=E6=9C=AC_?= =?UTF-8?Q?=E7=90=A2=E4=BA=8C?= (Dr.Sc.KAWAMOTO, Takuji) Newsgroups: gmane.emacs.bugs Subject: bug#71205: 29.3; Automatic indentation of c-ts-mode doesn't work well for me. Date: Sun, 26 May 2024 13:32:37 +0900 Message-ID: <0cbf7e4d-7143-4d7b-82f9-f710110a092b@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10480"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 71205@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 26 09:38:10 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sB8SH-0002Q3-GA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 May 2024 09:38:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sB8S5-0004zT-5b; Sun, 26 May 2024 03:37:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sB8S2-0004x9-PD for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 03:37:54 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sB8S2-00020u-Gh for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 03:37:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sB8S9-0006vt-U7 for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 03:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=E5=B7=9D=E6=9C=AC_?= =?UTF-8?Q?=E7=90=A2=E4=BA=8C?= (Dr.Sc.KAWAMOTO, Takuji) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 May 2024 07:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71205 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171670905326607 (code B ref -1); Sun, 26 May 2024 07:38:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 May 2024 07:37:33 +0000 Original-Received: from localhost ([127.0.0.1]:38245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sB8Rg-0006v3-HN for submit@debbugs.gnu.org; Sun, 26 May 2024 03:37:33 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sB5ZD-00029h-LK for submit@debbugs.gnu.org; Sun, 26 May 2024 00:33:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sB5Z5-0003G0-Dp for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 00:32:59 -0400 Original-Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sB5Yp-0006oZ-Im for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 00:32:59 -0400 Original-Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1f480624d04so4051295ad.2 for ; Sat, 25 May 2024 21:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716697960; x=1717302760; darn=gnu.org; h=content-transfer-encoding:subject:to:from:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=B8kGLpAsGJvMrKTXMMq427a9xJg2OYpJbYdfnlJt9aI=; b=C8h8rC18JQtEn19eFHh5vVEqUjICa7EelyDLrPbWj6yTX3n9OXJE1hrBsRZozfsnXA ot/yQ40ih2rqIDcnb1uTJYXlJ7GjiRk1FdYAQwHEh3i+7SJQGGg/N9r+FbYdrFO7J/AY BZ/j6eh90o3XYLMSRq8JNMmsdUB+VpI6vLkIOIv+2HuJob3lUUtLkkYTyeqEjbLQCZft DFKOsF+NB6my1Dn7wWuQ8BTIz1n9/8mOIJA3hEanqvgvfbGZ4Q7jCQi7LfYKM9UilFEZ erLWBqMuLS+9Nvdym93hxax0EtUjkUb1vLovfWHiRFe8E5IkCCGU2Pxv7+0bOkDBgL98 1q8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716697960; x=1717302760; h=content-transfer-encoding:subject:to:from:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=B8kGLpAsGJvMrKTXMMq427a9xJg2OYpJbYdfnlJt9aI=; b=Ckw+WTSlmn0FG6FfrBKHitNYD9/QWycd6A6g2dfg1eybCmabBCiXW86MOj9Bmi7Xjh Lh6LRYk9ofe6TvMti9RHCVr2MJRL/OjDh/hmlMc+vmrYTwmQrI7Jec+AJ7xQRe1S7gFV hktPS9ukkH+dcl64K3ppnSR5Nn04i1qyE7XrJ6HJuSCpsIkCLO6rh7cTde5ajUZRMlm5 8Zjhb0bmTs0AYSrwKuaseOMRBaM4ok/t8pdcJjYnkdWH85vQra5V9831gwOWlKZjSUdT oUnI5zVJi53jUIMH+REY8KFOwykILccbU/3hV6tb2Y+D1gz4eWKuvYzsLbP3gqMyk4a8 WzaQ== X-Gm-Message-State: AOJu0YwPSF4yVheOSDhdkz9oqZaKsJPf6YlImlcJDaBGLjSoymmyyk11 Zjdr7CVNBukdKVdC5Q1hDb0IP7ki8f2rSROKtFAdnLWTLv10KyUt4xzx804s X-Google-Smtp-Source: AGHT+IG47jL+ZRVGTPoErux1eC8QpMu2gVj2K2c9uhERS4B2J4ieppFq9+Lcbvn33H8l/uesS+IIiA== X-Received: by 2002:a17:903:230a:b0:1f3:35ff:ad25 with SMTP id d9443c01a7336-1f449900e24mr92156075ad.63.1716697960082; Sat, 25 May 2024 21:32:40 -0700 (PDT) Original-Received: from [192.168.31.26] (178.234.156.114.ap.dti.ne.jp. [114.156.234.178]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c9a4fadsm37440005ad.224.2024.05.25.21.32.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 May 2024 21:32:39 -0700 (PDT) Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=kawamoto.takuji@gmail.com; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 26 May 2024 03:37:31 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285927 Archived-At: Dear emacs-devel maintainers. Automatic indentation of c-ts-mode doesn't work well for me. I tried it in two environments, and neither worked properly. - homebrew cask emacs 29.3 on MacBookAir M1 2020 Sonoma 14.4.1 - emacs 29.1 on FreeBSD 13.2-RELEASE-p3 I have elpa package `~/.emacs.d/elpa/treesit-auto-20240511.1425` . I have the following language bundles in `~/.emacs.d/tree-sitter` on MacBookAir, -rwxr-xr-x 1 XXXXX staff 664K  5 23 17:41 libtree-sitter-c.dylib -rwxr-xr-x 1 XXXXX staff 3.8M  5 23 17:41 libtree-sitter-cpp.dylib -rwxr-xr-x 1 XXXXX staff 648K  5 23 17:44 libtree-sitter-python.dylib and on FreeBSD, -rwxr-xr-x 1 XXXXX XXXXX 618K May 23 23:12 libtree-sitter-c.so -rwxr-xr-x 1 XXXXX XXXXX 3.7M May 23 23:12 libtree-sitter-cpp.so I have a simple `~/.emacs.d/init.el` the follows, -------------- init.el begins --------------------- (use-package treesit   :config   (setq treesit-font-lock-level 4)) (use-package treesit-auto   :ensure t   :config   (setq treesit-auto-install t)   (global-treesit-auto-mode)) ---------------- init.el ends --------------------- The steps to reproduce are as follows. 1. Start emacs. 2. Open the C source code file and write the following content. ----------- c source code file begins ------------- void test(void) {   do🔳 ----------- c source code file ends --------------- 3. Place the cursor after `do` and press Return. Expected behaviour is automatic indentation. I want to move the cursor to the 5th column of the next line. However, the observed behavior is NOT indentation. The cursor moves to the 1st column of the next line. For reference, the column position of `do` was moved correctly the 3rd column with automatic indentation. Thanx. In GNU Emacs 29.3 (build 1, aarch64-apple-darwin21.6.0, NS  appkit-2113.60 Version 12.6.6 (Build 21G646)) of 2024-03-24 built on  armbob.lan Windowing system distributor 'Apple', version 10.3.2487 System Description:  macOS 14.4.1 Configured using:  'configure --with-ns '--enable-locallisppath=/Library/Application  Support/Emacs/${version}/site-lisp:/Library/Application  Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000  -DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no' Configured features: ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB Important settings:   value of $LANG: en_US.UTF-8   value of $XMODIFIERS: @im=uim   locale-coding-system: utf-8-unix Major mode: C/* Minor modes in effect:   global-treesit-auto-mode: t   tooltip-mode: t   global-eldoc-mode: t   show-paren-mode: t   electric-indent-mode: t   mouse-wheel-mode: t   tool-bar-mode: t   menu-bar-mode: t   file-name-shadow-mode: t   global-font-lock-mode: t   font-lock-mode: t   blink-cursor-mode: t   line-number-mode: t   indent-tabs-mode: t   transient-mark-mode: t   auto-composition-mode: t   auto-encryption-mode: t   auto-compression-mode: t Load-path shadows: /Users/kawamoto/.emacs.d/elpa/transient-20230120.1559/transient hides /Applications/Emacs.app/Contents/Resources/lisp/transient /Users/kawamoto/.emacs.d/elpa/use-package-20210207.1926/use-package-jump hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-jump /Users/kawamoto/.emacs.d/elpa/use-package-20210207.1926/use-package-ensure hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-ensure /Users/kawamoto/.emacs.d/elpa/use-package-20210207.1926/use-package-core hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-core /Users/kawamoto/.emacs.d/elpa/use-package-20210207.1926/use-package-delight hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-delight /Users/kawamoto/.emacs.d/elpa/use-package-20210207.1926/use-package-diminish hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-diminish /Users/kawamoto/.emacs.d/elpa/use-package-20210207.1926/use-package hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package /Users/kawamoto/.emacs.d/elpa/use-package-20210207.1926/use-package-bind-key hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-bind-key /Users/kawamoto/.emacs.d/elpa/bind-key-20210210.1609/bind-key hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/bind-key /Users/kawamoto/.emacs.d/elpa/use-package-20210207.1926/use-package-lint hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-lint /Users/kawamoto/.emacs.d/elpa/csharp-mode-20210826.421/csharp-mode hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/csharp-mode /Users/kawamoto/.emacs.d/elpa/hierarchy-20190425.842/hierarchy hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/hierarchy Features: (shadow sort mail-extr emacsbug message yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils vc-dispatcher vc-svn c++-ts-mode c-ts-mode c-ts-common time-date treesit-auto use-package-ensure treesit cl-extra help-mode use-package-core ag-autoloads tex-site easy-mmode dap-mode-autoloads exec-path-from-shell-autoloads ggtags-autoloads gnuplot-autoloads helm-easymenu helpful-autoloads rx lsp-docker-autoloads lsp-treemacs-autoloads lsp-mode-autoloads markdown-preview-mode-autoloads multi-term-autoloads leaf-autoloads search-web-autoloads selected-autoloads tab-group-autoloads treemacs-all-the-icons-autoloads treemacs-evil-autoloads evil-autoloads goto-chg-autoloads treemacs-icons-dired-autoloads treemacs-magit-autoloads treemacs-persp-autoloads persp-mode-autoloads treemacs-projectile-autoloads treemacs-tab-bar-autoloads treemacs-autoloads treesit-auto-autoloads advice uuidgen-autoloads web-server-autoloads websocket-autoloads which-key-autoloads yaml-autoloads yasnippet-snippets-autoloads yasnippet-autoloads info 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/ns-win ns-win ucs-normalize mule-util term/common-win 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 kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 97390 6196)  (symbols 48 11132 0)  (strings 32 36648 3094)  (string-bytes 1 1326147)  (vectors 16 17409)  (vector-slots 8 243151 10031)  (floats 8 35 24)  (intervals 56 294 0)  (buffers 984 12))