GNU bug report logs - #31656
26.1; `fill-paragraph' malformats in emacs-lisp-mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Stefan Guath <stefan@HIDDEN>; dated Wed, 30 May 2018 12:51:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 2 Jun 2018 14:10:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 02 10:10:08 2018
Received: from localhost ([127.0.0.1]:59446 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fP7EO-0006IR-8A
	for submit <at> debbugs.gnu.org; Sat, 02 Jun 2018 10:10:08 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50810)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1fP7EN-0006I5-B8
 for 31656 <at> debbugs.gnu.org; Sat, 02 Jun 2018 10:10:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1fP7EH-0005Uz-B5
 for 31656 <at> debbugs.gnu.org; Sat, 02 Jun 2018 10:10:02 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46507)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1fP7EB-0005M0-NY; Sat, 02 Jun 2018 10:09:55 -0400
Received: from [176.228.60.248] (port=2280 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1fP7EA-0004zo-SM; Sat, 02 Jun 2018 10:09:55 -0400
Date: Sat, 02 Jun 2018 17:09:58 +0300
Message-Id: <83a7sde0uh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
In-reply-to: <87y3fx9w1t.fsf@HIDDEN> (message from Noam Postavsky on Sat,
 02 Jun 2018 09:07:10 -0400)
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 <83sh66g8wb.fsf@HIDDEN> <87bmcuc0bo.fsf@HIDDEN>
 <83muwefziz.fsf@HIDDEN> <878t7yarlq.fsf@HIDDEN>
 <834lilg05w.fsf@HIDDEN> <87y3fx9w1t.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31656
Cc: 31656 <at> debbugs.gnu.org, stefan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Noam Postavsky <npostavs@HIDDEN>
> Cc: 31656 <at> debbugs.gnu.org,  stefan@HIDDEN
> Date: Sat, 02 Jun 2018 09:07:10 -0400
> 
> Eli Zaretskii <eliz@HIDDEN> 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 2 Jun 2018 13:34:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 02 09:34:31 2018
Received: from localhost ([127.0.0.1]:58487 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fP6fv-000524-0A
	for submit <at> debbugs.gnu.org; Sat, 02 Jun 2018 09:34:31 -0400
Received: from mail-it0-f68.google.com ([209.85.214.68]:34635)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fP6fs-00051l-Sc
 for 31656 <at> debbugs.gnu.org; Sat, 02 Jun 2018 09:34:29 -0400
Received: by mail-it0-f68.google.com with SMTP id y127-v6so6289883itd.1
 for <31656 <at> debbugs.gnu.org>; Sat, 02 Jun 2018 06:34:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:in-reply-to:references:user-agent:date
 :message-id:mime-version;
 bh=4YKX4Hicr2iJwLb5Gltmi8P5nhTghdZhL5BqNHLVWDI=;
 b=ioGI7t41Uwe1PJvVmRTccUQzHEmmAFEQTfa0S1dOL6+yC62kLDUKyvFhdqkWjjHFNj
 /+1H8YcDdv6INn/h2uJyjTrl7DF99wfLgEMqG7iFNtIMQKI4Txij+1qHEDpQ443by+FO
 t7wkEbzdoioiwILgB6NJoNeMaUr6dzPpC+0I5A/P6LsKvZnTJPb9s/HyzGpjA7Z2g0rn
 k9Z3yvipk63aytMVo2wDeuBg7EDVsJQ135sPLrWB0yxS1yLrUAkuVbKskT/iRuUmsTm9
 YfShh8fk+hK2sad9N7h38mjwfVbmomkPrWGQ3UvbvV8MrfjlR1RvX+zH4ZxaH2qbBxdO
 AOTQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:in-reply-to:references
 :user-agent:date:message-id:mime-version;
 bh=4YKX4Hicr2iJwLb5Gltmi8P5nhTghdZhL5BqNHLVWDI=;
 b=XkWurMC25Kbr4cNut8FElC95pMv00caH9sOjSj8qTTWBt5BoXJlJM+/56sGUHUTtxP
 uxhwObWCCwvEwZL3/7iXn3KnV2VBUCLHyPrpj2hns/ngyU+j/cOR8SOY+3R1oBMGipYQ
 Ljl/4mb6bPS/ipr9YDcKWKpUKPugXxTYXzA5Agh8YryEo5uUEY5mUWQtX+1oukz8P4FZ
 RKK3dWW/IgK0seg7Zml0I56rnJUYRkXn5ZrFF00KkNUVQuvU1eVsTxre9iY5i471QrQO
 Elvhsx00K/KgLhI2p381HuVb+5Q55rIDMhrEfcGgDO6fO7LUZHxDYDZ1JkHV/AD2PPWa
 0czA==
X-Gm-Message-State: APt69E3L0W8RkE1HoakcJVC357rdjVaW4tAcd6JsS3AbkWX2JYtaeifd
 o5kSUeyGbNSLE1mts1BxTCs=
X-Google-Smtp-Source: ADUXVKKyoSEidKujsB9hLUE8gkPRvijCyGVJlq9Td1DDk+R4bZUXc1K4MOspM/DifRnBvjQg4Kpedg==
X-Received: by 2002:a24:b550:: with SMTP id
 j16-v6mr7683071iti.87.1527946463332; 
 Sat, 02 Jun 2018 06:34:23 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 p20-v6sm939621itf.4.2018.06.02.06.34.22
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 02 Jun 2018 06:34:22 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
In-Reply-To: <5B129ABE.5040102@HIDDEN> (martin rudalics's message of "Sat, 02
 Jun 2018 15:25:18 +0200")
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 <83sh66g8wb.fsf@HIDDEN> <87bmcuc0bo.fsf@HIDDEN>
 <83muwefziz.fsf@HIDDEN> <878t7yarlq.fsf@HIDDEN>
 <834lilg05w.fsf@HIDDEN> <87y3fx9w1t.fsf@HIDDEN>
 <5B129ABE.5040102@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Date: Sat, 02 Jun 2018 09:34:21 -0400
Message-ID: <87tvql9usi.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 31656
Cc: Eli Zaretskii <eliz@HIDDEN>, 31656 <at> debbugs.gnu.org, stefan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

martin rudalics <rudalics@HIDDEN> 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.
>
> Don't we want to fill comments as well?

Yes, we lost a bit of context there; comment filling is taken care of at
the top of lisp-fill-paragraph, I wasn't proposing to disable that.

    (defun lisp-fill-paragraph (&optional justify)
      [...]
      (or (fill-comment-paragraph justify)
          ;; Since fill-comment-paragraph returned nil, that means we're not in
          ;; a comment: Point is on a program line; we are interested
          ;; particularly in docstring lines.
          ;; [...] This setting has the consequence of inhibiting
          ;; filling many program lines that are not docstrings, which is sensible,
          ;; because the user probably asked to fill program lines by accident, or
          ;; expecting indentation (perhaps we should try to do indenting in that
          ;; case).[...]
+      (when (nth 3 (syntax-ppss))       ; Only fill inside strings.
          (let ((paragraph-start
                 (concat paragraph-start
                         "\\|\\s-*\\([(;\"]\\|\\s-:\\|`(\\|#'(\\)"))
            (paragraph-separate
             (concat paragraph-separate "\\|\\s-*\".*[,\\.]$"))
                (fill-column (if (and (integerp emacs-lisp-docstring-fill-column)
                                      (derived-mode-p 'emacs-lisp-mode))
                                 emacs-lisp-docstring-fill-column
                               fill-column)))
-	(fill-paragraph justify))
+	  (fill-paragraph justify)))
          ;; Never return nil.
          t))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 2 Jun 2018 13:25:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 02 09:25:33 2018
