From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#71205: 29.3; Automatic indentation of c-ts-mode doesn't work well for me. Date: Wed, 5 Jun 2024 22:25:58 -0700 Message-ID: <8103A524-0785-4BEB-9744-F755A74B6B12@gmail.com> References: <0cbf7e4d-7143-4d7b-82f9-f710110a092b@gmail.com> <867cfhxa8o.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10332"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "=?UTF-8?Q?=E5=B7=9D=E6=9C=AC_?= =?UTF-8?Q?=E7=90=A2=E4=BA=8C?=(Dr.Sc.KAWAMOTO, Takuji)" , 71205@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 06 08:41:06 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 1sF6o5-0002Ss-NG for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Jun 2024 08:41:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sF6ns-0004q9-Kg; Thu, 06 Jun 2024 02:40: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 1sF6no-0004mx-A3 for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 02:40:48 -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 1sF6nn-0004ST-Ln for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 02:40:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sF6o2-0001lX-39 for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 02:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jun 2024 06:41:02 +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.17176560076639 (code B ref 71205); Thu, 06 Jun 2024 06:41:02 +0000 Original-Received: (at 71205) by debbugs.gnu.org; 6 Jun 2024 06:40:07 +0000 Original-Received: from localhost ([127.0.0.1]:42418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sF6n9-0001j0-5F for submit@debbugs.gnu.org; Thu, 06 Jun 2024 02:40:07 -0400 Original-Received: from mail-qt1-f170.google.com ([209.85.160.170]:42063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sF6n6-0001iL-Gs for 71205@debbugs.gnu.org; Thu, 06 Jun 2024 02:40:05 -0400 Original-Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4402066471cso4995431cf.0 for <71205@debbugs.gnu.org>; Wed, 05 Jun 2024 23:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717655924; x=1718260724; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=x4YvfJA86gj0w4j7aWfGyPcLPUKJihtn5SIdJia9mS8=; b=JY47P08oIvtEDwDSDisdOoekNrjCl3O1W07QqOpMllpwYqk0VNy4xpWRBDT+Lpxo4e VzIM8DFhjXUEKvWCPMJf/FaN3qXIg7zexQ03HZH4xJ60UElXZBtYxh2HpWB7FT8N9gsr wHZEN2xE9aD36SUSmI3zsARZExJmea1+lLsvA/hc8AuC8EJaolrPnP2VHqt2Y5SjEDA9 2k6caTdSn6Q2J62ahHd514CYevh4hoAsQXYAfh9SDa+O6T4Njg1Ae5BSwe8e+BxMKKKc xsOuu+LdI+L9NoC8Tx8Ce7AbPo4rMFZB8tn4NjcpnDoEUYxf9bVedeMI6cNgeFDUsRgw 2PHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717655924; x=1718260724; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x4YvfJA86gj0w4j7aWfGyPcLPUKJihtn5SIdJia9mS8=; b=n3PHmsQKGonpu3W+/3xip+Ls5IfKrjf0bxnJwivUiPgisrwyYxivu8S6xVel9P6xkM qMTSMX3xYEQSbYLS2hP8L9WKaE4mh2zrmleUHgnvMUQ8t8M8E52ghf1pf0xUHyhvLx7S soY0nNhWDe+vy2l0euSP9vJMO7m12x4YK3gxm9TKIlv9q2djP2ETmKBRjdBl+Hv8bV0j x2Zgc/SgeuCze0LLbIAvwPB7OiakP+ocx0bpLIiRHtsI0DNQiKH9soLZr7Iqx9yWtPCV rQuSy68MaqTIJtI9wLNLA5bGuVBGw/ke8P0HopnP68XzwkeWw0Cqx2fxEmjnRIxBt5Nh uG1g== X-Forwarded-Encrypted: i=1; AJvYcCXZq+sIOxUM+0B7JKCUovAmw+XWkfMqAE+84LwP14Gy590+Kae8fyuifNjedWDOdO9MkFEKfdV10tt5cgV+AeKHgSntT90= X-Gm-Message-State: AOJu0YxtKx7Ya8nfibBibfUkSGoGHwmFcwRB4pMGCMCHoBotgsWC4lNf n1mzrC6rYM9m79qZyH4H56X7K9LZCHzF5BcyN+1igmD2BOyVC95+SmkTjA== X-Google-Smtp-Source: AGHT+IFLdhoZc6eqF907IvwGfi7Y5lXNnS2Wla5IiW0CmjNdpZZf/bBv0rPZinWnupjGgtMPQbsO/w== X-Received: by 2002:a17:903:2444:b0:1f2:fe12:b7be with SMTP id d9443c01a7336-1f6b8f1c342mr23594425ad.32.1717651570367; Wed, 05 Jun 2024 22:26:10 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:f810:6d47:6e61:bc5f:51a3]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6bd7f4c61sm4892875ad.269.2024.06.05.22.26.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2024 22:26:09 -0700 (PDT) In-Reply-To: <867cfhxa8o.fsf@gnu.org> X-Mailer: Apple Mail (2.3774.600.62) 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:286664 Archived-At: > On May 26, 2024, at 1:12=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> Date: Sun, 26 May 2024 13:32:37 +0900 >> From: =E5=B7=9D=E6=9C=AC =E7=90=A2=E4=BA=8C >> (Dr.Sc.KAWAMOTO, Takuji) >>=20 >> 1. Start emacs. >> 2. Open the C source code file and write the following content. >>=20 >> ----------- c source code file begins ------------- >> void test(void) >> { >> do=F0=9F=94=B3 >> ----------- c source code file ends --------------- >>=20 >> 3. Place the cursor after `do` and press Return. >>=20 >> Expected behaviour is automatic indentation. I want to move the = cursor=20 >> to the 5th column of the next line. >> However, the observed behavior is NOT indentation. The cursor moves = to=20 >> the 1st column of the next line. >=20 > 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. >=20 > 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=