From unknown Wed Jun 25 09:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21778: 24.5; python mode: fill-paragraph with raw docstring ignores python-fill-docstring-style Resent-From: John Palmieri Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Oct 2015 19:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21778 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21778@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.144606141816206 (code B ref -1); Wed, 28 Oct 2015 19:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Oct 2015 19:43:38 +0000 Received: from localhost ([127.0.0.1]:42890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrWdF-0004DJ-IX for submit@debbugs.gnu.org; Wed, 28 Oct 2015 15:43:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43291) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrWCv-0003Ob-HY for submit@debbugs.gnu.org; Wed, 28 Oct 2015 15:16:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrWCu-0006bh-7W for submit@debbugs.gnu.org; Wed, 28 Oct 2015 15:16:25 -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.3 required=5.0 tests=BAYES_40, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrWCu-0006bd-4M for submit@debbugs.gnu.org; Wed, 28 Oct 2015 15:16:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrWCs-00008B-RB for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 15:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrWCr-0006aX-Bo for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 15:16:22 -0400 Received: from mail-io0-x231.google.com ([2607:f8b0:4001:c06::231]:33737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrWCr-0006aN-7f for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 15:16:21 -0400 Received: by iodd200 with SMTP id d200so21720365iod.0 for ; Wed, 28 Oct 2015 12:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=CWzo3o9YN2Ho9qW45+yCdxj08eA71oooedZer0STGcA=; b=zf9XqySq8pO0CZyDiapk+G+L4TAfoYOhp+sqcM0NNwQt3x5njEK2xqlj8ONW8QTmh/ Zvi/g/OeS84hS35DDXPZ+/MIScyzIOKdgFEEnCJaqDXmiDT3qDCp79CnnQf2RrYb7pAD oAXNIkYvimKTK+okAQ1O2EwnwMBO7fp8UwrNPzKNWEN/AZ7uWd/lVybvJpn+aasxL4YW v/KSYl83s7etTaIdfeyhD7avj/ksiB3TnAzek+Vc3tCk1rd17u0p5kP2kfNy+v7dRO38 fuQB57L+68SzTYBur5BZGIvz7F3swEKBDOTawqB8j0wPmSTJsBlBTWvUIbWD5lukItAh h7iw== MIME-Version: 1.0 X-Received: by 10.107.134.231 with SMTP id q100mr14791998ioi.85.1446059780394; Wed, 28 Oct 2015 12:16:20 -0700 (PDT) Received: by 10.107.9.134 with HTTP; Wed, 28 Oct 2015 12:16:20 -0700 (PDT) Date: Wed, 28 Oct 2015 12:16:20 -0700 Message-ID: From: John Palmieri Content-Type: multipart/alternative; boundary=001a113fe84e88f40805232f076f X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Mailman-Approved-At: Wed, 28 Oct 2015 15:43:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --001a113fe84e88f40805232f076f Content-Type: text/plain; charset=UTF-8 To recreate the bug, in Python mode, type def f(): r""" This is the docstring for my function. It's a raw docstring because I want to type \t here, and maybe \n, for example in LaTeX code like \tau or \nu. More docstring here. """ pass Now with the cursor in the first sentence of the docstring, running fill-paragraph ignores the setting of python-fill-docstring-style, I think because Emacs doesn't detect that r""" is the start of the docstring. Similarly, running fill-paragraph in the last sentence behaves badly. Also similarly, I think that it should be valid to begin a docstring with b""" or u""" (and possibly some combination of b, r, u, before """, although I'm not sure), and these also don't behave correctly. In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org Windowing system distributor `Apple', version 10.3.1348 Configured using: `configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp'' Important settings: value of $LANG: C locale-coding-system: utf-8-unix Major mode: Outline Minor modes in effect: goto-address-mode: t TeX-PDF-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t auto-fill-function: do-auto-fill transient-mark-mode: t view-mode: t --001a113fe84e88f40805232f076f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
To recreate the bug, in Python mode, type

def = f():
=C2=A0=C2=A0=C2=A0 r"""
=C2=A0=C2=A0=C2=A0 This i= s the docstring for my function.

=C2=A0=C2=A0=C2=A0 It's a raw d= ocstring because I want to type \t here, and maybe \n,
=C2=A0=C2=A0=C2= =A0 for example in LaTeX code like \tau or \nu.

=C2=A0=C2=A0=C2=A0 M= ore docstring here.
=C2=A0=C2=A0=C2=A0 """
=C2=A0=C2= =A0=C2=A0 pass

Now with the cursor in the first sentence of the docs= tring, running fill-paragraph ignores the setting of python-fill-docstring-= style, I think because Emacs doesn't detect that r""" is= the start of the=C2=A0 docstring. Similarly, running fill-paragraph in the= last sentence behaves badly. Also similarly, I think that it should be val= id to begin a docstring with b""" or u""" (an= d possibly some combination of b, r, u, before """, although= I'm not sure), and these also don't behave correctly.


<= br>In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)=
=C2=A0of 2015-04-10 on buil= der10-9.porkrind.org
Windowing system distributor `Apple', versi= on 10.3.1348
Configured using:
=C2=A0`configure --with-ns '--enab= le-locallisppath=3D/Library/Application
=C2=A0Support/Emacs/${version}/s= ite-lisp:/Library/Application
=C2=A0Support/Emacs/site-lisp''
Important settings:
=C2=A0 value of $LANG: C
=C2=A0 locale-codin= g-system: utf-8-unix

Major mode: Outline

Minor modes in effec= t:
=C2=A0 goto-address-mode: t
=C2=A0 TeX-PDF-mode: t
=C2=A0 toolt= ip-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t<= br>=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-s= hadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: = t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
= =C2=A0 auto-compression-mode: t
=C2=A0 buffer-read-only: t
=C2=A0 lin= e-number-mode: t
=C2=A0 auto-fill-function: do-auto-fill
=C2=A0 trans= ient-mark-mode: t
=C2=A0 view-mode: t

--001a113fe84e88f40805232f076f-- From unknown Wed Jun 25 09:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21778: 24.5; python mode: fill-paragraph with raw docstring ignores python-fill-docstring-style Resent-From: charles@aurox.ch (Charles A. Roelli) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Aug 2017 09:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21778 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: John Palmieri Cc: 21778@debbugs.gnu.org Received: via spool by 21778-submit@debbugs.gnu.org id=B21778.150287458913726 (code B ref 21778); Wed, 16 Aug 2017 09:10:02 +0000 Received: (at 21778) by debbugs.gnu.org; 16 Aug 2017 09:09:49 +0000 Received: from localhost ([127.0.0.1]:40221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhuKi-0003ZK-L8 for submit@debbugs.gnu.org; Wed, 16 Aug 2017 05:09:48 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:34102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhuKf-0003Z1-SQ for 21778@debbugs.gnu.org; Wed, 16 Aug 2017 05:09:46 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id A58C2224FB for <21778@debbugs.gnu.org>; Wed, 16 Aug 2017 09:03:55 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= content-transfer-encoding:content-type:content-type:mime-version :references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1502874232; x=1503738233; bh=nofGZAV7FnqoD LsdNfobj/8/NIclElRpOn+ucIWpKJI=; b=lrCGBAS1dqg2FQzG19OhdzVO1GqAu leIHmM67P51bRasSl/1CAAJyWS4p13t6sIxhTAezANAKHFGgiYGJsshycLL0QVU7 U4JFFjpkZgh312XWg0RMvrcCwKBObCvzhyDxt20q6hSkRN8atKgehD1sRK8wsz/J oOnFASiyBHSDlw= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id WPaXe-55BTOA for <21778@debbugs.gnu.org>; Wed, 16 Aug 2017 09:03:52 +0000 (UTC) Received: from gray (125.85.192.178.dynamic.wline.res.cust.swisscom.ch [178.192.85.125]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 759D2224F4; Wed, 16 Aug 2017 09:03:52 +0000 (UTC) Date: Wed, 16 Aug 2017 11:09:23 +0200 Message-Id: From: charles@aurox.ch (Charles A. Roelli) In-reply-to: (message from John Palmieri on Wed, 28 Oct 2015 12:16:20 -0700) References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Looks like this was fixed with the following commit: commit deea36f0ece7b1b14afe2a833b6a0f66d59f4459 Author: Fabián Ezequiel Gallina Date: Sun Apr 5 23:58:13 2015 -0300 python.el: Enhance docstring detection following PEP-257. * lisp/progmodes/python.el (python-docstring-at-p): Remove function. (python-info-assignment-statement-p): New function. (python-info-assignment-continuation-line-p): Use it. (python-info-docstring-p): New function. (python-font-lock-syntactic-face-function) (python-fill-string): Use it. * test/automated/python-tests.el (python-info-assignment-statement-p-1) (python-info-assignment-statement-p-2) (python-info-assignment-statement-p-3, python-info-docstring-p-1) (python-info-docstring-p-2, python-info-docstring-p-3) (python-info-docstring-p-4, python-info-docstring-p-5) (python-info-docstring-p-6): New tests. which is present in Emacs 25. Does the fix work for you? > Resent-From: John Palmieri > Original-Sender: "Debbugs-submit" > Resent-CC: bug-gnu-emacs@gnu.org > Resent-Sender: help-debbugs@gnu.org > X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_40, > FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID > autolearn=disabled version=3.3.2 > Date: Wed, 28 Oct 2015 12:16:20 -0700 > From: John Palmieri > Content-Type: multipart/alternative; boundary=001a113fe84e88f40805232f076f > > > To recreate the bug, in Python mode, type > > def f(): > r""" > This is the docstring for my function. > > It's a raw docstring because I want to type \t here, and maybe \n, > for example in LaTeX code like \tau or \nu. > > More docstring here. > """ > pass > > Now with the cursor in the first sentence of the docstring, running > fill-paragraph ignores the setting of python-fill-docstring-style, I think > because Emacs doesn't detect that r""" is the start of the docstring. > Similarly, running fill-paragraph in the last sentence behaves badly. Also > similarly, I think that it should be valid to begin a docstring with b""" > or u""" (and possibly some combination of b, r, u, before """, although I'm > not sure), and these also don't behave correctly. > > > > In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) > of 2015-04-10 on builder10-9.porkrind.org > Windowing system distributor `Apple', version 10.3.1348 > Configured using: > `configure --with-ns '--enable-locallisppath=/Library/Application > Support/Emacs/${version}/site-lisp:/Library/Application > Support/Emacs/site-lisp'' > > Important settings: > value of $LANG: C > locale-coding-system: utf-8-unix > > Major mode: Outline > > Minor modes in effect: > goto-address-mode: t > TeX-PDF-mode: t > tooltip-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > buffer-read-only: t > line-number-mode: t > auto-fill-function: do-auto-fill > transient-mark-mode: t > view-mode: t From unknown Wed Jun 25 09:11:57 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: John Palmieri Subject: bug#21778: closed (Re: bug#21778: 24.5; python mode: fill-paragraph with raw docstring ignores python-fill-docstring-style) Message-ID: References: X-Gnu-PR-Message: they-closed 21778 X-Gnu-PR-Package: emacs Reply-To: 21778@debbugs.gnu.org Date: Wed, 16 Aug 2017 15:06:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1502895962-12570-1" This is a multi-part message in MIME format... ------------=_1502895962-12570-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #21778: 24.5; python mode: fill-paragraph with raw docstring ignores python= -fill-docstring-style which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 21778@debbugs.gnu.org. --=20 21778: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21778 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1502895962-12570-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 21778-done) by debbugs.gnu.org; 16 Aug 2017 15:05:39 +0000 Received: from localhost ([127.0.0.1]:41293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhzt4-0003GB-Ik for submit@debbugs.gnu.org; Wed, 16 Aug 2017 11:05:38 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:34538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhzt3-0003Fz-8Q for 21778-done@debbugs.gnu.org; Wed, 16 Aug 2017 11:05:37 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 782E9224F7 for <21778-done@debbugs.gnu.org>; Wed, 16 Aug 2017 14:59:45 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= content-transfer-encoding:content-type:content-type:mime-version :references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1502895583; x=1503759584; bh=TQyp/83cobAVK udUYm0+ELzoaswtITZWeokqPB/wtP4=; b=TN95tYFgwYGSew3kJaqiWuFzRLjbK IFuisNLEzx0zY3l2ic8ahp3aCz3oWZSZufmborzxuVJs6eb51sWGTCIuEh7IYUI6 ed4N804HkBOvDBCkGiaCoHPybBlo1pqz9kMslFP+UClstQeT5Y2DYeIoi2qj3JKt THzZlkX2ywKfpQ= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LnJgxOOKbvHZ for <21778-done@debbugs.gnu.org>; Wed, 16 Aug 2017 14:59:43 +0000 (UTC) Received: from gray (125.85.192.178.dynamic.wline.res.cust.swisscom.ch [178.192.85.125]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id EE601224D7; Wed, 16 Aug 2017 14:59:41 +0000 (UTC) Date: Wed, 16 Aug 2017 17:05:12 +0200 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: John Palmieri , 21778-done@debbugs.gnu.org In-reply-to: (message from John Palmieri on Wed, 16 Aug 2017 07:56:46 -0700) Subject: Re: bug#21778: 24.5; python mode: fill-paragraph with raw docstring ignores python-fill-docstring-style References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21778-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Thanks, closing the bug. > From: John Palmieri > Date: Wed, 16 Aug 2017 07:56:46 -0700 > > > Yes, thank you very much, it looks like the bug has been fixed in Emacs 25. > > On Wed, Aug 16, 2017 at 2:09 AM, Charles A. Roelli wrote: > > Looks like this was fixed with the following commit: > > commit deea36f0ece7b1b14afe2a833b6a0f66d59f4459 > Author: Fabián Ezequiel Gallina > Date: Sun Apr 5 23:58:13 2015 -0300 > > python.el: Enhance docstring detection following PEP-257. > > * lisp/progmodes/python.el (python-docstring-at-p): Remove function. > (python-info-assignment-statement-p): New function. > (python-info-assignment-continuation-line-p): Use it. > (python-info-docstring-p): New function. > (python-font-lock-syntactic-face-function) > (python-fill-string): Use it. > > * test/automated/python-tests.el (python-info-assignment-statement-p-1) > (python-info-assignment-statement-p-2) > (python-info-assignment-statement-p-3, python-info-docstring-p-1) > (python-info-docstring-p-2, python-info-docstring-p-3) > (python-info-docstring-p-4, python-info-docstring-p-5) > (python-info-docstring-p-6): New tests. > > which is present in Emacs 25. Does the fix work for you? > > > Resent-From: John Palmieri > > Original-Sender: "Debbugs-submit" > > Resent-CC: bug-gnu-emacs@gnu.org > > Resent-Sender: help-debbugs@gnu.org > > X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_40, > > FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID > > autolearn=disabled version=3.3.2 > > Date: Wed, 28 Oct 2015 12:16:20 -0700 > > From: John Palmieri > > Content-Type: multipart/alternative; boundary=001a113fe84e88f40805232f076f > > > > > > To recreate the bug, in Python mode, type > > > > def f(): > > r""" > > This is the docstring for my function. > > > > It's a raw docstring because I want to type \t here, and maybe \n, > > for example in LaTeX code like \tau or \nu. > > > > More docstring here. > > """ > > pass > > > > Now with the cursor in the first sentence of the docstring, running > > fill-paragraph ignores the setting of python-fill-docstring-style, I think > > because Emacs doesn't detect that r""" is the start of the docstring. > > Similarly, running fill-paragraph in the last sentence behaves badly. Also > > similarly, I think that it should be valid to begin a docstring with b""" > > or u""" (and possibly some combination of b, r, u, before """, although I'm > > not sure), and these also don't behave correctly. > > > > > > > > In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) > > of 2015-04-10 on builder10-9.porkrind.org > > Windowing system distributor `Apple', version 10.3.1348 > > Configured using: > > `configure --with-ns '--enable-locallisppath=/Library/Application > > Support/Emacs/${version}/site-lisp:/Library/Application > > Support/Emacs/site-lisp'' > > > > Important settings: > > value of $LANG: C > > locale-coding-system: utf-8-unix > > > > Major mode: Outline > > > > Minor modes in effect: > > goto-address-mode: t > > TeX-PDF-mode: t > > tooltip-mode: t > > electric-indent-mode: t > > mouse-wheel-mode: t > > tool-bar-mode: t > > menu-bar-mode: t > > file-name-shadow-mode: t > > global-font-lock-mode: t > > font-lock-mode: t > > auto-composition-mode: t > > auto-encryption-mode: t > > auto-compression-mode: t > > buffer-read-only: t > > line-number-mode: t > > auto-fill-function: do-auto-fill > > transient-mark-mode: t > > view-mode: t > > -- > John H. Palmieri > ------------=_1502895962-12570-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Oct 2015 19:43:38 +0000 Received: from localhost ([127.0.0.1]:42890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrWdF-0004DJ-IX for submit@debbugs.gnu.org; Wed, 28 Oct 2015 15:43:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43291) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrWCv-0003Ob-HY for submit@debbugs.gnu.org; Wed, 28 Oct 2015 15:16:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrWCu-0006bh-7W for submit@debbugs.gnu.org; Wed, 28 Oct 2015 15:16:25 -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.3 required=5.0 tests=BAYES_40, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrWCu-0006bd-4M for submit@debbugs.gnu.org; Wed, 28 Oct 2015 15:16:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrWCs-00008B-RB for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 15:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrWCr-0006aX-Bo for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 15:16:22 -0400 Received: from mail-io0-x231.google.com ([2607:f8b0:4001:c06::231]:33737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrWCr-0006aN-7f for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 15:16:21 -0400 Received: by iodd200 with SMTP id d200so21720365iod.0 for ; Wed, 28 Oct 2015 12:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=CWzo3o9YN2Ho9qW45+yCdxj08eA71oooedZer0STGcA=; b=zf9XqySq8pO0CZyDiapk+G+L4TAfoYOhp+sqcM0NNwQt3x5njEK2xqlj8ONW8QTmh/ Zvi/g/OeS84hS35DDXPZ+/MIScyzIOKdgFEEnCJaqDXmiDT3qDCp79CnnQf2RrYb7pAD oAXNIkYvimKTK+okAQ1O2EwnwMBO7fp8UwrNPzKNWEN/AZ7uWd/lVybvJpn+aasxL4YW v/KSYl83s7etTaIdfeyhD7avj/ksiB3TnAzek+Vc3tCk1rd17u0p5kP2kfNy+v7dRO38 fuQB57L+68SzTYBur5BZGIvz7F3swEKBDOTawqB8j0wPmSTJsBlBTWvUIbWD5lukItAh h7iw== MIME-Version: 1.0 X-Received: by 10.107.134.231 with SMTP id q100mr14791998ioi.85.1446059780394; Wed, 28 Oct 2015 12:16:20 -0700 (PDT) Received: by 10.107.9.134 with HTTP; Wed, 28 Oct 2015 12:16:20 -0700 (PDT) Date: Wed, 28 Oct 2015 12:16:20 -0700 Message-ID: Subject: 24.5; python mode: fill-paragraph with raw docstring ignores python-fill-docstring-style From: John Palmieri To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=001a113fe84e88f40805232f076f X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 28 Oct 2015 15:43:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --001a113fe84e88f40805232f076f Content-Type: text/plain; charset=UTF-8 To recreate the bug, in Python mode, type def f(): r""" This is the docstring for my function. It's a raw docstring because I want to type \t here, and maybe \n, for example in LaTeX code like \tau or \nu. More docstring here. """ pass Now with the cursor in the first sentence of the docstring, running fill-paragraph ignores the setting of python-fill-docstring-style, I think because Emacs doesn't detect that r""" is the start of the docstring. Similarly, running fill-paragraph in the last sentence behaves badly. Also similarly, I think that it should be valid to begin a docstring with b""" or u""" (and possibly some combination of b, r, u, before """, although I'm not sure), and these also don't behave correctly. In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org Windowing system distributor `Apple', version 10.3.1348 Configured using: `configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp'' Important settings: value of $LANG: C locale-coding-system: utf-8-unix Major mode: Outline Minor modes in effect: goto-address-mode: t TeX-PDF-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t auto-fill-function: do-auto-fill transient-mark-mode: t view-mode: t --001a113fe84e88f40805232f076f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
To recreate the bug, in Python mode, type