Received: from localhost ([127.0.0.1]:58478 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fP6XE-0004hU-Ro
	for submit <at> debbugs.gnu.org; Sat, 02 Jun 2018 09:25:33 -0400
Received: from mout.gmx.net ([212.227.15.15]:40903)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1fP6XD-0004hE-ON
 for 31656 <at> debbugs.gnu.org; Sat, 02 Jun 2018 09:25:32 -0400
Received: from [192.168.1.100] ([212.95.5.129]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LvV1X-1gOOCP1VUh-010gEN; Sat, 02
 Jun 2018 15:25:22 +0200
Message-ID: <5B129ABE.5040102@HIDDEN>
Date: Sat, 02 Jun 2018 15:25:18 +0200
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Noam Postavsky <npostavs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>	<83sh66g8wb.fsf@HIDDEN>
 <87bmcuc0bo.fsf@HIDDEN>	<83muwefziz.fsf@HIDDEN>
 <878t7yarlq.fsf@HIDDEN>	<834lilg05w.fsf@HIDDEN>
 <87y3fx9w1t.fsf@HIDDEN>
In-Reply-To: <87y3fx9w1t.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:iJB6G6o0ETLUrmjyeqEjwzV3iRr5bul6JndKIDzu/9fzvPOyEJ5
 Kzm3ZoW3zcvvc/xiF2sxBX0WwKgPbOc9NzC3ZyxseTs+1PSCYCK1x6Trrobiw77Z5M2OdAD
 bSBeL3H/zQncR96NydTp/Haeb9IpIHnbKOVNQvmHSvKV23ejccjSOLuQb7TZ9Jjl5iC9GSm
 ECKCMS+9wEaIV8CoZ6M8g==
X-UI-Out-Filterresults: notjunk:1;V01:K0:2tkwV7RXais=:cGYmIPg3JWhcSmSYcac+30
 Umhd1EMokS2Dz75bS0PAP/k6Jh1ygaQDxj4j+hXtA0+MdNCAjhc6GlULmksF3lEJ+IdlBQnQf
 mMVKJ50WdJ43c9h4M6a74HseYmRzGLV1XviaA/6unEG3kFauUEqsFdGoP91sgDQbkaEA9eqxo
 mkJozfVbfZ1GTrnzfa+E2UYtWcsL6ajTt6mogBjYwX5dkDDteZWZifZDRb7jhtHVq4s8nQ6UO
 iVNonGTArZf9VKqndWLnDGqrb22XzT/3iZQcjaTsJGr7nFlG+L6OqKgn296+U4z6plzOYfNFE
 95z5hOh1zRL8+w5rDK9ibSd58LfGSR7PuBKRAZOP8aUgIvnTByXi+NhRwfALWATcA02m0CU6M
 9Ne3FLi5+2Niuu9C6lPZC5qWpJrZ21QcYZB60x6iMOwaJUkIHtvTWbQzKw7YRtsVNwUAR/9JW
 XHYrSQMOX+8v61gOu6QQJTTlxqGQotqEmf4bTuxs/s41OJwZNAlpZ063V5+2tt+hVRMJjvO9J
 l8gxDkv25uUYhvbf8Bxe+ZUxvIS5KCTyk6L62MdUj6pvNZ2we7J2cX7e5QKN9EYOHBaELRlVT
 fAE9T6aLHCcNLJVl0ZceB3PQGtWIzpduQvn2wiMNvKsZ3QscR5HyJ0a2lR3ypWfQgO+elGmx3
 AAVRnVmZjGj6nexc+4qlwpB/TgBMcRU99XOlCykWClfQwSMIBN+U8q5N30b/JTuEGDJ3VhBPR
 3cc9A/bn10K7OyHZ+KYsCWx5zddkEZUZPozftHctrUBK5l/Hph0Xan5GAWetSi9cbbcSvwnni
 giD5Da4
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31656
Cc: 31656 <at> debbugs.gnu.org, stefan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> 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.

Don't we want to fill comments as well?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 2 Jun 2018 13:07:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 02 09:07:18 2018
Received: from localhost ([127.0.0.1]:58471 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fP6Fa-0004DL-8Q
	for submit <at> debbugs.gnu.org; Sat, 02 Jun 2018 09:07:18 -0400
Received: from mail-it0-f53.google.com ([209.85.214.53]:54041)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fP6FZ-0004D8-Eu
 for 31656 <at> debbugs.gnu.org; Sat, 02 Jun 2018 09:07:17 -0400
Received: by mail-it0-f53.google.com with SMTP id a195-v6so4817118itd.3
 for <31656 <at> debbugs.gnu.org>; Sat, 02 Jun 2018 06:07:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=ltG14Na4Ax7pp3mF2Xt/qlzgn+x570vIR+mF2whtaaI=;
 b=arHxp9JvDfs/PbGU7w/g+/+aCIEjZ45M0QVMt0sR7Z8+qEnXxsArDrcy85D1IS2pP7
 CnXfuqaWf/NjLyL78IA3c5H95DGdApRBDErFA43rSO+oGpDVVjwtyJRi9CG81BiWj8Rm
 FhP/lzUm2pMx9xxarjdBr+vJdldZ82DJWJvXB5MHaLaMM5txvti2MHKEmkIzYF0ZNuHm
 cUm/AY1Ly8inD/vujqvbyn9ZNAS0qdiJ+vWPzwckebxoy5On8CfGSxHHxViwmFt8Zz5l
 sCZ7agk5qs6PL57WAQO/lyPEHNvwt9Uo6Jp+ix28B0IdplrfsmjgGrRBdnNwRmNBQbFR
 STWg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=ltG14Na4Ax7pp3mF2Xt/qlzgn+x570vIR+mF2whtaaI=;
 b=Wuf05vmSt4KgPq735GZX2QSvc9l9z5yyBn8JtXXw69cfcRwImmI+Wif3atgXxkrR4p
 kAy3/rGJau6b7uxh42gJvEEY5+F7fM0NRUTIjfDCRSfWXoOFLcFvpy9o7jNc4kncW4oz
 Awg99wYx+ltEuAO0pJs6cXltDtzKAV0hdvdLnJ/vfZmAunqittUWE733cZr8jDmUgQIH
 cz5mSG6vpolkRblaCokZrilP2D37liQsJyL6DpGCgM9YAMyJRAy2O7zaIGqv3VT9dXW4
 t9vTvVylhGfZOq4loUhNdopDHdgRJiaxbMaOZUR4imY8UrE8pLGfufbrhSwegRdTifEe
 mAMQ==
X-Gm-Message-State: ALKqPwcIBbkhgsodWY71MdrX3bl2W4dKVbR6ze6ZzpgNx6IzTL2WtUha
 aV2ssJA5en6mz7TY05WHpdz5Mw==
X-Google-Smtp-Source: ADUXVKIae1tusVwejpXvdqIpQtppcr0yK4KfdJaneh2FdMHhguJzTxPDG8YHvRC/VTWV4K04a5MK9Q==
X-Received: by 2002:a24:3712:: with SMTP id
 r18-v6mr8251733itr.103.1527944831992; 
 Sat, 02 Jun 2018 06:07:11 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 c102-v6sm1243647itd.3.2018.06.02.06.07.11
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 02 Jun 2018 06:07:11 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 <83sh66g8wb.fsf@HIDDEN> <87bmcuc0bo.fsf@HIDDEN>
 <83muwefziz.fsf@HIDDEN> <878t7yarlq.fsf@HIDDEN>
 <834lilg05w.fsf@HIDDEN>
Date: Sat, 02 Jun 2018 09:07:10 -0400
In-Reply-To: <834lilg05w.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 02 Jun
 2018 09:41:47 +0300")
Message-ID: <87y3fx9w1t.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31656
Cc: 31656 <at> debbugs.gnu.org, stefan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 2 Jun 2018 06:41:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 02 02:41:59 2018
Received: from localhost ([127.0.0.1]:58308 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fP0Eh-0001LZ-1F
	for submit <at> debbugs.gnu.org; Sat, 02 Jun 2018 02:41:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55037)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1fP0Ef-0001LM-QS
 for 31656 <at> debbugs.gnu.org; Sat, 02 Jun 2018 02:41:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1fP0EZ-0003Ik-Bn
 for 31656 <at> debbugs.gnu.org; Sat, 02 Jun 2018 02:41:52 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41591)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1fP0EU-0002wH-5t; Sat, 02 Jun 2018 02:41:46 -0400
Received: from [176.228.60.248] (port=1537 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1fP0ET-00008m-Gq; Sat, 02 Jun 2018 02:41:45 -0400
Date: Sat, 02 Jun 2018 09:41:47 +0300
Message-Id: <834lilg05w.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
In-reply-to: <878t7yarlq.fsf@HIDDEN> (message from Noam Postavsky on Fri,
 01 Jun 2018 21:45:37 -0400)
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 <83sh66g8wb.fsf@HIDDEN> <87bmcuc0bo.fsf@HIDDEN>
 <83muwefziz.fsf@HIDDEN> <878t7yarlq.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31656
Cc: 31656 <at> debbugs.gnu.org, stefan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Noam Postavsky <npostavs@HIDDEN>
> Cc: 31656 <at> debbugs.gnu.org,  stefan@HIDDEN
> Date: Fri, 01 Jun 2018 21:45:37 -0400
> 
> --- i/lisp/emacs-lisp/lisp-mode.el
> +++ w/lisp/emacs-lisp/lisp-mode.el
> @@ -1314,6 +1314,7 @@ lisp-fill-paragraph
>        ;;
>        ;; The `fill-column' is temporarily bound to
>        ;; `emacs-lisp-docstring-fill-column' if that value is an integer.
> +      (when (nth 3 (syntax-ppss))       ; Only fill inside strings.
>          (let ((paragraph-start
>                 (concat paragraph-start
>                         "\\|\\s-*\\([(;\"]\\|\\s-:\\|`(\\|#'(\\)"))
> @@ -1323,7 +1324,7 @@ lisp-fill-paragraph
>                                      (derived-mode-p 'emacs-lisp-mode))
>                                 emacs-lisp-docstring-fill-column
>                               fill-column)))
> -	(fill-paragraph justify))
> +	  (fill-paragraph justify)))
>        ;; Never return nil.
>        t))
> 
> 
> I think this covers the scenario in the OP.

