GNU bug report logs -
#21778
24.5; python mode: fill-paragraph with raw docstring ignores python-fill-docstring-style
Previous Next
Reported by: John Palmieri <jhpalmieri64 <at> gmail.com>
Date: Wed, 28 Oct 2015 19:44:01 UTC
Severity: normal
Found in version 24.5
Done: charles <at> aurox.ch (Charles A. Roelli)
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21778 in the body.
You can then email your comments to 21778 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21778
; Package
emacs
.
(Wed, 28 Oct 2015 19:44:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
John Palmieri <jhpalmieri64 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 28 Oct 2015 19:44:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21778
; Package
emacs
.
(Wed, 16 Aug 2017 09:10:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 21778 <at> debbugs.gnu.org (full text, mbox):
Looks like this was fixed with the following commit:
commit deea36f0ece7b1b14afe2a833b6a0f66d59f4459
Author: Fabián Ezequiel Gallina <fgallina <at> gnu.org>
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 <jhpalmieri64 <at> gmail.com>
> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
> Resent-CC: bug-gnu-emacs <at> gnu.org
> Resent-Sender: help-debbugs <at> 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 <jhpalmieri64 <at> gmail.com>
> 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
Reply sent
to
charles <at> aurox.ch (Charles A. Roelli)
:
You have taken responsibility.
(Wed, 16 Aug 2017 15:06:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
John Palmieri <jhpalmieri64 <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 16 Aug 2017 15:06:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 21778-done <at> debbugs.gnu.org (full text, mbox):
Thanks, closing the bug.
> From: John Palmieri <jhpalmieri64 <at> gmail.com>
> 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 <charles <at> aurox.ch> wrote:
>
> Looks like this was fixed with the following commit:
>
> commit deea36f0ece7b1b14afe2a833b6a0f66d59f4459
> Author: Fabián Ezequiel Gallina <fgallina <at> gnu.org>
> 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 <jhpalmieri64 <at> gmail.com>
> > Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
> > Resent-CC: bug-gnu-emacs <at> gnu.org
> > Resent-Sender: help-debbugs <at> 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 <jhpalmieri64 <at> gmail.com>
> > 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
>
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 14 Sep 2017 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 285 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.