From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56796: 29.0.50; Hard newlines not respected in code comments? Date: Thu, 28 Jul 2022 10:26:46 +0300 Message-ID: <83k07xaea1.fsf@gnu.org> References: <8735ema73q.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="607"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56796@debbugs.gnu.org To: Visuwesh , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 28 09:35:55 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 1oGy3m-000ARH-7s for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Jul 2022 09:35:54 +0200 Original-Received: from localhost ([::1]:38474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGy3l-0001Dw-2D for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Jul 2022 03:35:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGxvC-0005HX-Mx for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2022 03:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGxvC-0003tG-9A for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2022 03:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGxvC-0003BN-2P for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2022 03:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Jul 2022 07:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56796 X-GNU-PR-Package: emacs Original-Received: via spool by 56796-submit@debbugs.gnu.org id=B56796.165899320812201 (code B ref 56796); Thu, 28 Jul 2022 07:27:02 +0000 Original-Received: (at 56796) by debbugs.gnu.org; 28 Jul 2022 07:26:48 +0000 Original-Received: from localhost ([127.0.0.1]:57480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGxuy-0003Ai-4b for submit@debbugs.gnu.org; Thu, 28 Jul 2022 03:26:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGxuu-0003AS-1v for 56796@debbugs.gnu.org; Thu, 28 Jul 2022 03:26:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGxuo-0002jn-PS; Thu, 28 Jul 2022 03:26:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YwrbEozYF0LzFsrtYBkfAKTX9KMOv/pgaTvaTkEkJRI=; b=CzlSFfiC/8V3 T+hJrD6r5VOwgehx0gXMmlFE2YHzQkFpZUl1PxCOvNNMbtfRMkBY34mlUIIRCAvEw6vSO2k7EQOON Qdcs/Fxa60GTv7yzf90nVmmW3BlSQ+7SP8Zdz9F/CubaQVTqHVR2Sr4Ry2XcA0VuP+90PywkcPGxL c+FbU7fniCCfzGhYAf2aMVah4m8+HIsISVR3s3HXS9pTcFUt/Y+M2+C/xRNu6Y0BfFsA0uHt0Pn96 3A6gvUihjagTILpv/jZGIUml85K7vB39uQNRyWWl+2J681zB6PTzXbzr1khqrnkOZ9UXVDiIinQOT F7n9DDf6Z28e2NumeGlS7A==; Original-Received: from [87.69.77.57] (port=4625 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGxun-00041h-8v; Thu, 28 Jul 2022 03:26:38 -0400 In-Reply-To: <8735ema73q.fsf@gmail.com> (message from Visuwesh on Wed, 27 Jul 2022 21:19:29 +0530) 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" Xref: news.gmane.io gmane.emacs.bugs:238075 Archived-At: > From: Visuwesh > Date: Wed, 27 Jul 2022 21:19:29 +0530 > > Are hard newlines supposed to be respected when they are in code > comments? The answer is "it depends", AFAICS. The main problem is that fill-comment-paragraph doesn't seem to honor use-hard-newlines. So any major mode whose fill-paragraph-function uses that for filling comments will fail to pay attention to hard newlines in comments. In your scenario, if I set both fill-paragraph-function and fill-paragraph-handle-comment to nil, hard newlines in comments are honored as expected. use-hard-newlines is weird: it is documented only for Enriched mode, but that is at least incomplete, because we call functions from fill.el high and low in many major modes, so at least some of them inherit the use-hard-newlines-specific code when they call functions which do. For example, AFAICT use-hard-newlines is supported in Lisp doc strings. Adding Stefan to CC, who write fill-comment-paragraph. If we want use-hard-newlines to be supported in comments, we should modify fill-comment-paragraph to honor it in some way, perhaps simply deferring to fill-region in that case.