Are there no use cases where we would want M-q outside of syntactic
strings?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 2 Jun 2018 01:45:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 01 21:45:47 2018
Received: from localhost ([127.0.0.1]:58262 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fOvc3-0000oi-N0
	for submit <at> debbugs.gnu.org; Fri, 01 Jun 2018 21:45:47 -0400
Received: from mail-it0-f65.google.com ([209.85.214.65]:40560)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fOvc1-0000oU-Tz
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 21:45:46 -0400
Received: by mail-it0-f65.google.com with SMTP id j186-v6so4029516ita.5
 for <31656 <at> debbugs.gnu.org>; Fri, 01 Jun 2018 18:45:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=jz8CmcM00gSdtmEh82o1bU2KJ0Ai/BXUUct2QxvLiXA=;
 b=fXpTLcikAk/ypWTnAKwIIvz5InDcne26l++Qh5mgY7fG8FStAX+7w+vFmoAbJRY0bH
 t+sSbssP04+eFLX7DscyvXTbdDgx0nFpglAEhu00nHtwEV7yxUP2S/kgVINwJ9Fb/XMu
 NBhtBXsVjTEdZj1A/moBKUE61k8dphvpsyLRpaUSeVaLosKDwucbJz/9JT1mBlIq4phj
 m8BnHoy8NrI+I9Hdtb8wJ9UEUiikDh7Ttk2n3i+zGAeHoGMqXbuyyOWTMJ2sdjN3swvV
 CLBrNwj5CiqX/oRJQ16i7MmN9271nBY6soUdzIAV3K3f6GxOZOORpGoXByO7z7ryn5tL
 47PQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=jz8CmcM00gSdtmEh82o1bU2KJ0Ai/BXUUct2QxvLiXA=;
 b=GqI3pJxkM3GEKJR1VARVh9XUUEZ5gpiKSE7YI8zBrVh+NScykKQVcs5dFRC9MkHJb0
 WiyPdt3CD4cJjzhMRT6RZ2g4xm6bZSnnD9/Hmm8PLZRPnE5/BLS+zmWmQGchor2f3YkE
 cZrCthIMLjhP6yN0ahpyAbnkY5e8HJzKxAE8s0CeKApRpr8FBc2c4Vz/BO3EN4M4bfpN
 F7RzcD2dhQihqDtRB+wJWPjZny4gwr4LYXQ/Q1jeESUeHCu3QZ1WXC6QA5tvtKE0Ihtv
 oh57ojN+1haM66OGVFuFtOhcFh5dITwvFHpcoX8U1mWrt5In1bU4Qu26yuYL+DNuc5Vg
 GaXw==
X-Gm-Message-State: APt69E2GMY3Uj+DAMdLY0XKi6v2tEG+f/wUftPR0OmNpdVx35yp+jkxk
 qdr1VhSVVzQFq+WnB+DXNF4=
X-Google-Smtp-Source: ADUXVKIFaI05Agu2zMFJUc1XVoMAuKWX0XcRVQxAWSNogBrRiJIJttStBEVajoHeXnPb1RVE1jtyqA==
X-Received: by 2002:a24:4516:: with SMTP id
 y22-v6mr6556292ita.109.1527903940331; 
 Fri, 01 Jun 2018 18:45:40 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 q11-v6sm3183869ita.15.2018.06.01.18.45.38
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Fri, 01 Jun 2018 18:45:39 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 <83sh66g8wb.fsf@HIDDEN> <87bmcuc0bo.fsf@HIDDEN>
 <83muwefziz.fsf@HIDDEN>
Date: Fri, 01 Jun 2018 21:45:37 -0400
In-Reply-To: <83muwefziz.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 01 Jun
 2018 15:43:16 +0300")
Message-ID: <878t7yarlq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 31656
Cc: 31656 <at> debbugs.gnu.org, stefan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> 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?

No, I was thinking more along the aligns of:

--- i/lisp/emacs-lisp/lisp-mode.el
+++ w/lisp/emacs-lisp/lisp-mode.el
@@ -1314,6 +1314,7 @@ lisp-fill-paragraph
       ;;
       ;; The `fill-column' is temporarily bound to
       ;; `emacs-lisp-docstring-fill-column' if that value is an integer.
+      (when (nth 3 (syntax-ppss))       ; Only fill inside strings.
         (let ((paragraph-start
                (concat paragraph-start
                        "\\|\\s-*\\([(;\"]\\|\\s-:\\|`(\\|#'(\\)"))
@@ -1323,7 +1324,7 @@ lisp-fill-paragraph
                                     (derived-mode-p 'emacs-lisp-mode))
                                emacs-lisp-docstring-fill-column
                              fill-column)))
-	(fill-paragraph justify))
+	  (fill-paragraph justify)))
       ;; Never return nil.
       t))


