From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode Date: Fri, 01 Jun 2018 15:43:16 +0300 Message-ID: <83muwefziz.fsf@gnu.org> References: <83sh66g8wb.fsf@gnu.org> <87bmcuc0bo.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1527856930 5245 195.159.176.226 (1 Jun 2018 12:42:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 1 Jun 2018 12:42:10 +0000 (UTC) Cc: 31656@debbugs.gnu.org, stefan@automata.se To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 01 14:42:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOjNd-0001FA-Bg for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jun 2018 14:42:05 +0200 Original-Received: from localhost ([::1]:55585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOjPi-0006cA-Qe for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jun 2018 08:44:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOjPZ-0006aG-Cx for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 08:44:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOjPW-0000rT-9t for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 08:44:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49031) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOjPW-0000rG-50 for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 08:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fOjPV-0007Ky-U2 for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 08:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Jun 2018 12:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31656 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31656-submit@debbugs.gnu.org id=B31656.152785700628155 (code B ref 31656); Fri, 01 Jun 2018 12:44:01 +0000 Original-Received: (at 31656) by debbugs.gnu.org; 1 Jun 2018 12:43:26 +0000 Original-Received: from localhost ([127.0.0.1]:56928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOjOw-0007K3-9L for submit@debbugs.gnu.org; Fri, 01 Jun 2018 08:43:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOjOv-0007Js-An for 31656@debbugs.gnu.org; Fri, 01 Jun 2018 08:43:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOjOn-0008U1-31 for 31656@debbugs.gnu.org; Fri, 01 Jun 2018 08:43:20 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOjOm-0008Tp-V5; Fri, 01 Jun 2018 08:43:17 -0400 Original-Received: from [176.228.60.248] (port=4437 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fOjOm-0002tO-Eq; Fri, 01 Jun 2018 08:43:16 -0400 In-reply-to: <87bmcuc0bo.fsf@gmail.com> (message from Noam Postavsky on Fri, 01 Jun 2018 05:39:39 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146818 Archived-At: > From: Noam Postavsky > Cc: Stefan Guath , 31656@debbugs.gnu.org > Date: Fri, 01 Jun 2018 05:39:39 -0400 > > > Or are there real-life use cases where this behavior is grossly > > inappropriate? > > I don't think it makes sense to apply normal plain text filling rules to > code. Maybe it doesn't come up much because people don't usually call > M-q on code, and usually lines of code are kept short enough that they > wouldn't get filled anyway. But picking a random example from rgrep > ^.\{100,\}$ on the Emacs code base: > > (defun feedmail-default-date-generator (maybe-file) > "Default function for generating Date: header contents." > (feedmail-say-debug ">in-> feedmail-default-date-generator") > (when maybe-file > (feedmail-say-debug (concat "4 cre " (feedmail-rfc822-date (nth 4 (file-attributes maybe-file))))) > (feedmail-say-debug (concat "5 mod " (feedmail-rfc822-date (nth 5 (file-attributes maybe-file))))) > (feedmail-say-debug (concat "6 sta " (feedmail-rfc822-date (nth 6 (file-attributes maybe-file)))))) > (let ((date-time)) > (if (and (not feedmail-queue-use-send-time-for-date) maybe-file) > (setq date-time (nth 5 (file-attributes maybe-file)))) > (feedmail-rfc822-date date-time)) > ) > > Running M-q on every line turns it into this nonsense: > > (defun feedmail-default-date-generator (maybe-file) > "Default function for generating Date: header contents." > (feedmail-say-debug ">in-> feedmail-default-date-generator") > (when maybe-file > (feedmail-say-debug (concat "4 > cre " (feedmail-rfc822-date (nth 4 (file-attributes > maybe-file))))) > (feedmail-say-debug (concat "5 > mod " (feedmail-rfc822-date (nth 5 (file-attributes > maybe-file))))) > (feedmail-say-debug (concat "6 > sta " (feedmail-rfc822-date (nth 6 (file-attributes > maybe-file)))))) > (let ((date-time)) > (if (and (not feedmail-queue-use-send-time-for-date) > maybe-file) > (setq date-time (nth 5 (file-attributes maybe-file)))) > (feedmail-rfc822-date date-time)) ) And if you set the value of emacs-lisp-docstring-fill-column to 80, the value of fill-column that, according to the OP, should have been used instead, do you get a better-looking nonsense? IOW, if indeed it makes no sense to apply normal plain text filling rules to code, then why does it matter what is the value of fill-column when code is being filled?