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: Fri, 7 Jun 2024 00:53:02 +0900 Message-ID: References: <0cbf7e4d-7143-4d7b-82f9-f710110a092b@gmail.com> <867cfhxa8o.fsf@gnu.org> <8103A524-0785-4BEB-9744-F755A74B6B12@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="29797"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 71205@debbugs.gnu.org To: Yuan Fu , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 07 05:51:42 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 1sFQdi-0007cc-4f for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Jun 2024 05:51:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFQcu-0005fT-QA; Thu, 06 Jun 2024 23:50:52 -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 1sFQcr-0005eb-Hv for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 23:50:49 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFQcr-0007JN-9t for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 23:50:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFQd6-0000nY-75 for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 23:51:04 -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: Fri, 07 Jun 2024 03:51:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71205 X-GNU-PR-Package: emacs Original-Received: via spool by 71205-submit@debbugs.gnu.org id=B71205.17177322392925 (code B ref 71205); Fri, 07 Jun 2024 03:51:04 +0000 Original-Received: (at 71205) by debbugs.gnu.org; 7 Jun 2024 03:50:39 +0000 Original-Received: from localhost ([127.0.0.1]:41987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFQcg-0000kz-9S for submit@debbugs.gnu.org; Thu, 06 Jun 2024 23:50:38 -0400 Original-Received: from mail-pg1-f181.google.com ([209.85.215.181]:42146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFFRb-0002kW-CH for 71205@debbugs.gnu.org; Thu, 06 Jun 2024 11:54:30 -0400 Original-Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-6c55e3d2740so838586a12.0 for <71205@debbugs.gnu.org>; Thu, 06 Jun 2024 08:54:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717689187; x=1718293987; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=N3JjjmkOTlFCs3ZSU9fniu03TSWWvotq79WuyhQhPN8=; b=Y6aUDEgPfLj/+yADiPbrrjz1VBPnZEYrZ3wcFMg/Dl5NdT35PFSzt9m4ujneCj3ux/ CyzNpHctiTYNr2AhAXEkdKx27XvMzKcftipyYKwg3hitTxyuyXmiNMs70EOfFSo74d3I N2I31zXtJSqje5+uJpSTuQASmdmVCMX7XiOpZ9xwu4nBY1Usfa5K1TOlL3JLVL7oH826 jU5BECzfPMGyW1vqQou/qexesxaI81RzXAb5vPRbMRfBkMkdFiE69V2iT5zG9SSlos7d WGF0Wv1L02YCY4oY3YaQOJlo8Pl18LIDuSw6uZed0iGUg35D8fUPf5sgTvT/AzH6QTFA picQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717689187; x=1718293987; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N3JjjmkOTlFCs3ZSU9fniu03TSWWvotq79WuyhQhPN8=; b=IK7yKmXZYsQTESBcOsuMsEVX0IN8r6hMyyyAYGiCVArPvkplO8YIf3SS9vnUfIn2gc DZ6UUG6h4KLAq9bXd7BXJ+lBVbUEMUQeoUIgoIZY7kG6oVYreb4wvp2qVRX6Tww32OJw vrgTQbb57rcXUf2yeVraem5OHlCvhhL33owJfOGmw3PGQ/dbVBvsIJrsLVTvlKqo1mCA iWRfIUhkCtJprjDaI15JsbrXOWbaEEP7RtspsHFcxL09UnsOfrBje7you8RrZQTESMa0 NsV3PtsQQ/iPo7AdbK/pW0Xz0bM4c5zcDlTjmUnIGcloRtlD8AaNDCcgfFeNp842os4a eFFQ== X-Gm-Message-State: AOJu0Yw91SroVFFfb6MuRpB6lZOrIIbq4XnBJbZ5g9Lw7TVYZFH17QM3 pjDKZzFWsEPE69e7ULuJRP3n1wpm9XoZEhb/zch1TgOxzWYF7elp X-Google-Smtp-Source: AGHT+IHd3pta5nbFdHrfrunBNmsNUSEAlIShj/7T049u3ZgHr835PXIPOHflJPk7s6FGOPLUBKhrLQ== X-Received: by 2002:a17:90b:903:b0:2c1:a77c:33fb with SMTP id 98e67ed59e1d1-2c2b8991346mr115392a91.6.1717689186700; Thu, 06 Jun 2024 08:53:06 -0700 (PDT) Original-Received: from [192.168.31.26] (160.245.232.153.ap.dti.ne.jp. [153.232.245.160]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c28067b118sm3711040a91.26.2024.06.06.08.53.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jun 2024 08:53:06 -0700 (PDT) Content-Language: en-US In-Reply-To: <8103A524-0785-4BEB-9744-F755A74B6B12@gmail.com> X-Mailman-Approved-At: Thu, 06 Jun 2024 23:50:36 -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:286730 Archived-At: Thanks for your answer, Mr Yuan. This answer solved the original problem. Instead, I think a new problem has been revealed. What we should expect is for the cursor to move to column 5, because that's gnu style. But it actually moves to column 3. Thanks all. On 2024/06/06 14:25, Yuan Fu wrote: > >> On May 26, 2024, at 1:12 AM, Eli Zaretskii wrote: >> >>> Date: Sun, 26 May 2024 13:32:37 +0900 >>> From: 川本 琢二 >>> (Dr.Sc.KAWAMOTO, Takuji) >>> >>> 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. >> I think this is because the above source code fails to parse. If you >> add a closing brace after the "do" line, and then repeat your recipe, >> the cursor goes to column 3. >> >> Yuan, can you please look into this? > Thanks for your detailed report, Kawamoto san. Yes, this is due to the source code not being complete (missing closing brackets). For the moment, I suggest turning on electric-pair-mode which automatically adds closing brackets. > > Yuan