I think this covers the scenario in the OP.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 1 Jun 2018 15:10:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 01 11:10:36 2018
Received: from localhost ([127.0.0.1]:58133 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fOlhL-0002r2-SC
	for submit <at> debbugs.gnu.org; Fri, 01 Jun 2018 11:10:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60092)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1fOlhK-0002ql-Kk
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 11:10:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1fOlhC-0003UO-5k
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 11:10:29 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55589)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1fOlhB-0003U8-VN; Fri, 01 Jun 2018 11:10:26 -0400
Received: from [176.228.60.248] (port=4689 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1fOlhB-0000JE-6L; Fri, 01 Jun 2018 11:10:25 -0400
Date: Fri, 01 Jun 2018 18:10:24 +0300
Message-Id: <836032fspr.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Guath <stefan@HIDDEN>
In-reply-to: <CAD__r-8t7PDKDrkktuhwgj7W9X5FQgg0A3A8sNUQc=Sv-=_r8g@HIDDEN>
 (message from Stefan Guath on Fri, 1 Jun 2018 16:34:31 +0200)
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 <83sh66g8wb.fsf@HIDDEN> <87bmcuc0bo.fsf@HIDDEN>
 <CAD__r--i5NNqM17N2OAKHW-A2snxfDFeOpej+UpDe_oDXK0Qow@HIDDEN>
 <83lgbyfz3w.fsf@HIDDEN>
 <CAD__r-8t7PDKDrkktuhwgj7W9X5FQgg0A3A8sNUQc=Sv-=_r8g@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31656
Cc: 31656 <at> debbugs.gnu.org, npostavs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Stefan Guath <stefan@HIDDEN>
> Date: Fri, 1 Jun 2018 16:34:31 +0200
> Cc: npostavs@HIDDEN, 31656 <at> debbugs.gnu.org
> 
>  > The very idea of shadowing the global `fill-column' in the first place breaks the Principle Of Least
>  > Astonishment
> 
>  If that is so, then we should have gobs of astonished users since 1995.
> 
> Yes, the streets are flooded with them! But Emacs users are a tough crowd that don't complain :)

I guess so.

>  >From my POV, the answer is clear: it allows users to have different
>  customizable defaults for fill-column in Emacs Lisp and elsewhere.
> 
> If that was the only intention, that functionality was already present (I guess way long before 1995) by just
> doing:
> (add-hook 'emacs-lisp-mode-hook (lambda () (setq fill-column 80))) ;fill-column is buffer-local

Sure, but then everyone would need to write a mode hook, don't you
think?  With a separate option, things "just work".

>  E.g., in text modes, it is customary to enlarge the default to 79 or
>  thereabouts, but in Emacs Lisp we generally say that good style is to
>  make lines in doc strings no wider than 60 characters (see the ELisp
>  manual).
> 
> Doc strings, sure. But outside doc string, as it behaves now? Nah.

Maybe we should simply advise against using M-q outside of doc strings
and comments?  I agree with Noam that M-q elsewhere makes very little
sense.

> But even if that was the case, then just use
> the buffer local fill-column in a hook (as above). No need to introduce redundant mechanisms.

It isn't redundant, because with the additional option we can set up
things so that Emacs does TRT by default out of the box, and in most
cases no customization by users is necessary.

> Ok, I'll take a stab at the easy way out and just update the docs. When looking at the implementation in the
> function lisp-fill-paragraph, the outer or-clause seems to separate two cases: 1) if in a comment use
> fill-column, else 2) bind fill-column to emacs-lisp-docstring-fill-column and call fill-paragraph. Does that seem
> to be correct?

Yes, I think so.

> In that case the current doc could be changed from "Value of `fill-column' to use when filling a
> docstring..." to "Value of `fill-column' to use in emacs-elisp-mode except in comments".

Sounds good, but I think we should also advise against using this
except inside doc strings (and perhaps any other strings).

> But I still think the original intent of emacs-lisp-docstring-fill-column (as described in its current doc) is useful,
> and would of course prefer if we rather could update the implementation to reflect that functionality instead. I'm
> just not knowledgeable enough to do a PR. Would it be difficult?

You mean, make it work only inside a doc string?  I guess that would
be possible, yes.

> BTW, as a side note, I just wanted to add that this bug report is of course a very small detail. Also, if my
> language sounds a bit harsh, its just because I'm in a hurry. I'm really grateful to you and the community for
> putting in all the hard work so that people like me can use such a superior tool - thanks a million!

No need to apologize, there's nothing wrong with your language.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 1 Jun 2018 14:35:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 01 10:35:05 2018
Received: from localhost ([127.0.0.1]:58121 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fOl8y-0001xZ-L5
	for submit <at> debbugs.gnu.org; Fri, 01 Jun 2018 10:35:05 -0400
Received: from [85.112.160.81] (port=43814 helo=mail.automata.se)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefan@HIDDEN>) id 1fOl8w-0001x1-3G
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 10:35:02 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.automata.se (Postfix) with ESMTP id 1164F3A123
 for <31656 <at> debbugs.gnu.org>; Fri,  1 Jun 2018 16:34:56 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at lux2.netcamp.se
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 BT93hYpDGTjX for <31656 <at> debbugs.gnu.org>;
 Fri,  1 Jun 2018 16:34:49 +0200 (CEST)
Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com
 [209.85.128.176])
 by mail.automata.se (Postfix) with ESMTPSA id 2C6BD3A125
 for <31656 <at> debbugs.gnu.org>; Fri,  1 Jun 2018 16:34:48 +0200 (CEST)
Received: by mail-wr0-f176.google.com with SMTP id y15-v6so36558311wrg.11
 for <31656 <at> debbugs.gnu.org>; Fri, 01 Jun 2018 07:34:48 -0700 (PDT)
X-Gm-Message-State: ALKqPwepKe/sikmp2kwM5eioK1l6roMnmQD9sAIsUHyaKDHM2OLNRPlX
 /MCVamlWR0HG2WVek+AGcd9a1cN9/19Cg2wIUOI=
X-Google-Smtp-Source: ADUXVKLhxcUwv+p2Cd9RMMT2MVW16ieKDxyFxRGLyIQ52VGF2/xAKkNnHDq4oqpwpvaczxWglEgE7hl/wASxUtnJvuw=
X-Received: by 2002:adf:b0da:: with SMTP id j26-v6mr8314707wra.3.1527863687749; 
 Fri, 01 Jun 2018 07:34:47 -0700 (PDT)
MIME-Version: 1.0
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 <83sh66g8wb.fsf@HIDDEN> <87bmcuc0bo.fsf@HIDDEN>
 <CAD__r--i5NNqM17N2OAKHW-A2snxfDFeOpej+UpDe_oDXK0Qow@HIDDEN>
 <83lgbyfz3w.fsf@HIDDEN>
In-Reply-To: <83lgbyfz3w.fsf@HIDDEN>
From: Stefan Guath <stefan@HIDDEN>
Date: Fri, 1 Jun 2018 16:34:31 +0200
X-Gmail-Original-Message-ID: <CAD__r-8t7PDKDrkktuhwgj7W9X5FQgg0A3A8sNUQc=Sv-=_r8g@HIDDEN>
Message-ID: <CAD__r-8t7PDKDrkktuhwgj7W9X5FQgg0A3A8sNUQc=Sv-=_r8g@HIDDEN>
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
To: eliz@HIDDEN
Content-Type: multipart/alternative; boundary="0000000000005fa5ab056d957c6c"
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  On Fri, Jun 1, 2018 at 2:52 PM Eli Zaretskii <eliz@HIDDEN>
 wrote: > > From: Stefan Guath <stefan@HIDDEN> > > Date: Fri, 1 Jun 2018
 12:36:00 +0200 > > Cc: eliz@HIDDEN, 31656 <at> debbugs.gnu.org > > > > The very
 idea of shadowing the global `fill-column' in the first place > breaks the
 Principle Of Least > > Astonishment > > If that is so, then we should have
 gobs of astonished users since 1995. > [...] 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 HTML_MESSAGE           BODY: HTML included in message
 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
X-Debbugs-Envelope-To: 31656
Cc: 31656 <at> debbugs.gnu.org, npostavs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

--0000000000005fa5ab056d957c6c
Content-Type: text/plain; charset="UTF-8"

On Fri, Jun 1, 2018 at 2:52 PM Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Stefan Guath <stefan@HIDDEN>
> > Date: Fri, 1 Jun 2018 12:36:00 +0200
> > Cc: eliz@HIDDEN, 31656 <at> debbugs.gnu.org
> >
> > The very idea of shadowing the global `fill-column' in the first place
> breaks the Principle Of Least
> > Astonishment
>
> If that is so, then we should have gobs of astonished users since 1995.
>

Yes, the streets are flooded with them! But Emacs users are a tough crowd
that don't complain :)


> > and introduces annoyance and extra work for the user when trying to
> understand why the
> > explicit setting of `fill-column' is not respected.
>
> Documenting the current behavior should go a long way towards helping
> users understand that, right?
>

Sure, but I guess I don't understand exactly what that behavior is though
(see below)...


> > So, I guess my basic question is what value
> `emacs-lisp-docstring-fill-column' tries to add?
>
> From my POV, the answer is clear: it allows users to have different
> customizable defaults for fill-column in Emacs Lisp and elsewhere.
>

If that was the only intention, that functionality was already present (I
guess way long before 1995) by just doing:
(add-hook 'emacs-lisp-mode-hook (lambda () (setq fill-column 80)))
;fill-column is buffer-local


> E.g., in text modes, it is customary to enlarge the default to 79 or
> thereabouts, but in Emacs Lisp we generally say that good style is to
> make lines in doc strings no wider than 60 characters (see the ELisp
> manual).
>

Doc strings, sure. But outside doc string, as it behaves now? Nah. But even
if that was the case, then just use the buffer local fill-column in a hook
(as above). No need to introduce redundant mechanisms.


> > To me this entire functionality should either be removed or fixed so
> that its behavior reflects its current docs. In
> > its current state it just malformats elisp files in unexpected ways. Or
> am I missing something?
>
> I'm sorry, but after so many years we had this working,


But it has never been working. If we by "working" mean "behaves as its name
suggest, and as the doc describes" that is.

removing this
> functionality is out of the question.


Yes, I can see that. Sorry, that was a bad suggestion from me.


>   I suggested to fix the docs to
> match the implementation; if someone has other suggestions that don't
> break existing behavior, or at least let users get back existing
> behavior, please describe those suggestions.
>
> Thanks.
>

Ok, I'll take a stab at the easy way out and just update the docs. When
looking at the implementation in the function lisp-fill-paragraph, the
outer or-clause seems to separate two cases: 1) if in a comment use
fill-column, else 2) bind fill-column to emacs-lisp-docstring-fill-column
and call fill-paragraph. Does that seem to be correct? In that case the
current doc could be changed from "Value of `fill-column' to use when
filling a docstring..." to "Value of `fill-column' to use in
emacs-elisp-mode except in comments".

But I still think the original intent of emacs-lisp-docstring-fill-column
(as described in its current doc) is useful, and would of course prefer if
we rather could update the implementation to reflect that functionality
instead. I'm just not knowledgeable enough to do a PR. Would it be
difficult?

BTW, as a side note, I just wanted to add that this bug report is of course
a very small detail. Also, if my language sounds a bit harsh, its just
because I'm in a hurry. I'm really grateful to you and the community for
putting in all the hard work so that people like me can use such a superior
tool - thanks a million!

--0000000000005fa5ab056d957c6c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br>On Fri, Jun 1, 2018 at 2:52 PM Eli Zaretskii &lt;<a hr=
ef=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:<br><div class=3D"gma=
il_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt; From: Stef=
an Guath &lt;<a href=3D"mailto:stefan@HIDDEN" target=3D"_blank">stefan=
@automata.se</a>&gt;<br>
&gt; Date: Fri, 1 Jun 2018 12:36:00 +0200<br>
&gt; Cc: <a href=3D"mailto:eliz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>=
, <a href=3D"mailto:31656 <at> debbugs.gnu.org" target=3D"_blank">31656@debbugs.=
gnu.org</a><br>
&gt; <br>
&gt; The very idea of shadowing the global `fill-column&#39; in the first p=
lace breaks the Principle Of Least<br>
&gt; Astonishment<br>
<br>
If that is so, then we should have gobs of astonished users since 1995.<br>=
</blockquote><div><br></div><div>Yes, the streets are flooded with them! Bu=
t Emacs users are a tough crowd that don&#39;t complain :)<br></div><div>=
=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

&gt; and introduces annoyance and extra work for the user when trying to un=
derstand why the<br>
&gt; explicit setting of `fill-column&#39; is not respected.<br>
<br>
Documenting the current behavior should go a long way towards helping<br>
users understand that, right?<br></blockquote><div><br></div><div>Sure, but=
 I guess I don&#39;t understand exactly what that behavior is though (see b=
elow)...<br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">

&gt; So, I guess my basic question is what value `emacs-lisp-docstring-fill=
-column&#39; tries to add?<br>
<br>
From my POV, the answer is clear: it allows users to have different<br>
customizable defaults for fill-column in Emacs Lisp and elsewhere.<br></blo=
ckquote><div><br></div><div>If that was the only intention, that functional=
ity was already present (I guess way long before 1995) by just doing:</div>=
<div>(add-hook &#39;emacs-lisp-mode-hook (lambda () (setq fill-column 80)))=
 ;fill-column is buffer-local<br></div><div>=C2=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex">
E.g., in text modes, it is customary to enlarge the default to 79 or<br>
thereabouts, but in Emacs Lisp we generally say that good style is to<br>
make lines in doc strings no wider than 60 characters (see the ELisp<br>
manual).<br></blockquote><div><br></div><div>Doc strings, sure. But outside=
 doc string, as it behaves now? Nah. But even if that was the case, then ju=
st use the buffer local fill-column in a hook (as above). No need to introd=
uce redundant mechanisms.<br></div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,=
204,204);padding-left:1ex">

&gt; To me this entire functionality should either be removed or fixed so t=
hat its behavior reflects its current docs. In<br>
&gt; its current state it just malformats elisp files in unexpected ways. O=
r am I missing something?<br>
<br>
I&#39;m sorry, but after so many years we had this working,</blockquote><di=
v><br></div><div>But it has never been working. If we by &quot;working&quot=
; mean &quot;behaves as its name suggest, and as the doc describes&quot; th=
at is.<br></div><div> <br></div><blockquote class=3D"gmail_quote" style=3D"=
margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef=
t:1ex"> removing this<br>
functionality is out of the question.</blockquote><div><br></div><div>Yes, =
I can see that. Sorry, that was a bad suggestion from me.<br></div><div>=C2=
=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8e=
x;border-left:1px solid rgb(204,204,204);padding-left:1ex">=C2=A0 I suggest=
ed to fix the docs to<br>
match the implementation; if someone has other suggestions that don&#39;t<b=
r>
break existing behavior, or at least let users get back existing<br>
behavior, please describe those suggestions.<br>
<br>
Thanks.<br></blockquote><div><br></div><div>Ok, I&#39;ll take a stab at the=
 easy way out and just update the docs. When looking at the implementation =
in the function lisp-fill-paragraph, the outer or-clause seems to separate =
two cases: 1) if in a comment use fill-column, else 2) bind fill-column to =
emacs-lisp-docstring-fill-column and call fill-paragraph. Does that seem to=
 be correct? In that case the current doc could be changed from &quot;Value=
 of `fill-column&#39; to use when filling a docstring...&quot; to &quot;Val=
ue of `fill-column&#39; to use in emacs-elisp-mode except in comments&quot;=
.</div><div><br></div><div>But I still think the original intent of emacs-l=
isp-docstring-fill-column (as described in its current doc) is useful, and =
would of course prefer if we rather could update the implementation to refl=
ect that functionality instead. I&#39;m just not knowledgeable enough to do=
 a PR. Would it be difficult?<br></div><div><br></div><div>BTW, as a side n=
