From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Holger Schmidt Newsgroups: gmane.emacs.bugs Subject: bug#21254: 24.5; python.el: Docstring fill-paragraph not working with style pep-257-nn Date: Thu, 13 Aug 2015 13:52:20 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1439480934 15882 80.91.229.3 (13 Aug 2015 15:48:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Aug 2015 15:48:54 +0000 (UTC) To: 21254@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 13 17:48:41 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZPukA-0001qE-7f for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Aug 2015 17:48:38 +0200 Original-Received: from localhost ([::1]:43141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPuk9-00008F-NH for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Aug 2015 11:48:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPujg-0007uU-Ow for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 11:48:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPujb-000838-MD for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 11:48:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPujb-000834-Id for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 11:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZPujb-0000Ai-Cr for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 11:48:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Holger Schmidt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Aug 2015 15:48:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21254 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.1439480841524 (code B ref -1); Thu, 13 Aug 2015 15:48:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Aug 2015 15:47:21 +0000 Original-Received: from localhost ([127.0.0.1]:55167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZPuiu-00008L-7t for submit@debbugs.gnu.org; Thu, 13 Aug 2015 11:47:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46969) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZPr3l-0001eG-Bx for submit@debbugs.gnu.org; Thu, 13 Aug 2015 07:52:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPr3j-0000hj-Qc for submit@debbugs.gnu.org; Thu, 13 Aug 2015 07:52:37 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPr3j-0000hZ-OG for submit@debbugs.gnu.org; Thu, 13 Aug 2015 07:52:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPr3i-0008EX-5B for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 07:52:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPr3e-0000Xi-1O for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 07:52:34 -0400 Original-Received: from mxout34.expurgate.net ([91.198.224.34]:50048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPr3d-0000UC-O7 for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 07:52:29 -0400 Original-Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.80.1) (envelope-from ) id 1ZPr3Z-0008KW-0Q for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 13:52:25 +0200 Original-Received: from [194.15.148.6] (helo=mail.zmdi.com) by relay.expurgate.net with esmtp (Exim 4.80.1) (envelope-from ) id 1ZPr3Y-0006c7-I9 for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 13:52:24 +0200 Original-Received: from mail.zmdi.com (localhost [127.0.0.1]) by mail.zmdi.com (Postfix) with ESMTP id 4D1CAFF127 for ; Thu, 13 Aug 2015 13:52:24 +0200 (CEST) X-SafeGuard_MailGateway: Version: 6.00.4.16011.i686 SGMG Date: 20150813115224Z X-purgate-relay-fid: relay-9b77e0 X-purgate-sourceid: 1ZPr3Y-0006c7-I9 X-purgate-Ad: Checked for spam and viruses by eXpurgate(R), see www.eleven.de for details. X-purgate-ID: 151534::1439466744-0000070C-0AA15CC1/0/0 X-purgate: clean X-purgate-type: clean X-purgate-relay-bid: relay-1e7d0f X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Thu, 13 Aug 2015 11:47:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105454 Archived-At: I write a docstring of a class method in a buffer with Python mode. python-fill-docstring-style is set to 'pep-257-nn. The cursor is at the end of the docstring after the three quotes. fill-paragraph does nothing, but it should format the docstring. I move the cursor inside the docstring. fill-paragraph formats the docstring with four errors: There is no newline after the first sentence, the first line is longer (72) than fill-column (70), the second line and following lines are not indented (but start at column 0), there is no newline at the end. A second fill-paragraph adds the missing newline at the end. Example (the docstring is one long line): class MyClass(object): def __init__(self): """Class initialization. According to PEP 257 there should be a newline after the first sentence. Following sentences are indented by 8 spaces in this case. With python-fill-docstring-style set to 'pep-257-nn there should be a newline at the end.""" pass This should be formatted like this: class MyClass(object): def __init__(self): """Class initialization. According to PEP 257 there should be a newline after the first sentence. Following sentences are indented by 8 spaces in this case. With python-fill-docstring-style set to 'pep-257-nn there should be a newline at the end. """ pass But the result is this (fill-paragraph (M-q) inside docstring): class MyClass(object): def __init__(self): """Class initialization. According to PEP 257 there should be a newline after the first sentence. Following sentences are indented by 8 spaces in this case. With python-fill-docstring-style set to 'pep-257-nn there should be a newline at the end.""" pass In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4) of 2015-08-13 on l53 Windowing system distributor `The X.Org Foundation', version 11.0.70101000 System Description: CentOS release 5.11 (Final) Configured using: `configure --prefix=/local/emacs-24.5' Important settings: value of $LC_ALL: en_US.UTF-8 value of $LANG: C value of $XMODIFIERS: @im=none locale-coding-system: utf-8-unix Major mode: Python Minor modes in effect: flyspell-mode: t show-paren-mode: t fci-mode: t flymake-mode: t tabbar-mwheel-mode: t tabbar-mode: t which-function-mode: t global-auto-revert-mode: t delete-selection-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-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 column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Starting new Ispell process /usr/bin/aspell with default dictionary... 9: E901 TokenError: EOF in multi-line string [5 times] Mark set Auto-saving... 9: E901 TokenError: EOF in multi-line string [9 times] End of buffer Saving file /home/schmidth/abc.py... Wrote /home/schmidth/abc.py 80: E501 line too long (260 > 79 characters) [3 times] Undo! [2 times] Load-path shadows: /home/schmidth/main/trunk/emacs/site-lisp/css-mode hides /local/emacs-24.5/share/emacs/24.5/lisp/textmodes/css-mode /home/schmidth/main/trunk/emacs/site-lisp/verilog-mode hides /local/emacs-24.5/share/emacs/24.5/lisp/progmodes/verilog-mode /home/schmidth/main/trunk/emacs/site-lisp/flymake hides /local/emacs-24.5/share/emacs/24.5/lisp/progmodes/flymake Features: (shadow sort mail-extr emacsbug message format-spec rfc822 mailabbrev gmm-utils mailheader sendmail add-log vc-dispatcher vc-svn flyspell ispell python json disp-table paren cus-start cus-load fill-column-indicator edmacro kmacro flymake compile comint ansi-color mediawiki derived url-cache cl-macs cl gv ring mm-url gnus gnus-ems nnheader mail-utils wid-edit mml easymenu mml-sec mm-decode mm-bodies mm-encode url-http tls url url-proxy url-privacy url-expand url-methods url-history mailcap url-auth mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-cookie url-domsuf url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cl-extra cl-loaddefs cl-lib cconv eieio-core gnus-util mm-util help-fns mail-prsvr password-cache url-gw url-vars tabbar easy-mmode redo+ which-func imenu autorevert filenotify delsel xemacs-theme time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 156269 7595) (symbols 48 25223 0) (miscs 40 340 817) (strings 32 29661 3447) (string-bytes 1 881207) (vectors 16 15256) (vector-slots 8 452487 8536) (floats 8 105 248) (intervals 56 377 31) (buffers 960 14) (heap 1024 423219 13302))