From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59763: 29.0.60; Filling for c-ts-mode Date: Mon, 05 Dec 2022 12:47:05 +0100 Message-ID: <87iliqdqdi.fsf@thornhill.no> References: <69D98973-6824-47B3-900F-6DBEE669932F@gmail.com> <838rjpg8e1.fsf@gnu.org> <684D8326-B59B-4A8D-9CD5-F0EB83CF5608@gmail.com> Reply-To: Theodor Thornhill Mime-Version: 1.0 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="31895"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59763@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 Mon Dec 05 12:48:16 2022 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 1p29xH-00081Y-5V for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Dec 2022 12:48:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p29x6-0003Uv-Hq; Mon, 05 Dec 2022 06:48:04 -0500 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 1p29x4-0003Ui-SY for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 06:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p29x4-0000io-K9 for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 06:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p29x4-0003nM-CS for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 06:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Dec 2022 11:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59763 X-GNU-PR-Package: emacs Original-Received: via spool by 59763-submit@debbugs.gnu.org id=B59763.167024083014485 (code B ref 59763); Mon, 05 Dec 2022 11:48:02 +0000 Original-Received: (at 59763) by debbugs.gnu.org; 5 Dec 2022 11:47:10 +0000 Original-Received: from localhost ([127.0.0.1]:35541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p29wD-0003lZ-Ss for submit@debbugs.gnu.org; Mon, 05 Dec 2022 06:47:10 -0500 Original-Received: from out2.migadu.com ([188.165.223.204]:53489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p29wC-0003lT-CL for 59763@debbugs.gnu.org; Mon, 05 Dec 2022 06:47:08 -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=1670240827; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Un917y2WMWORo0MGuVL9oUHV6QBXlBxPtSO2E0lRlyA=; b=sB6v+DcCaxE9kEAC2BF3yD7zv97zXExeKzQMF8dVvNTMpssT6Gkvwhqhk6JUhxwh946UXb sVJlN91D036ikCkIcIbh6aVK2+E5RsvQe5dvA1qOo6EiAcZAU5Sdev62eWIMfmJNRN0zNl lDR12wStrbGHqL/pTM2rDPbmqvTSvlTYuXvne/gImR9ONwmbnAeLV4pEjpxqLt42YyQHgb PGseaWYwtA4A8dzLa+6sI4dVsMcVtY9iObtzcszgd28lQ/AzqK+UrSZFj2PChn8jHmK7B5 CLfKAmhsrRUn5HWJQTJNSCHsdbZnRtVjRGKbMRsc19QM/nN4cMPiZJUOTyBUCg== In-Reply-To: <684D8326-B59B-4A8D-9CD5-F0EB83CF5608@gmail.com> X-Migadu-Flow: FLOW_OUT 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:250009 Archived-At: Yuan Fu writes: >> On Dec 2, 2022, at 6:58 AM, Eli Zaretskii wrote: >>=20 >>> From: Yuan Fu >>> Date: Thu, 1 Dec 2022 21:33:06 -0800 >>>=20 >>>=20 >>> IMO For c-ts-mode to be usable we need to have at least a basic filling >>> function. Below is the function I have in my init.el, could someone have >>> a look and see if it=E2=80=99s good? Alternatively we could copy out th= e comment >>> and fill it in a temp buffer with c-mode, but I didn=E2=80=99t have the= time to try >>> it out and see how well it works. >>=20 >> Thanks. >>=20 >> From quick testing, I see a problem: >>=20 >> . Visit dispnew.c and go to the comment that starts on line 324. Delete >> the newline between the two lines of the comment, and invoke the >> function. Observe how the first non-blank character of the comment's >> second line is aligned with the "/*" on the previous line, not with t= he >> text after "/*" as I'd expect. > > I see. I=E2=80=99ll need to look at how cc-mode fill comments. > >>=20 >> Btw, this command should be bound to M-q in ts-c-mode. > > Will do, once our fill function works well. BTW, Theo, if you have any > idea, don=E2=80=99t hesitate to go ahead :-) No obligations, of course. > > Yuan Sure! Added to my list :) I had a function at some point that used c-mode to do this. I'll see if I can polish it a little. Theo