ote, I just wanted to add that this bug report is of course a very small de=
tail. Also, if my language sounds a bit harsh, its just because I&#39;m in =
a hurry. I&#39;m really grateful to you and the community for putting in al=
l the hard work so that people like me can use such a superior tool - thank=
s a million!<br></div><div><br></div></div></div>

--0000000000005fa5ab056d957c6c--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 1 Jun 2018 12:52:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 01 08:52:31 2018
Received: from localhost ([127.0.0.1]:56932 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fOjXj-0007XG-7t
	for submit <at> debbugs.gnu.org; Fri, 01 Jun 2018 08:52:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54537)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1fOjXh-0007X4-HY
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 08:52:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1fOjXX-0001on-J8
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 08:52:24 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53092)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1fOjXX-0001of-EM; Fri, 01 Jun 2018 08:52:19 -0400
Received: from [176.228.60.248] (port=4442 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1fOjXW-0004Hp-TV; Fri, 01 Jun 2018 08:52:19 -0400
Date: Fri, 01 Jun 2018 15:52:19 +0300
Message-Id: <83lgbyfz3w.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Guath <stefan@HIDDEN>
In-reply-to: <CAD__r--i5NNqM17N2OAKHW-A2snxfDFeOpej+UpDe_oDXK0Qow@HIDDEN>
 (message from Stefan Guath on Fri, 1 Jun 2018 12:36:00 +0200)
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 <83sh66g8wb.fsf@HIDDEN> <87bmcuc0bo.fsf@HIDDEN>
 <CAD__r--i5NNqM17N2OAKHW-A2snxfDFeOpej+UpDe_oDXK0Qow@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31656
Cc: 31656 <at> debbugs.gnu.org, npostavs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Stefan Guath <stefan@HIDDEN>
> Date: Fri, 1 Jun 2018 12:36:00 +0200
> Cc: eliz@HIDDEN, 31656 <at> debbugs.gnu.org
> 
> The very idea of shadowing the global `fill-column' in the first place breaks the Principle Of Least
> Astonishment

If that is so, then we should have gobs of astonished users since 1995.

> and introduces annoyance and extra work for the user when trying to understand why the
> explicit setting of `fill-column' is not respected.

Documenting the current behavior should go a long way towards helping
users understand that, right?

> So, I guess my basic question is what value `emacs-lisp-docstring-fill-column' tries to add?

From my POV, the answer is clear: it allows users to have different
customizable defaults for fill-column in Emacs Lisp and elsewhere.
E.g., in text modes, it is customary to enlarge the default to 79 or
thereabouts, but in Emacs Lisp we generally say that good style is to
make lines in doc strings no wider than 60 characters (see the ELisp
manual).

> To me this entire functionality should either be removed or fixed so that its behavior reflects its current docs. In
> its current state it just malformats elisp files in unexpected ways. Or am I missing something?

I'm sorry, but after so many years we had this working, removing this
functionality is out of the question.  I suggested to fix the docs to
match the implementation; if someone has other suggestions that don't
break existing behavior, or at least let users get back existing
behavior, please describe those suggestions.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 1 Jun 2018 12:43:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 01 08:43:26 2018
Received: from localhost ([127.0.0.1]:56928 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fOjOw-0007K3-9L
	for submit <at> debbugs.gnu.org; Fri, 01 Jun 2018 08:43:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51054)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1fOjOv-0007Js-An
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 08:43:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1fOjOn-0008U1-31
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 08:43:20 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52863)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1fOjOm-0008Tp-V5; Fri, 01 Jun 2018 08:43:17 -0400
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 <eliz@HIDDEN>)
 id 1fOjOm-0002tO-Eq; Fri, 01 Jun 2018 08:43:16 -0400
Date: Fri, 01 Jun 2018 15:43:16 +0300
Message-Id: <83muwefziz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
In-reply-to: <87bmcuc0bo.fsf@HIDDEN> (message from Noam Postavsky on Fri,
 01 Jun 2018 05:39:39 -0400)
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 <83sh66g8wb.fsf@HIDDEN> <87bmcuc0bo.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31656
Cc: 31656 <at> debbugs.gnu.org, stefan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Noam Postavsky <npostavs@HIDDEN>
> Cc: Stefan Guath <stefan@HIDDEN>,  31656 <at> 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 1 Jun 2018 10:36:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 01 06:36:34 2018
Received: from localhost ([127.0.0.1]:56835 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fOhQ9-0000Lh-N7
	for submit <at> debbugs.gnu.org; Fri, 01 Jun 2018 06:36:34 -0400
Received: from [85.112.160.81] (port=43276 helo=mail.automata.se)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefan@HIDDEN>) id 1fOhQ6-0000LR-Iz
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 06:36:31 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.automata.se (Postfix) with ESMTP id 708BA3A123
 for <31656 <at> debbugs.gnu.org>; Fri,  1 Jun 2018 12:36:24 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at lux2.netcamp.se
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 iWQlsP_rPBOG for <31656 <at> debbugs.gnu.org>;
 Fri,  1 Jun 2018 12:36:18 +0200 (CEST)
Received: from mail-wr0-f181.google.com (mail-wr0-f181.google.com
 [209.85.128.181])
 by mail.automata.se (Postfix) with ESMTPSA id 159603A125
 for <31656 <at> debbugs.gnu.org>; Fri,  1 Jun 2018 12:36:17 +0200 (CEST)
Received: by mail-wr0-f181.google.com with SMTP id k16-v6so8628682wro.0
 for <31656 <at> debbugs.gnu.org>; Fri, 01 Jun 2018 03:36:17 -0700 (PDT)
X-Gm-Message-State: ALKqPweJ1G995HzvCXTKDskf2Z3HPUDnM/RDF9IQqCDdf8OzhiWgiRCJ
 +J8/bqokScpeLgAo8ZHH/GZbOuh3D2VCZz8FExo=
X-Google-Smtp-Source: ADUXVKKWYzFroiCWfVIHI+DTRsyXTvnSrnnHsD0lSkGUGMJ6facsxFM8WW8RcU5772rxgISVu65U+h0LOLE7qdNSeOE=
X-Received: by 2002:adf:891a:: with SMTP id
 s26-v6mr7736700wrs.276.1527849376570; 
 Fri, 01 Jun 2018 03:36:16 -0700 (PDT)
MIME-Version: 1.0
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 <83sh66g8wb.fsf@HIDDEN> <87bmcuc0bo.fsf@HIDDEN>
In-Reply-To: <87bmcuc0bo.fsf@HIDDEN>
From: Stefan Guath <stefan@HIDDEN>
Date: Fri, 1 Jun 2018 12:36:00 +0200
X-Gmail-Original-Message-ID: <CAD__r--i5NNqM17N2OAKHW-A2snxfDFeOpej+UpDe_oDXK0Qow@HIDDEN>
Message-ID: <CAD__r--i5NNqM17N2OAKHW-A2snxfDFeOpej+UpDe_oDXK0Qow@HIDDEN>
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
To: npostavs@HIDDEN
Content-Type: multipart/alternative; boundary="0000000000005c65be056d922733"
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  The very idea of shadowing the global `fill-column' in the
 first place breaks the Principle Of Least Astonishment and introduces
 annoyance
 and extra work for the user when trying to understand why the explicit setting
 of `fill-column' is not respected. If it is to be done anyway, it needs to
 be well motivated and also executed in a correct way. [...] 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 HTML_MESSAGE           BODY: HTML included in message
 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
X-Debbugs-Envelope-To: 31656
Cc: eliz@HIDDEN, 31656 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

--0000000000005c65be056d922733
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

The very idea of shadowing the global `fill-column' in the first place
breaks the Principle Of Least Astonishment and introduces annoyance and
extra work for the user when trying to understand why the explicit setting
of `fill-column' is not respected. If it is to be done anyway, it needs to
be well motivated and also executed in a correct way.

So, I guess my basic question is what value
`emacs-lisp-docstring-fill-column' tries to add? It's obviously not aiming
to introduce a general shadowing for elisp files only, since that mechanism
is already present due to `fill-column' being buffer local. Rather,
according to its docs, it tries to add selective shadowing for elisp-files
in doc strings only. Fair enough, that is an edge case where a shadowing
mechanism could be motivated. But instead it implements some kind of
unpredictable shadowing - I don't even understand in what exact
circumstances the shadowing takes place. If we were to just update its
docs, what should it be updated to?

To me this entire functionality should either be removed or fixed so that
its behavior reflects its current docs. In its current state it just
malformats elisp files in unexpected ways. Or am I missing something?


On Fri, Jun 1, 2018 at 11:39 AM Noam Postavsky <npostavs@HIDDEN> wrote:

> Eli Zaretskii <eliz@HIDDEN> writes:
>
> >> From: Stefan Guath <stefan@HIDDEN>
> >> Date: Wed, 30 May 2018 14:50:01 +0200
> >>
> >> `emacs-lisp-docstring-fill-column' shadows `fill-column' in too many
> cases in emacs-lisp-mode. The
> >> documentation of `emacs-lisp-docstring-fill-column' states: "Value of
> =E2=80=98fill-column=E2=80=99 to use when filling a
> >> docstring". But it incorrectly seems to be used in a lot more cases
> than just in a docstring (the only case that
> >> I've found where =E2=80=98fill-column=E2=80=99 is actually respected i=
s within
> comments). A work-around is to set
> >> `emacs-lisp-docstring-fill-column' to nil, but it would be nice to hav=
e
> it working properly instead.
> >>
> >> I might be missing something, but think the incorrect behavior is to b=
e
> found in `lisp-fill-paragraph' that is
> >> invoked by `fill-paragraph' through `fill-paragraph-function'. It seem=
s
> like `lisp-fill-paragraph' unconditionally
> >> sets `fill-column' to `emacs-lisp-docstring-fill-column' without
> checking whether point is within a doc string
> >> first. The only requirements for enable shadowing currently seems to b=
e
> "(and (integerp
> >> emacs-lisp-docstring-fill-column) (derived-mode-p 'emacs-lisp-mode))",
> which doesn't seems sufficient.
> >
> > AFAICT, this behavior was in Emacs since about forever (since 1995, t
> > be precise).  So maybe we just need to adjust the doc string to
> > reflect the reality?
> >
> > 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)) )
>

