From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.bugs Subject: bug#21778: 24.5; python mode: fill-paragraph with raw docstring ignores python-fill-docstring-style Date: Wed, 16 Aug 2017 11:09:23 +0200 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1502874620 20427 195.159.176.226 (16 Aug 2017 09:10:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 16 Aug 2017 09:10:20 +0000 (UTC) Cc: 21778@debbugs.gnu.org To: John Palmieri Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 16 11:10:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhuL5-0004ki-UG for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Aug 2017 11:10:12 +0200 Original-Received: from localhost ([::1]:60975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhuLA-00072i-KN for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Aug 2017 05:10:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhuL2-0006x3-6W for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2017 05:10:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhuKw-0002UT-Bw for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2017 05:10:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59773) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dhuKw-0002UO-6v for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2017 05:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dhuKw-0003Zp-1n for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2017 05:10:02 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 21778-submit@debbugs.gnu.org id=B21778.150287458913726 (code B ref 21778); Wed, 16 Aug 2017 09:10:02 +0000 Original-Received: (at 21778) by debbugs.gnu.org; 16 Aug 2017 09:09:49 +0000 Original-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 Original-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 Original-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 Original-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) Original-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) In-reply-to: (message from John Palmieri on Wed, 28 Oct 2015 12:16:20 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135803 Archived-At: 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