def = f():
=C2=A0=C2=A0=C2=A0 r"""
=C2=A0=C2=A0=C2=A0 This i= s the docstring for my function.

=C2=A0=C2=A0=C2=A0 It's a raw d= ocstring because I want to type \t here, and maybe \n,
=C2=A0=C2=A0=C2= =A0 for example in LaTeX code like \tau or \nu.

=C2=A0=C2=A0=C2=A0 M= ore docstring here.
=C2=A0=C2=A0=C2=A0 """
=C2=A0=C2= =A0=C2=A0 pass

Now with the cursor in the first sentence of the docs= tring, running fill-paragraph ignores the setting of python-fill-docstring-= style, I think because Emacs doesn't detect that r""" is= the start of the=C2=A0 docstring. Similarly, running fill-paragraph in the= last sentence behaves badly. Also similarly, I think that it should be val= id to begin a docstring with b""" or u""" (an= d possibly some combination of b, r, u, before """, although= I'm not sure), and these also don't behave correctly.


<= br>In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)=
=C2=A0of 2015-04-10 on buil= der10-9.porkrind.org
Windowing system distributor `Apple', versi= on 10.3.1348
Configured using:
=C2=A0`configure --with-ns '--enab= le-locallisppath=3D/Library/Application
=C2=A0Support/Emacs/${version}/s= ite-lisp:/Library/Application
=C2=A0Support/Emacs/site-lisp''
Important settings:
=C2=A0 value of $LANG: C
=C2=A0 locale-codin= g-system: utf-8-unix

Major mode: Outline

Minor modes in effec= t:
=C2=A0 goto-address-mode: t
=C2=A0 TeX-PDF-mode: t
=C2=A0 toolt= ip-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t<= br>=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-s= hadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: = t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
= =C2=A0 auto-compression-mode: t
=C2=A0 buffer-read-only: t
=C2=A0 lin= e-number-mode: t
=C2=A0 auto-fill-function: do-auto-fill
=C2=A0 trans= ient-mark-mode: t
=C2=A0 view-mode: t

--001a113fe84e88f40805232f076f-- ------------=_1502895962-12570-1--