--0000000000005c65be056d922733
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>The very idea of shadowing the global `fill-column&#3=
9; in the first=20
place breaks the Principle Of Least Astonishment and introduces=20
annoyance and extra work for the user when trying to understand why the=20
explicit setting of `fill-column&#39; is not respected. If it is to be done=
=20
anyway, it needs to be well motivated and also executed in a correct=20
way.<br></div><div><br></div><div>So, I guess my basic question is what=20
value `emacs-lisp-docstring-fill-column&#39; tries to add? It&#39;s obvious=
ly not aiming to introduce a general shadowing for elisp files only, since =
that mechanism is already present due to `fill-column&#39; being buffer loc=
al. Rather, according to=20
its docs, it tries to add selective shadowing for elisp-files in doc=20
strings only. Fair enough, that is an edge case where a shadowing=20
mechanism could be motivated. But instead it implements some kind of unpred=
ictable shadowing - I don&#39;t even understand in what exact circumstances=
 the shadowing takes place. If we were to just update its docs, what should=
 it be updated to?<br></div><div><br></div><div>To me this entire functiona=
lity should either be removed or fixed so that its behavior reflects its cu=
rrent docs. In its current state it just malformats elisp files in unexpect=
ed ways. Or am I missing something?<br></div><div><br></div></div><br><div =
class=3D"gmail_quote"><div dir=3D"ltr">On Fri, Jun 1, 2018 at 11:39 AM Noam=
 Postavsky &lt;<a href=3D"mailto:npostavs@HIDDEN">npostavs@HIDDEN</a>=
&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Eli Zaretskii &lt;<a hr=
ef=3D"mailto:eliz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>&gt; writes:<b=
r>
<br>
&gt;&gt; From: Stefan Guath &lt;<a href=3D"mailto:stefan@HIDDEN" targe=
t=3D"_blank">stefan@HIDDEN</a>&gt;<br>
&gt;&gt; Date: Wed, 30 May 2018 14:50:01 +0200<br>
&gt;&gt; <br>
&gt;&gt; `emacs-lisp-docstring-fill-column&#39; shadows `fill-column&#39; i=
n too many cases in emacs-lisp-mode. The<br>
&gt;&gt; documentation of `emacs-lisp-docstring-fill-column&#39; states: &q=
uot;Value of =E2=80=98fill-column=E2=80=99 to use when filling a<br>
&gt;&gt; docstring&quot;. But it incorrectly seems to be used in a lot more=
 cases than just in a docstring (the only case that<br>
&gt;&gt; I&#39;ve found where =E2=80=98fill-column=E2=80=99 is actually res=
pected is within comments). A work-around is to set<br>
&gt;&gt; `emacs-lisp-docstring-fill-column&#39; to nil, but it would be nic=
e to have it working properly instead.<br>
&gt;&gt; <br>
&gt;&gt; I might be missing something, but think the incorrect behavior is =
to be found in `lisp-fill-paragraph&#39; that is<br>
&gt;&gt; invoked by `fill-paragraph&#39; through `fill-paragraph-function&#=
39;. It seems like `lisp-fill-paragraph&#39; unconditionally<br>
&gt;&gt; sets `fill-column&#39; to `emacs-lisp-docstring-fill-column&#39; w=
ithout checking whether point is within a doc string<br>
&gt;&gt; first. The only requirements for enable shadowing currently seems =
to be &quot;(and (integerp<br>
&gt;&gt; emacs-lisp-docstring-fill-column) (derived-mode-p &#39;emacs-lisp-=
mode))&quot;, which doesn&#39;t seems sufficient.<br>
&gt;<br>
&gt; AFAICT, this behavior was in Emacs since about forever (since 1995, t<=
br>
&gt; be precise).=C2=A0 So maybe we just need to adjust the doc string to<b=
r>
&gt; reflect the reality?<br>
&gt;<br>
&gt; Or are there real-life use cases where this behavior is grossly<br>
&gt; inappropriate?<br>
<br>
I don&#39;t think it makes sense to apply normal plain text filling rules t=
o<br>
code.=C2=A0 Maybe it doesn&#39;t come up much because people don&#39;t usua=
lly call<br>
M-q on code, and usually lines of code are kept short enough that they<br>
wouldn&#39;t get filled anyway.=C2=A0 But picking a random example from rgr=
ep<br>
^.\{100,\}$ on the Emacs code base:<br>
<br>
(defun feedmail-default-date-generator (maybe-file)<br>
=C2=A0 &quot;Default function for generating Date: header contents.&quot;<b=
r>
=C2=A0 (feedmail-say-debug &quot;&gt;in-&gt; feedmail-default-date-generato=
r&quot;)<br>
=C2=A0 (when maybe-file<br>
=C2=A0 =C2=A0 (feedmail-say-debug (concat &quot;4 cre &quot; (feedmail-rfc8=
22-date (nth 4 (file-attributes maybe-file)))))<br>
=C2=A0 =C2=A0 (feedmail-say-debug (concat &quot;5 mod &quot; (feedmail-rfc8=
22-date (nth 5 (file-attributes maybe-file)))))<br>
=C2=A0 =C2=A0 (feedmail-say-debug (concat &quot;6 sta &quot; (feedmail-rfc8=
22-date (nth 6 (file-attributes maybe-file))))))<br>
=C2=A0 (let ((date-time))<br>
=C2=A0 =C2=A0 (if (and (not feedmail-queue-use-send-time-for-date) maybe-fi=
le)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq date-time (nth 5 (file-attributes maybe-f=
ile))))<br>
=C2=A0 =C2=A0 (feedmail-rfc822-date date-time))<br>
=C2=A0 )<br>
<br>
Running M-q on every line turns it into this nonsense:<br>
<br>
(defun feedmail-default-date-generator (maybe-file)<br>
=C2=A0 &quot;Default function for generating Date: header contents.&quot;<b=
r>
=C2=A0 (feedmail-say-debug &quot;&gt;in-&gt; feedmail-default-date-generato=
r&quot;)<br>
=C2=A0 (when maybe-file<br>
=C2=A0 =C2=A0 (feedmail-say-debug (concat &quot;4<br>
=C2=A0 =C2=A0 cre &quot; (feedmail-rfc822-date (nth 4 (file-attributes<br>
=C2=A0 =C2=A0 maybe-file)))))<br>
=C2=A0 =C2=A0 (feedmail-say-debug (concat &quot;5<br>
=C2=A0 =C2=A0 mod &quot; (feedmail-rfc822-date (nth 5 (file-attributes<br>
=C2=A0 =C2=A0 maybe-file)))))<br>
=C2=A0 =C2=A0 (feedmail-say-debug (concat &quot;6<br>
=C2=A0 =C2=A0 sta &quot; (feedmail-rfc822-date (nth 6 (file-attributes<br>
=C2=A0 =C2=A0 maybe-file))))))<br>
=C2=A0 (let ((date-time))<br>
=C2=A0 =C2=A0 (if (and (not feedmail-queue-use-send-time-for-date)<br>
=C2=A0 =C2=A0 maybe-file)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq date-time (nth 5 (file-attributes maybe-f=
ile))))<br>
=C2=A0 =C2=A0 (feedmail-rfc822-date date-time)) )<br>
</blockquote></div>

