From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Guath Newsgroups: gmane.emacs.bugs Subject: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode Date: Sun, 3 Jun 2018 14:51:42 +0200 Message-ID: References: <83sh66g8wb.fsf@gnu.org> <87bmcuc0bo.fsf@gmail.com> <83muwefziz.fsf@gnu.org> <878t7yarlq.fsf@gmail.com> <834lilg05w.fsf@gnu.org> <87y3fx9w1t.fsf@gmail.com> <83a7sde0uh.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000059c0fc056dbc48bf" X-Trace: blaine.gmane.org 1528030268 30207 195.159.176.226 (3 Jun 2018 12:51:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Jun 2018 12:51:08 +0000 (UTC) Cc: 31656@debbugs.gnu.org, Noam Postavsky To: eliz@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 03 14:51:03 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 1fPSTP-0007iE-D1 for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jun 2018 14:51:03 +0200 Original-Received: from localhost ([::1]:35071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPSVU-0005UC-Ga for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jun 2018 08:53:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPSVN-0005Tt-Rq for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 08:53:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPSVK-0001we-OP for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 08:53:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51956) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPSVK-0001wa-Kf for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 08:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fPSVK-0004in-8R for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 08:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Guath Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Jun 2018 12:53:02 +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.152803033618085 (code B ref 31656); Sun, 03 Jun 2018 12:53:02 +0000 Original-Received: (at 31656) by debbugs.gnu.org; 3 Jun 2018 12:52:16 +0000 Original-Received: from localhost ([127.0.0.1]:59853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPSUZ-0004hd-Kt for submit@debbugs.gnu.org; Sun, 03 Jun 2018 08:52:15 -0400 Original-Received: from [85.112.160.81] (port=47699 helo=mail.automata.se) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPSUX-0004hN-GS for 31656@debbugs.gnu.org; Sun, 03 Jun 2018 08:52:14 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.automata.se (Postfix) with ESMTP id 43FFF3A123 for <31656@debbugs.gnu.org>; Sun, 3 Jun 2018 14:52:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at lux2.netcamp.se Original-Received: from mail.automata.se ([127.0.0.1]) by localhost (lux2.netcamp.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pBUulC-qgXuZ for <31656@debbugs.gnu.org>; Sun, 3 Jun 2018 14:52:01 +0200 (CEST) Original-Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by mail.automata.se (Postfix) with ESMTPSA id 22F9B3A125 for <31656@debbugs.gnu.org>; Sun, 3 Jun 2018 14:51:59 +0200 (CEST) Original-Received: by mail-wm0-f52.google.com with SMTP id v131-v6so9784930wma.1 for <31656@debbugs.gnu.org>; Sun, 03 Jun 2018 05:51:59 -0700 (PDT) X-Gm-Message-State: APt69E2ptB764Lr9m6H8E1ULC0i1fpdp56whXqrw7Kkn6wQhAGKTj1H/ Mh8qMIZHw7KyazYR2tAkfwghoxgS1zkuEboR1wo= X-Google-Smtp-Source: ADUXVKKqAkZaJz8D9R9x6CINi6DsN1fkYSzVD8fKGcRz4i/OY4KE53sU4ELbBU9u8y0Sra9nCzi2epgwEIwD5cKCOdA= X-Received: by 2002:a1c:c46:: with SMTP id 67-v6mr7129622wmm.79.1528030318671; Sun, 03 Jun 2018 05:51:58 -0700 (PDT) In-Reply-To: <83a7sde0uh.fsf@gnu.org> X-Gmail-Original-Message-ID: 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:146898 Archived-At: --00000000000059c0fc056dbc48bf Content-Type: text/plain; charset="UTF-8" I agree that overriding the value of `fill-column' _only_ inside doc strings is the sensible way to go. The only reason `emacs-lisp-docstring-fill-column' exists in the first place is to cover the edge case of doc strings as recommended in https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html (e.g. for apropos) which is fine, but overriding it in any other situation is confusing. We already have a general mechanism for controlling the fill column width on a major-mode basis through hooks and `fill-column' being buffer-local, and should as a rule encourage the use of these consistent control mechanisms across all major-modes - not introduce redundant functionalities that fight each other. The proposed solution in this email thread by Noam Postavsky is already too greedy in that it affects _all_ strings, not only doc strings (or maybe I misunderstood "(nth 3 (syntax-ppss))" ?). Still, it's better than the current behavior, and I guess that identifying doc strings only (and not strings in general) is too difficult. On Sat, Jun 2, 2018 at 4:09 PM Eli Zaretskii wrote: > > From: Noam Postavsky > > Cc: 31656@debbugs.gnu.org, stefan@automata.se > > Date: Sat, 02 Jun 2018 09:07:10 -0400 > > > > Eli Zaretskii writes: > > > > > Are there no use cases where we would want M-q outside of syntactic > > > strings? > > > > Okay, I can think of one possibility: if you've pasted a long single > > line consisting of a quoted list of symbols, then M-q could be a > > convenient way of breaking it up into multiple lines. With M-q disabled > > in Lisp code, you would need to copy the data to a temp non-lisp-mode > > buffer in order to do that, so a bit more inconvenient. > > Then maybe just override the value of fill-column when inside strings? > --00000000000059c0fc056dbc48bf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I agree that overriding the value of `fill-column'= ; _only_ inside doc strings is the sensible way to go. The only reason `ema= cs-lisp-docstring-fill-column' exists in the first place is to cover th= e edge case of doc strings as recommended in https://www= .gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html = (e.g. for apropos) which is fine, but overriding it in any other situation = is confusing. We already have a general mechanism for controlling the fill = column width on a major-mode basis through hooks and `fill-column' bein= g buffer-local, and should as a rule encourage the use of these consistent = control mechanisms across all major-modes - not introduce redundant functio= nalities that fight each other.

The proposed s= olution in this email thread by Noam Postavsky is already too = greedy in that it affects _all_ strings, not only doc strings (or maybe I m= isunderstood "(nth 3 (syntax-ppss))&qu= ot; ?). Still, it's better than the current behavior, and I guess that = identifying doc strings only (and not strings in general) is too difficult.=

On Sat, Jun= 2, 2018 at 4:09 PM Eli Zaretskii <eliz@= gnu.org> wrote:
> From: N= oam Postavsky <n= postavs@gmail.com>
> Cc: 31656@d= ebbugs.gnu.org,=C2=A0 stefan@automata.se
> Date: Sat, 02 Jun 2018 09:07:10 -0400
>
> Eli Zaretskii <el= iz@gnu.org> writes:
>
> > Are there no use cases where we would want M-q outside of syntact= ic
> > strings?
>
> Okay, I can think of one possibility: if you've pasted a long sing= le
> line consisting of a quoted list of symbols, then M-q could be a
> convenient way of breaking it up into multiple lines.=C2=A0 With M-q d= isabled
> in Lisp code, you would need to copy the data to a temp non-lisp-mode<= br> > buffer in order to do that, so a bit more inconvenient.

Then maybe just override the value of fill-column when inside strings?
--00000000000059c0fc056dbc48bf--