--0000000000005c65be056d922733--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 1 Jun 2018 09:39:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 01 05:39:50 2018
Received: from localhost ([127.0.0.1]:56804 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fOgXG-0007P4-BM
	for submit <at> debbugs.gnu.org; Fri, 01 Jun 2018 05:39:50 -0400
Received: from mail-io0-f175.google.com ([209.85.223.175]:34951)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fOgXD-0007Oq-5P
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 05:39:49 -0400
Received: by mail-io0-f175.google.com with SMTP id u4-v6so5269232iof.2
 for <31656 <at> debbugs.gnu.org>; Fri, 01 Jun 2018 02:39:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=f4nzEY6cuw8bL4nm/KRl2gSTv+VkUhwpQRV53dIeBz8=;
 b=MlWSZwQX9oxyOAs6+Z3UagcOwHu5jMSQKayzUkscgpzv2Mw/Eg7Zu3mXyNfQTERNan
 C5q84FO7DpzR3ZQGvoVciko4oX6FvfZcG2mjyMYkXZF0HqamInCyDwC2FQP+zb6gDYKy
 LPykceLnqlOI74X1mwkoQwx7SiiVbjCtb8QMOiknO/mRmy5ukYbak0ebS8aC5rAmdPwo
 IX2Jlz0kr9wA/CTfSIJmjshTVDDooZPNLUEKVO1xX5y0UhPvnkfiHV2BBS+O0XbmRMkb
 Gm1cxw3qTg7JgZjbzXVtHccBrwB1lA0THTmsWM0BVcgZi9CI6qWHfTk9HmJRB4PDH3PN
 QPHg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=f4nzEY6cuw8bL4nm/KRl2gSTv+VkUhwpQRV53dIeBz8=;
 b=g45Bi6M2WeAce6N8idheFdzHe88aqtqI6CpGBa+o6n371nWSfwlA+iXNhBJ5t95m9F
 JZQ8YYm/ZMXtOMuLEZqHmZ/HLTFJLliuYZ9O6QJCqTLf58FND5E1B4iURE/I7kXpX9zL
 MnA9bJpFbdNGd9W2HM5lSsLLZV22tbJSnZyChW+4MEqLQRT3rwrrTRHokksJ/CwjCKy+
 9BmZW7vLWbGNutinNj/zvf4q91noW9JMcyGg8MxOjzrBKSGkuPuNKqQ92c3xq8SNTFuK
 DfdhqJzUnWKPrE1J0GxoGg83ilKFZkUveWdOQk/ZAbht5d93nN2gMVWhPWJCHf7t3R24
 oyxg==
X-Gm-Message-State: ALKqPwdCmiT7DeLeQ3Rkq1unGWyCoTAegLWWMgWaA34eddbkS0mi4xto
 l6rZ1IsI5BvZnxJ8rVOfWg2Fwg==
X-Google-Smtp-Source: ADUXVKLJopBdFZktLdD1HnQyNcMGklsqyxhKoFOl1jY9lcQ2E06LPwY7a9GUU9XX6CHZs0G06jPiuQ==
X-Received: by 2002:a6b:1502:: with SMTP id 2-v6mr10126268iov.18.1527845981332; 
 Fri, 01 Jun 2018 02:39:41 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 g26-v6sm215847iti.0.2018.06.01.02.39.40
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Fri, 01 Jun 2018 02:39:40 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 <83sh66g8wb.fsf@HIDDEN>
Date: Fri, 01 Jun 2018 05:39:39 -0400
In-Reply-To: <83sh66g8wb.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 01 Jun
 2018 12:20:52 +0300")
Message-ID: <87bmcuc0bo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31656
Cc: 31656 <at> debbugs.gnu.org, Stefan Guath <stefan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Stefan Guath <stefan@HIDDEN>
>> Date: Wed, 30 May 2018 14:50:01 +0200
>>=20
>> `emacs-lisp-docstring-fill-column' shadows `fill-column' in too many cas=
es in emacs-lisp-mode. The
>> documentation of `emacs-lisp-docstring-fill-column' states: "Value of =
=E2=80=98fill-column=E2=80=99 to use when filling a
>> docstring". But it incorrectly seems to be used in a lot more cases than=
 just in a docstring (the only case that
>> I've found where =E2=80=98fill-column=E2=80=99 is actually respected is =
within comments). A work-around is to set
>> `emacs-lisp-docstring-fill-column' to nil, but it would be nice to have =
it working properly instead.
>>=20
>> I might be missing something, but think the incorrect behavior is to be =
found in `lisp-fill-paragraph' that is
>> invoked by `fill-paragraph' through `fill-paragraph-function'. It seems =
like `lisp-fill-paragraph' unconditionally
>> sets `fill-column' to `emacs-lisp-docstring-fill-column' without checkin=
g whether point is within a doc string
>> first. The only requirements for enable shadowing currently seems to be =
"(and (integerp
>> emacs-lisp-docstring-fill-column) (derived-mode-p 'emacs-lisp-mode))", w=
hich doesn't seems sufficient.
>
> AFAICT, this behavior was in Emacs since about forever (since 1995, t
> be precise).  So maybe we just need to adjust the doc string to
> reflect the reality?
>
> 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)) )




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at 31656 <at> debbugs.gnu.org:


Received: (at 31656) by debbugs.gnu.org; 1 Jun 2018 09:21:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 01 05:21:03 2018
Received: from localhost ([127.0.0.1]:56795 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fOgF5-0006x7-FV
	for submit <at> debbugs.gnu.org; Fri, 01 Jun 2018 05:21:03 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35303)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1fOgF3-0006wK-Fq
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 05:21:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1fOgEu-0003tB-C7
 for 31656 <at> debbugs.gnu.org; Fri, 01 Jun 2018 05:20:56 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39307)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1fOgEu-0003t5-84; Fri, 01 Jun 2018 05:20:52 -0400
Received: from [176.228.60.248] (port=4151 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1fOgEt-0001U7-Kj; Fri, 01 Jun 2018 05:20:52 -0400
Date: Fri, 01 Jun 2018 12:20:52 +0300
Message-Id: <83sh66g8wb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Guath <stefan@HIDDEN>
In-reply-to: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
 (message from Stefan Guath on Wed, 30 May 2018 14:50:01 +0200)
Subject: Re: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
References: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31656
Cc: 31656 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Stefan Guath <stefan@HIDDEN>
> Date: Wed, 30 May 2018 14:50:01 +0200
> 
> `emacs-lisp-docstring-fill-column' shadows `fill-column' in too many cases in emacs-lisp-mode. The
> documentation of `emacs-lisp-docstring-fill-column' states: "Value of ‘fill-column’ to use when filling a
> docstring". But it incorrectly seems to be used in a lot more cases than just in a docstring (the only case that
> I've found where ‘fill-column’ is actually respected is within comments). A work-around is to set
> `emacs-lisp-docstring-fill-column' to nil, but it would be nice to have it working properly instead.
> 
> I might be missing something, but think the incorrect behavior is to be found in `lisp-fill-paragraph' that is
> invoked by `fill-paragraph' through `fill-paragraph-function'. It seems like `lisp-fill-paragraph' unconditionally
> sets `fill-column' to `emacs-lisp-docstring-fill-column' without checking whether point is within a doc string
> first. The only requirements for enable shadowing currently seems to be "(and (integerp
> emacs-lisp-docstring-fill-column) (derived-mode-p 'emacs-lisp-mode))", which doesn't seems sufficient.

AFAICT, this behavior was in Emacs since about forever (since 1995, t
be precise).  So maybe we just need to adjust the doc string to
reflect the reality?

Or are there real-life use cases where this behavior is grossly
inappropriate?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 May 2018 12:50:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 30 08:50:37 2018
Received: from localhost ([127.0.0.1]:54765 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fO0Yn-00008A-Ci
	for submit <at> debbugs.gnu.org; Wed, 30 May 2018 08:50:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49273)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefan@HIDDEN>) id 1fO0Yk-00007w-8N
 for submit <at> debbugs.gnu.org; Wed, 30 May 2018 08:50:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <stefan@HIDDEN>) id 1fO0Yd-00029l-RN
 for submit <at> debbugs.gnu.org; Wed, 30 May 2018 08:50:28 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,HTML_MESSAGE
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:48653)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <stefan@HIDDEN>) id 1fO0Yd-00029F-Cf
 for submit <at> debbugs.gnu.org; Wed, 30 May 2018 08:50:27 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40213)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <stefan@HIDDEN>) id 1fO0Yb-0001Rs-Pl
 for bug-gnu-emacs@HIDDEN; Wed, 30 May 2018 08:50:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <stefan@HIDDEN>) id 1fO0YZ-00021u-5x
 for bug-gnu-emacs@HIDDEN; Wed, 30 May 2018 08:50:25 -0400
Received: from [85.112.160.81] (port=42030 helo=mail.automata.se)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <stefan@HIDDEN>) id 1fO0YY-0001xe-LI
 for bug-gnu-emacs@HIDDEN; Wed, 30 May 2018 08:50:23 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.automata.se (Postfix) with ESMTP id 49D133A124
 for <bug-gnu-emacs@HIDDEN>; Wed, 30 May 2018 14:50:19 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at lux2.netcamp.se
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 8vnJF8HwL9hn for <bug-gnu-emacs@HIDDEN>;
 Wed, 30 May 2018 14:50:17 +0200 (CEST)
Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54])
 by mail.automata.se (Postfix) with ESMTPSA id C60E83A123
 for <bug-gnu-emacs@HIDDEN>; Wed, 30 May 2018 14:50:17 +0200 (CEST)
Received: by mail-wm0-f54.google.com with SMTP id o78-v6so47621047wmg.0
 for <bug-gnu-emacs@HIDDEN>; Wed, 30 May 2018 05:50:17 -0700 (PDT)
X-Gm-Message-State: APt69E1Kzsp0EVFfbjMr1J3lGszKJPnT75ulNCuzs+lFM/Bk1K6zzt8I
 u3am7Z0afxG0HXsobwyw+wxetN8n09mEiJhCxXc=
X-Google-Smtp-Source: ADUXVKJs/i+OdQNCodBrPF8IUCDfVxD3YZBnhsf/F/IE2wS2Yj6IU1MCDtbKueIoo7+F6UOfSWbKpAuEJobN7Gm8KOc=
X-Received: by 2002:a1c:c46:: with SMTP id 67-v6mr1465759wmm.79.1527684617409; 
 Wed, 30 May 2018 05:50:17 -0700 (PDT)
MIME-Version: 1.0
From: Stefan Guath <stefan@HIDDEN>
Date: Wed, 30 May 2018 14:50:01 +0200
X-Gmail-Original-Message-ID: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
Message-ID: <CAD__r--oG2Sw6kDBLxGpyv0yT0DeLkOsGy0p7b9q21_1_ksTSA@HIDDEN>
Subject: 26.1; `fill-paragraph' malformats in emacs-lisp-mode
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000f31ae3056d6bcace"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

--000000000000f31ae3056d6bcace
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

VERSION
GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17
Version 10.10.5 (Build 14F2511)) of 2018-05-28

DESCRIPTION
`emacs-lisp-docstring-fill-column' shadows `fill-column' in too many cases
in emacs-lisp-mode. The documentation of `emacs-lisp-docstring-fill-column'
states: "Value of =E2=80=98fill-column=E2=80=99 to use when filling a docst=
ring". But it
incorrectly seems to be used in a lot more cases than just in a docstring
(the only case that I've found where =E2=80=98fill-column=E2=80=99 is actua=
lly respected is
within comments). A work-around is to set
`emacs-lisp-docstring-fill-column' to nil, but it would be nice to have it
working properly instead.

I might be missing something, but think the incorrect behavior is to be
found in `lisp-fill-paragraph' that is invoked by `fill-paragraph' through
`fill-paragraph-function'. It seems like `lisp-fill-paragraph'
unconditionally sets `fill-column' to `emacs-lisp-docstring-fill-column'
without checking whether point is within a doc string first. The only
requirements for enable shadowing currently seems to be "(and (integerp
emacs-lisp-docstring-fill-column) (derived-mode-p 'emacs-lisp-mode))",
which doesn't seems sufficient.

TO REPRODUCE
* emacs -q
* C-x b <return> (i.e. switch to *scratch* buffer)
* M-x emacs-lisp-mode
* M-x column-number-mode (optional)
* (setq fill-column 80) ;used by `fill-paragraph'
* (setq emacs-lisp-docstring-fill-column 40) ;should override `fill-column'
in doc strings only!
* Paste in the line "word00 word01 word02 word03 word04 word05 word06
word07 word08 word09 word10 word11" (i.e. 12 words, 83 chars)
* M-x fill-paragraph (with point on pasted line above)
* The value of `emacs-lisp-docstring-fill-column' (40) is incorrectly used
when formatting. The value of `fill-column' (80) should have been used
instead, since the point is not in a doc string.

Note that the default value of `emacs-lisp-docstring-fill-column' is 65
(rather than nil), so this malformatting is enabled by default.

--000000000000f31ae3056d6bcace
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>VERSION</div><div>GNU Emacs 26.1 (build 1, x86_64-app=
le-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) of 2018=
-05-28<br></div><div><br></div><div>DESCRIPTION</div><div>`emacs-lisp-docst=
ring-fill-column&#39; shadows `fill-column&#39; in too many cases in emacs-=
lisp-mode. The documentation of `emacs-lisp-docstring-fill-column&#39; stat=
es: &quot;Value of =E2=80=98fill-column=E2=80=99 to use when filling a docs=
tring&quot;. But it incorrectly seems to be used in a lot more cases than j=
ust in a docstring (the only case that I&#39;ve found where =E2=80=98fill-c=
olumn=E2=80=99 is actually respected is within comments). A work-around is =
to set `emacs-lisp-docstring-fill-column&#39; to nil, but it would be nice =
to have it working properly instead.</div><div><br></div><div>I might be mi=
ssing something, but think the incorrect behavior is to be found in `lisp-f=
ill-paragraph&#39; that is invoked by `fill-paragraph&#39; through `fill-pa=
ragraph-function&#39;. It seems like `lisp-fill-paragraph&#39; unconditiona=
lly sets `fill-column&#39; to `emacs-lisp-docstring-fill-column&#39; withou=
t checking whether point is within a doc string first. The only requirement=
s for enable shadowing currently seems to be &quot;(and (integerp emacs-lis=
p-docstring-fill-column) (derived-mode-p &#39;emacs-lisp-mode))&quot;, whic=
h doesn&#39;t seems sufficient.<br></div><div><br></div><div>TO REPRODUCE<b=
r></div><div>* emacs -q</div><div>* C-x b &lt;return&gt; (i.e. switch to *s=
cratch* buffer)<br></div><div>* M-x emacs-lisp-mode</div><div>* M-x column-=
number-mode (optional)<br></div><div>* (setq fill-column 80) ;used by `fill=
-paragraph&#39;<br></div><div><div>* (setq=C2=A0emacs-lisp-docstring-fill-c=
olumn 40) ;should override `fill-column&#39; in doc strings only!<br></div>=
<div></div>* Paste in the line &quot;word00 word01 word02 word03 word04 wor=
d05 word06 word07 word08 word09 word10 word11&quot; (i.e. 12 words, 83 char=
s)</div><div>* M-x fill-paragraph (with point on pasted line above)<br></di=
v><div>* The value of `emacs-lisp-docstring-fill-column&#39; (40) is incorr=
ectly used when formatting. The value of `fill-column&#39; (80) should have=
 been used instead, since the point is not in a doc string.<br></div><div><=
br></div><div>Note that the default value of `emacs-lisp-docstring-fill-col=
umn&#39; is 65 (rather than nil), so this malformatting is enabled by defau=
lt.<br></div></div>

--000000000000f31ae3056d6bcace--




Acknowledgement sent to Stefan Guath <stefan@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#31656; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 3 Jun 2018 00:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.