From unknown Sat Jun 14 03:54:05 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#36056 <36056@debbugs.gnu.org> To: bug#36056 <36056@debbugs.gnu.org> Subject: Status: 26.2; Python Documentation String Indent In Auto Fill Mode Reply-To: bug#36056 <36056@debbugs.gnu.org> Date: Sat, 14 Jun 2025 10:54:05 +0000 retitle 36056 26.2; Python Documentation String Indent In Auto Fill Mode reassign 36056 emacs submitter 36056 ricercar severity 36056 normal tag 36056 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 10:54:28 2019 Received: (at submit) by debbugs.gnu.org; 2 Jun 2019 14:54:28 +0000 Received: from localhost ([127.0.0.1]:40606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXRsP-0001N9-33 for submit@debbugs.gnu.org; Sun, 02 Jun 2019 10:54:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXMU2-0007TG-AC for submit@debbugs.gnu.org; Sun, 02 Jun 2019 05:08:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:52301) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hXMTx-00048d-7W for submit@debbugs.gnu.org; Sun, 02 Jun 2019 05:08:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXMTv-0002cO-CE for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2019 05:08:49 -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,FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXMNS-0007aT-7D for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2019 05:02:07 -0400 Received: from smtprelay0173.b.hostedemail.com ([64.98.42.173]:49279 helo=smtprelay.b.hostedemail.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hXMNS-0007Zx-1D for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2019 05:02:06 -0400 Received: from filter.hostedemail.com (10.5.19.248.rfc1918.com [10.5.19.248]) by smtprelay02.b.hostedemail.com (Postfix) with ESMTP id 17243D3812 for ; Sun, 2 Jun 2019 09:02:05 +0000 (UTC) X-Session-Marker: 7269636572636172 X-HE-Tag: truck65_12120db1e704b X-Filterd-Recvd-Size: 10564 Received: from [192.168.1.77] (236.179.100.84.rev.sfr.net [84.100.179.236]) (Authenticated sender: ricercar) by omf16.b.hostedemail.com (Postfix) with ESMTPA for ; Sun, 2 Jun 2019 09:02:03 +0000 (UTC) To: bug-gnu-emacs@gnu.org Subject: 26.2; Python Documentation String Indent In Auto Fill Mode From: ricercar Message-ID: <7310965c-3f16-a013-ed9d-736ad7b8b8be@lycos.com> Date: Sun, 2 Jun 2019 11:01:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------4668EA5A7271E4881EDC4B2A" Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 64.98.42.173 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 02 Jun 2019 10:54:24 -0400 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 (--) This is a multi-part message in MIME format. --------------4668EA5A7271E4881EDC4B2A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit There is some peculiar behavior when using auto-fill-mode editing Python code. For example if I start typing the following: def some_function(keyword_argument0, keyword_argument1, keyword_argument2='foobar'): """ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. and press Enter, it will look like this: def some_function(keyword_argument0, keyword_argument1, keyword_argument2='foobar'): """ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. That is, the subsequent lines of the documentation string are indented as to match the indentation of the second line of the list of keyword arguments, rather than four columns as I would expect. In GNU Emacs 26.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-04-12 built on lgw01-amd64-060 Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 18.04.2 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. delete-backward-char: Text is read-only Configured using: 'configure --build=x86_64-linux-gnu --prefix=/usr '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib --program-suffix=26 --with-modules --with-file-notification=inotify --with-mailutils --with-x=yes --with-x-toolkit=gtk3 --with-xwidgets --with-lcms2 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs26-CYbeHB/emacs26-26.2~1.gitfd1b34b=. -fstack-protector-strong -Wformat -Werror=format-security -no-pie' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -no-pie'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-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 blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded 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 threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 95625 6893) (symbols 48 20412 1) (miscs 40 45 104) (strings 32 28489 1240) (string-bytes 1 747836) (vectors 16 14756) (vector-slots 8 507538 7294) (floats 8 49 68) (intervals 56 256 0) (buffers 992 11)) --------------4668EA5A7271E4881EDC4B2A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
There is some peculiar behavior when using auto-fill-mode editing Python
code. For example if I start typing the following:

def some_function(keyword_argument0, keyword_argument1,
                  keyword_argument2='foobar'):
    """
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.


and press Enter, it will look like this:

def some_function(keyword_argument0, keyword_argument1,
                  keyword_argument2='foobar'):
    """
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
                  eiusmod tempor incididunt ut labore et dolore magna
                  aliqua.

That is, the subsequent lines of the documentation string are indented
as to match the indentation of the second line of the list of keyword
arguments, rather than four columns as I would expect.


In GNU Emacs 26.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-04-12 built on lgw01-amd64-060
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description:	Ubuntu 18.04.2 LTS

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
delete-backward-char: Text is read-only

Configured using:
 'configure --build=x86_64-linux-gnu --prefix=/usr
 '--includedir=${prefix}/include' '--mandir=${prefix}/share/man'
 '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var
 --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu'
 '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode
 --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib
 --program-suffix=26 --with-modules --with-file-notification=inotify
 --with-mailutils --with-x=yes --with-x-toolkit=gtk3 --with-xwidgets
 --with-lcms2 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs26-CYbeHB/emacs26-26.2~1.gitfd1b34b=. -fstack-protector-strong
 -Wformat -Werror=format-security -no-pie' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro
 -no-pie''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded 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 threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
xwidget-internal move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 95625 6893)
 (symbols 48 20412 1)
 (miscs 40 45 104)
 (strings 32 28489 1240)
 (string-bytes 1 747836)
 (vectors 16 14756)
 (vector-slots 8 507538 7294)
 (floats 8 49 68)
 (intervals 56 256 0)
 (buffers 992 11))

--------------4668EA5A7271E4881EDC4B2A-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 20:58:01 2019 Received: (at 36056) by debbugs.gnu.org; 3 Jun 2019 00:58:01 +0000 Received: from localhost ([127.0.0.1]:41196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXbIW-0006Sl-U3 for submit@debbugs.gnu.org; Sun, 02 Jun 2019 20:58:01 -0400 Received: from mail-ed1-f43.google.com ([209.85.208.43]:38297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXbIV-0006Sa-Ao for 36056@debbugs.gnu.org; Sun, 02 Jun 2019 20:57:59 -0400 Received: by mail-ed1-f43.google.com with SMTP id g13so24410707edu.5 for <36056@debbugs.gnu.org>; Sun, 02 Jun 2019 17:57:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=MTfbVPKNNxw7dl0i/6oYJOzfjaSO/AdF7G/vQ9rNYlY=; b=Hay34zoMT56gFlzXlAmPzZe94EyAHbNasu79rWCT2PgoAUUSZvKNSyiT6rJTur/ZE7 vRd4gZTS0+JrEDvd4GfJPyrgSVyncA8/c15dWjoz6FehzziGd/lcF1m/bqoVE1eQP0Qe Zas4Ocp7GexggagmffbYYyS9emtQoBzA3spD84jNNdrMCjbTid+IN5CjTfHFhw1ShR/I QeamVTUcR/9ojidbufvU6Qyv+32wSsq/BAiLBewChFJkgC46Z3NAd0SXu5AhOdBvLN28 VMkbvI3saIxQVHo/iYnXMyk43uLgPL6NwouT5WhDkGvaTS7H+DOYdCrlfxvdz9ppqiJ8 MBYw== 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=MTfbVPKNNxw7dl0i/6oYJOzfjaSO/AdF7G/vQ9rNYlY=; b=JcdVQQ9/TX0Rz6UQd/7EYCAQfnC/bHT07ywnwD3arbPKkffMwzPxPmCdGNTLHqCocU GCb0mT4iLV/Kfe9J2kzWCjvzgNX1pE4s7fSC5tWpWxkXQqPRqRDKdtNYdx6H4keyz8na YoK4WwUgLLtBQ+PjPKAzviVZBPriRwsIYx/Ai3mNEJ4uDounfjVP1Q7izv1HDOdYDoxb uLXS7puUwmDpCaoYDRPbVYcfFbufQH6rvRGtok8ObDsSEnb3E5Wavzk10eWOSMDw7TU+ wInJuhbenWZa/f4+oP3SyUEVlQw+hmiqFXdCimDfFLJ2YUj0Zer0cFB3Dvbb8Eu1WcUJ jjaQ== X-Gm-Message-State: APjAAAWocwdfEl9T4P52gOeFtuAbQVSUB+19Q8puyfQuncKsiVqPQD6W YY/W7wOy7EjDuhEdUmykwojVzg== X-Google-Smtp-Source: APXvYqxQdAOAJCZDL4OJIBJKRcsPMFdInNX+BeVw92TO9UXnCLQWsm4o7r4Hm1W4UdzeTjpU39jpGA== X-Received: by 2002:a05:6402:1543:: with SMTP id p3mr26010918edx.108.1559523473166; Sun, 02 Jun 2019 17:57:53 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:8cad:ae29:555d:852d]) by smtp.gmail.com with ESMTPSA id j27sm2337919eja.91.2019.06.02.17.57.52 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 02 Jun 2019 17:57:52 -0700 (PDT) From: "Basil L. Contovounesios" To: ricercar Subject: Re: bug#36056: 26.2; Python Documentation String Indent In Auto Fill Mode References: <7310965c-3f16-a013-ed9d-736ad7b8b8be@lycos.com> Date: Mon, 03 Jun 2019 01:57:45 +0100 In-Reply-To: <7310965c-3f16-a013-ed9d-736ad7b8b8be@lycos.com> (ricercar's message of "Sun, 2 Jun 2019 11:01:49 +0200") Message-ID: <87h897scxi.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36056 Cc: 36056@debbugs.gnu.org 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: -1.0 (-) ricercar writes: > There is some peculiar behavior when using auto-fill-mode editing Python > code. For example if I start typing the following: > > def some_function(keyword_argument0, keyword_argument1, > keyword_argument2='foobar'): > """ > Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. > > > and press Enter, it will look like this: > > def some_function(keyword_argument0, keyword_argument1, > keyword_argument2='foobar'): > """ > Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do > eiusmod tempor incididunt ut labore et dolore magna > aliqua. > > That is, the subsequent lines of the documentation string are indented > as to match the indentation of the second line of the list of keyword > arguments, rather than four columns as I would expect. I'm not familiar with this part of Emacs or python.el, and I don't know what else this may break, but from stepping through do-auto-fill I discovered the following setting gives the desired auto-fill behaviour: (add-hook 'python-mode-hook (lambda () (setq-local fill-indent-according-to-mode t))) HTH, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 19:32:01 2019 Received: (at 36056) by debbugs.gnu.org; 22 Jun 2019 23:32:01 +0000 Received: from localhost ([127.0.0.1]:52695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hepUH-0002RM-8R for submit@debbugs.gnu.org; Sat, 22 Jun 2019 19:32:01 -0400 Received: from mail-io1-f42.google.com ([209.85.166.42]:37337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hepUB-0002Qq-9H; Sat, 22 Jun 2019 19:31:55 -0400 Received: by mail-io1-f42.google.com with SMTP id e5so106960iok.4; Sat, 22 Jun 2019 16:31:55 -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=hPBe0cAffM4oCY9tNOZ73H0mI17zqqVx2cn3z1wxGDM=; b=Pmnve1EryQYnW/7gXO2hZ3ZrytK9pnN/UZuke9GtrW8p5DsQqVAxxGXzut70p71kjd ixUlG2eo17bS8mHFI2Dx7qR1297EWF28jjRNbVgEbE3/ekd1oqCoBp2kPAUdM8OaxScZ HLS9ETnccxLPlTPv7DW9m8bxEx/kPW/TA8mvJa5EIp9DoZ5BnmZuPwOPhC//6yb73+d6 aNVALiHQivBVvDiuwHJqEmqeU8N01U95ddlxq2OVFc7Mh88Ivh4JzllMHgMur1lddszN 84GJFn44vzD3B15MHKDazfhObllS9Uo9TwKTu+1aEp2IFPyX4W0G49bzP0FpcDL+L7bA i5qw== 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=hPBe0cAffM4oCY9tNOZ73H0mI17zqqVx2cn3z1wxGDM=; b=bf3LmyRJiyXyNbYR896RDmCzal65wNTzqYxoNrYmx6/Ff/KqtRrRwE22pGp5jS4tUv SrajkBtb1Wf8Cmi/cFia3akTTwkVvDRk9UJHirOmUOGnGhqPn+CTYByiVD0umkWE5uEH nmKvOvzcnl8iWywPYDPezMbVmISM1crDgPnC8Nbl9EikSaqPKUBO1Tf7I6bcfW4L59OA W/d0x1Gw3W8ckTbzQDRl0WEFvoD50R+Yc/b2JYr7iaXNCTT4AmpQlLaXm5jN7UlBmrGt NNVUvcMChcDDac9Dqch227xHLGB9Uj/7TUD4c5T0tps5/4tZhoQPB9yRUvSa4nqHPov3 GZDg== X-Gm-Message-State: APjAAAUEH1JU2rJwjZhaBc/JKjx6iwZbtPO8PYCaFBs6CW+LDp1ZW/pW vDCiXPSOWm4MLbgC0sCqElZ6qblJ X-Google-Smtp-Source: APXvYqzwshC8lz5teru0AzPf3FsgUAT24hQbD1hQjguUV8FFay6n4JAmvXSVojkHoGl+EjwyqeV1Pw== X-Received: by 2002:a02:b050:: with SMTP id q16mr16173807jah.120.1561246309713; Sat, 22 Jun 2019 16:31:49 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id a15sm5382522ioc.27.2019.06.22.16.31.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Jun 2019 16:31:49 -0700 (PDT) From: Noam Postavsky To: "Basil L. Contovounesios" Subject: Re: bug#36056: 26.2; Python Documentation String Indent In Auto Fill Mode References: <7310965c-3f16-a013-ed9d-736ad7b8b8be@lycos.com> <87h897scxi.fsf@tcd.ie> Date: Sat, 22 Jun 2019 19:31:48 -0400 In-Reply-To: <87h897scxi.fsf@tcd.ie> (Basil L. Contovounesios's message of "Mon, 03 Jun 2019 01:57:45 +0100") Message-ID: <87sgs1tcwr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36056 Cc: ricercar , 36056@debbugs.gnu.org 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: -1.0 (-) tags 36056 fixed close 36056 27.1 quit "Basil L. Contovounesios" writes: > I'm not familiar with this part of Emacs or python.el, and I don't know > what else this may break, but from stepping through do-auto-fill I > discovered the following setting gives the desired auto-fill behaviour: > > (add-hook 'python-mode-hook > (lambda () > (setq-local fill-indent-according-to-mode t))) Seems like fill-indent-according-to-mode isn't consulted for anything else, so I've pushed a fix to master which sets this locally in python-mode. The comment on fill-indent-according-to-mode says it can break cc-mode filling "tricks", but hopefully python-mode won't have any similar problems. 0f01a58c39 2019-06-22T19:25:44-04:00 "Fix python docstring auto-fill (Bug#36056)" https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0f01a58c390faf30c33b369fc81b2a14ec5b7f2e From unknown Sat Jun 14 03:54:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 21 Jul 2019 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 07 17:25:42 2019 Received: (at control) by debbugs.gnu.org; 7 Sep 2019 21:25:43 +0000 Received: from localhost ([127.0.0.1]:38166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6iDG-0003n0-Kg for submit@debbugs.gnu.org; Sat, 07 Sep 2019 17:25:42 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:60103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6iDE-0003mi-3H for control@debbugs.gnu.org; Sat, 07 Sep 2019 17:25:40 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 48FC62F3 for ; Sat, 7 Sep 2019 17:25:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 07 Sep 2019 17:25:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net; h=from:to:subject:date:message-id:mime-version:content-type; s= fm1; bh=5GRlWWWax9qpt+52YbCsad2PeWWdunZs9IktVrilKH0=; b=MjA8nUCp NilLq6pDDKbAVr9kcGXnIVQYkNNLwqVWH9l5umc2o2KtVk/IWllz1Mn0uKWbes8r plIu+xLVbG9OHADdytglfvoum87pBlKY0vgKxwbZoozeZSoyGXT0gRU+dhAKtOlf plolkWAWLgSjGBF0HwZh1z4VSASf+pZm1KHpRMbdluFxZDQZwl4EtaP7OyRHqaHG ttR+QjRqLFBrMjnfZLBs0ZX9P1FrZkRfwZ1sMCMHLGVVsTdi2xSKNg7UwJrvl1XN WhIJ37qW1XUl/9m5AeQd6IKK1CZ47Ryii8XjwBap03pu1N+P3bM6HKb9bl0zsO/P ECt0fuNkusytCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=5GRlWWWax9qpt+52YbCsad2PeWWdu nZs9IktVrilKH0=; b=svu2scMgxhutyPVRob8YD8YdhbdJ2gQfl+Ez+6kJCZ3H0 POkIdR3xEbhzQKSBJ8Crrpg5AL1ZOnA7K7234YyIEdPMZL4z18J22BgRIM4QSO0x yKv/4HfEMC8aDBk910cE/r+u2RwW0J+Bsu5pmC82iXrj9yWZxzup/Rz6OR5Z2Jw/ YbB0cGjBhXrsXaO4EEUeOLoVnBjUmDGmPQLfatibNyEXr++y2i5MjqnlB9HL0JiU l65Q5F24iJXg4WUvMnCYdDAIsYH38I6lb6FQY9XLkRmfESV0KfjRPDwNvURox1LN MY7tdmwuQ5An3lDoKtxlUgy/4+Hzylj+RIBoy0sIQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudekuddgudeitdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfgfhvffufffkgggtsehttdertd dtredtnecuhfhrohhmpeffihhmrgcumfhoghgrnhcuoeguihhmrgesshgvtghrvghtshgr uhgtvgdrnhgvtheqnecukfhppedutdejrddvuddtrddvudefrddvgeefnecurfgrrhgrmh epmhgrihhlfhhrohhmpeguihhmrgesshgvtghrvghtshgruhgtvgdrnhgvthenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from scrawny (107-210-213-243.lightspeed.irvnca.sbcglobal.net [107.210.213.243]) by mail.messagingengine.com (Postfix) with ESMTPA id 8D654D6005A for ; Sat, 7 Sep 2019 17:25:33 -0400 (EDT) Received: from dima by scrawny with local (Exim 4.92) (envelope-from ) id 1i6iD6-000397-Hd for control@debbugs.gnu.org; Sat, 07 Sep 2019 14:25:32 -0700 User-agent: mu4e 1.2.0; emacs 27.0.50 From: Dima Kogan To: control@debbugs.gnu.org Subject: unarchive 36056 Date: Sat, 07 Sep 2019 14:25:32 -0700 Message-ID: <87a7bfztmb.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control 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: -1.7 (-) unarchive 36056 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 07 17:26:16 2019 Received: (at 36056) by debbugs.gnu.org; 7 Sep 2019 21:26:16 +0000 Received: from localhost ([127.0.0.1]:38173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6iDn-0003oj-Ty for submit@debbugs.gnu.org; Sat, 07 Sep 2019 17:26:16 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:40441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6iDm-0003oT-50 for 36056@debbugs.gnu.org; Sat, 07 Sep 2019 17:26:14 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id A156E531 for <36056@debbugs.gnu.org>; Sat, 7 Sep 2019 17:26:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 07 Sep 2019 17:26:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net; h=from:to:subject:date:message-id:mime-version:content-type; s= fm1; bh=MW/FSelHZQb8o6/X/3HV2x+SeA/Y9zNggvaOJgOUJG0=; b=UNmWlbAI sz9SZ9CcxFun+pT+EVddSNBiLirks1/qyJXxuLnMPny9mscKHs87YNZ5oZhcZs9Q DMwHhdtmHskvOuurhBWZoqoUl53rzDftSFdd7vlEy+fBVaY2FSYsvqf8d9e8LCGs prYFJUkrUw1hoqAgDKf/QZKxIlnBXEawxnuWF6w05rApdQt/COfHWCbyJLgLjrlC 0p2lYagr9oIT5Oo0HsSM34dByNF7RHwGyZw+qzFG1T9FZj/cB5K2msBdJV8ptCMg tyoVNYIEc3dbiF/MCPxcDRbWZXC6n1WFdxJe2BY2KmuEaEN0vVaUApjI0b5enfwQ 9Olnz1ckrWlLCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=MW/FSelHZQb8o6/X/3HV2x+SeA/Y9 zNggvaOJgOUJG0=; b=dFJnkJSZtEnQuQ2ARYtShhb9qUSOMnzsdurvwdbbdR8BU CmDM8kHqVrdZDhtgvVqsXrlJcUlWypCY4fVaG0mb8y4nhCuu1j2kCh9v4laWPULT 1fhEE0cfruis26nZBeMYPoL95px2r4vNIgWZ/I4NCm+uDofadaZrRHu38SC49Nbu i/UM8/kCfP6BE2UABS4LDfIKObA/USrCArvJ5WghLH6CTFvsXgUmOIxXXf9x6ZZ7 bZX51sIaGz3FEPbNfVk3cY7LgOLfM5N38cq4ehGjaZxZuyaOvr3IVk0Q4aijGCy9 t3W4drSMV/NJRutLLtyvcAi79xFFXwn6pt2YS7BKA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudekuddgudeiudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfgfhvffufffkgggtsehttdertd dtredtnecuhfhrohhmpeffihhmrgcumfhoghgrnhcuoeguihhmrgesshgvtghrvghtshgr uhgtvgdrnhgvtheqnecukfhppedutdejrddvuddtrddvudefrddvgeefnecurfgrrhgrmh epmhgrihhlfhhrohhmpeguihhmrgesshgvtghrvghtshgruhgtvgdrnhgvthenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from scrawny (107-210-213-243.lightspeed.irvnca.sbcglobal.net [107.210.213.243]) by mail.messagingengine.com (Postfix) with ESMTPA id F03F1D6005A for <36056@debbugs.gnu.org>; Sat, 7 Sep 2019 17:26:07 -0400 (EDT) Received: from dima by scrawny with local (Exim 4.92) (envelope-from ) id 1i6iDf-0003B3-4w for 36056@debbugs.gnu.org; Sat, 07 Sep 2019 14:26:07 -0700 User-agent: mu4e 1.2.0; emacs 27.0.50 From: Dima Kogan To: 36056@debbugs.gnu.org Subject: Regression? Date: Sat, 07 Sep 2019 14:26:07 -0700 Message-ID: <878sqzztlc.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36056 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: -1.7 (-) Hi. I was seeing unexpected filling behavior, and a bisection pointed to this commit. I don't know if this is a "regression", but I'd like to get the old behavior back. Let's say I had a python buffer with this: r'''aaa this is a test this is a test this is a test this is a test this is a test this is a test ''' And let's say the point is at the end of the long line. Prior to the fix to this bug if I hit M-q I'd get this: r'''aaa this is a test this is a test this is a test this is a test this is a test this is a test ''' This is what I'd expect. After the fix (i.e. if fill-indent-according-to-mode is t) I get this: r'''aaa this is a test this is a test this is a test this is a test this is a test this is a test ''' For some reason it now wants to add one space at the beginning of every line in a paragraph except the first. Is there some interpretation where this the "correct" behavior? I can simply (setq fill-indent-according-to-mode nil) in my local setup, but there could be something actually incorrect here. Thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 08 10:46:50 2019 Received: (at 36056) by debbugs.gnu.org; 8 Sep 2019 14:46:50 +0000 Received: from localhost ([127.0.0.1]:39025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6ySo-0000MO-7J for submit@debbugs.gnu.org; Sun, 08 Sep 2019 10:46:50 -0400 Received: from mail-io1-f45.google.com ([209.85.166.45]:43317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6ySm-0000MB-RP for 36056@debbugs.gnu.org; Sun, 08 Sep 2019 10:46:49 -0400 Received: by mail-io1-f45.google.com with SMTP id u185so22973983iod.10 for <36056@debbugs.gnu.org>; Sun, 08 Sep 2019 07:46:48 -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=xlW3Fg+/WfuGg7X07N5hFFwlyqAYIi2HcwigCZwObrE=; b=rlX5MtrXjsk3Q+Ibns0LZJUgGwi2xICJQINTHcBKUSGkM+LOS+d0coB+6a5PvRZTFp cmTnew+KuLCpk8+37it8t+eQgvel8gHIJZjfGNdAhQTCP7XhOsnr1CXdKEe7H0FjoaDg syL49HF9xdxqHJw0401xn2Ku4HrtLNklyllIFbXtGaEj4wG5TwnVcZn0hzrJ3njNBwZO zKN7QWhjmjtF435gow83Y+LOtpE6w4fnH2oGnbMLYmi18fuGwXaDtQ+MzHWt/5tY/sNN WieSK3MCy+alzcrV8dk4IcznpRbrcE1q4nzKQcP285H0pIdeJ1Rf8hqiQD/SqkFBhrsr qBDA== 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=xlW3Fg+/WfuGg7X07N5hFFwlyqAYIi2HcwigCZwObrE=; b=dyA8CmOqB8sWr9CLG7DpIjJsO+ptKTDB8wJKMU3USydKm3eKRB9zIUJYStsM/hRMuT F57GGQg9FkndyJiBBZTUQ3Wmdy7YUtfOEGLo61JUJXV0f734TExTGpfZsDVzB6mdQxPP wa5ifI4K4pl6cRcsR934CD+6N/FUWntaSHWtnnU5fRio0AgtbgnMOuRAymMunBDXiFeF qa6iwwQ5qFAKk+sONCQeY8tTILauEO8wgJXv7v3cNB8Fju1DpHBs/lzYuFk9E9D+d0jU bIH9N9uFs3qbes87NFqsBdq6NeWAYC3SIqTvkeSLRMAl9pLRgH44say8sMicnDk2/QOO enxw== X-Gm-Message-State: APjAAAVcuvQuWLNXQwur1F4Jo5cKN9b3vFMzgSBYhXnvprn4slIqJlxt DBDsNeAVlzql2sLdYNP9oQDxOWBd X-Google-Smtp-Source: APXvYqxFQFcCf0/cc2C5Vplvfi4gBfpsS0QARmxJK5FzHLr4O5STGZMrq4DA9pQ2BHdVw+W6SORW5Q== X-Received: by 2002:a6b:590b:: with SMTP id n11mr341761iob.256.1567954003104; Sun, 08 Sep 2019 07:46:43 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id s201sm30473712ios.83.2019.09.08.07.46.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Sep 2019 07:46:42 -0700 (PDT) From: Noam Postavsky To: Dima Kogan Subject: Re: bug#36056: Regression? (Python Documentation String Indent In Auto Fill Mode) References: <7310965c-3f16-a013-ed9d-736ad7b8b8be@lycos.com> <878sqzztlc.fsf@secretsauce.net> Date: Sun, 08 Sep 2019 10:46:40 -0400 In-Reply-To: <878sqzztlc.fsf@secretsauce.net> (Dima Kogan's message of "Sat, 07 Sep 2019 14:26:07 -0700") Message-ID: <87zhjealrj.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36056 Cc: 36056@debbugs.gnu.org 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: -1.0 (-) --=-=-= Content-Type: text/plain Dima Kogan writes: > This is what I'd expect. After the fix (i.e. if > fill-indent-according-to-mode is t) I get this: > > > r'''aaa > > this is a test this is a test this is a test this is a test this is a > test this is a test > > ''' > > > For some reason it now wants to add one space at the beginning of every > line in a paragraph except the first. Is there some interpretation where > this the "correct" behavior? Thanks for reporting this. The problem seems to be that fill-newline puts the space on the new line when breaking the line, and python-indent-line (which is called when fill-indent-according-to-mode is t) leaves indentation inside strings as-is. Maybe the solution is to bind fill-indent-according-to-mode only during auto-filling? The patch below seems to work for both this bug's OP, and your case. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-fill-paragraph-in-python-docstrings-Bug-36056.patch Content-Description: patch >From 46a01b97025ed2f826af4237044bad5262e06c6a Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 8 Sep 2019 10:42:19 -0400 Subject: [PATCH] Fix fill-paragraph in python docstrings (Bug#36056) * lisp/progmodes/python.el (python-do-auto-fill): New function. (python-mode): Set it as normal-auto-fill-function, and don't set fill-indent-according-to-mode. Having the latter set during fill-paragraph gives wrongs result, because python-indent-line doesn't remove indentation added by filling. * test/lisp/progmodes/python-tests.el (python-fill-docstring): New test. --- lisp/progmodes/python.el | 8 +++++++- test/lisp/progmodes/python-tests.el | 13 ++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 14b65669c4..ec5d8c5551 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4084,6 +4084,12 @@ python-fill-paren (goto-char (line-end-position)))) t) +(defun python-do-auto-fill () + "Like `do-auto-fill', but bind `fill-indent-according-to-mode'." + ;; See Bug#36056. + (let ((fill-indent-according-to-mode t)) + (do-auto-fill))) + ;;; Skeletons @@ -5379,7 +5385,7 @@ python-mode (set (make-local-variable 'paragraph-start) "\\s-*$") (set (make-local-variable 'fill-paragraph-function) #'python-fill-paragraph) - (set (make-local-variable 'fill-indent-according-to-mode) t) ; Bug#36056. + (set (make-local-variable 'normal-auto-fill-function) #'python-do-auto-fill) (set (make-local-variable 'beginning-of-defun-function) #'python-nav-beginning-of-defun) diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index b1cf7e8806..c5ad1dfb86 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -1351,7 +1351,7 @@ python-indent-region-5 expected))))) -;;; Autofill +;;; Filling (ert-deftest python-auto-fill-docstring () (python-tests-with-temp-buffer @@ -1368,6 +1368,17 @@ python-auto-fill-docstring (forward-line 1) (should (= docindent (current-indentation)))))) +(ert-deftest python-fill-docstring () + (python-tests-with-temp-buffer + "\ +r'''aaa + +this is a test this is a test this is a test this is a test this is a test this is a test. +'''" + (search-forward "test.") + (fill-paragraph) + (should (= (current-indentation) 0)))) + ;;; Mark -- 2.11.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 09 18:02:47 2019 Received: (at 36056) by debbugs.gnu.org; 9 Sep 2019 22:02:48 +0000 Received: from localhost ([127.0.0.1]:40686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i7RkF-0005og-M4 for submit@debbugs.gnu.org; Mon, 09 Sep 2019 18:02:47 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:47393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i7RkC-0005oQ-MR for 36056@debbugs.gnu.org; Mon, 09 Sep 2019 18:02:45 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3527F21F82; Mon, 9 Sep 2019 18:02:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 09 Sep 2019 18:02:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm1; bh=6E0B/Lohla7LL6FGigC0MOrZdY je61UL+3lzEkbPzSE=; b=sjADPwZQgMbL13hI+6jkMPVeQATHvwsgqsn595iSJl +Eo0B9pIOdDP6w/EPxr5ccep4WhDEx7/Vrb4Fub8etvV3G5dw8K8nhvsG0UfD4mb JQ/9JClfW32xi4EaWoWdC/xIRFdGf/Wvn6mz/WUi8cb+4+TBSnGpeFm9S69bF8DM AqyPv6qc3Wz8HlEuuFrZRR7kJa2IQ5habLgetTZBgImpgvG0Zy18rCbfiG2f/pY/ Tizrb/Ov1mCy6S2W4/u47D/Ej7uCEr3vgjtbVf5pZ3KpTFx1epARfgtip6AogYe+ m8anjP8uNxmXD25e2UORvte+5wGqnp0M9lTlN2gi9K7w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=6E0B/L ohla7LL6FGigC0MOrZdYje61UL+3lzEkbPzSE=; b=dX3u52k488P6woTR5EeYue FhzoefJ9asb68CNfJpAUpgRSHeA+wusGWB13Pce7ebsaGAXLCf/WHygyUx/YtW5i rfdIuNUBUyvA5CGNygAZ6j+s2SlfYvAvkSRtTcTRQD4QQzGEuU504EUaJQcu4bZ/ zKLiJOyMq9e2fUDL51wWhPr3MM6mvYfuyo3jKfHQ6rAmQLoYDpRhPvq+k8jxoVRQ GI44NlQ+doMWU2STY99hg/SwQ0j6e77CDdDYg71nNgH+xd+KQukiOPAckRm5slUc 8ze/cbknh04HDWu8QzJZjyTc7kn/WlePdejRpBHpIM6v9lnLtafYIgiQsex67uSA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudekjedgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufgjfffkgggtsehttdertddtredtnecuhfhrohhmpeffihhmrgcu mfhoghgrnhcuoeguihhmrgesshgvtghrvghtshgruhgtvgdrnhgvtheqnecukfhppedvtd ejrdduhedurddvvdefrddukeelnecurfgrrhgrmhepmhgrihhlfhhrohhmpeguihhmrges shgvtghrvghtshgruhgtvgdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from shorty.local (nat-guest-189.vonkarman.net [207.151.223.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 734DB80062; Mon, 9 Sep 2019 18:02:38 -0400 (EDT) Received: from dima by shorty.local with local (Exim 4.92.1) (envelope-from ) id 1i7Rk5-00025G-9A; Mon, 09 Sep 2019 15:02:37 -0700 References: <7310965c-3f16-a013-ed9d-736ad7b8b8be@lycos.com> <878sqzztlc.fsf@secretsauce.net> <87zhjealrj.fsf_-_@gmail.com> User-agent: mu4e 1.0; emacs 27.0.50 From: Dima Kogan To: Noam Postavsky Subject: Re: bug#36056: Regression? (Python Documentation String Indent In Auto Fill Mode) In-reply-to: <87zhjealrj.fsf_-_@gmail.com> Date: Mon, 09 Sep 2019 15:02:37 -0700 Message-ID: <87o8zt2kn6.fsf@shorty.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36056 Cc: 36056@debbugs.gnu.org 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: -1.7 (-) Noam Postavsky writes: > The problem seems to be that fill-newline puts the space on the new > line when breaking the line, and python-indent-line (which is called > when fill-indent-according-to-mode is t) leaves indentation inside > strings as-is. > > Maybe the solution is to bind fill-indent-according-to-mode only during > auto-filling? The patch below seems to work for both this bug's OP, and > your case. Thanks for looking at this. I haven't tried your proposed patch, but it certainly looks like it would work. Do you think it's a reasonable solution? Feels a bit like a workaround, but we have comments and tests, so maybe it's fine, I guess. Thanks again. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 12 21:49:37 2019 Received: (at 36056) by debbugs.gnu.org; 13 Sep 2019 01:49:38 +0000 Received: from localhost ([127.0.0.1]:44218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8aiP-0006UF-02 for submit@debbugs.gnu.org; Thu, 12 Sep 2019 21:49:37 -0400 Received: from mail-io1-f51.google.com ([209.85.166.51]:35981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8aiN-0006U1-Sv for 36056@debbugs.gnu.org; Thu, 12 Sep 2019 21:49:36 -0400 Received: by mail-io1-f51.google.com with SMTP id b136so59609813iof.3 for <36056@debbugs.gnu.org>; Thu, 12 Sep 2019 18:49:35 -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=f3Y5X9ydnGAfL5J4ALrJq/6/5sOCzpkXUNYQQ2ntDjE=; b=CSpPMWXHVuYPPMY2QFdSyA+4uxZvr5m24AL/HJm7d7VCTFUwlJXHXFTVe8A25F5vlW 7awcW1GXbuwHGegpmclxhvSm1mu4DgmOZOde1yncokiUxYdLvwvSahY1yL+vLHC9yVw/ L6fzAwrW/MIUkAkm7NCfYrsxRfKKwZAitsWa3fIAbYp9XpRxFS+CKvJDyAlBL3xIYBQq 0rMA98a65wswdix9293iGCZjZ6Ep0BG/ZuFYFe74WK5oARiPsVad1RF2vmrk6tneotYo HlIVC4h0IDfSY+p2JCK+GG75XW8JCFyVc2cYDZr+qoRoygTnMwLViDShUB+j+9/w+SGJ miNw== 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=f3Y5X9ydnGAfL5J4ALrJq/6/5sOCzpkXUNYQQ2ntDjE=; b=mUETemZWVkquEeeB/Zei6u/t6/yeegM8aions18ChU/3hPcZLv9r8MmyvReVExfNqx hesgPj2zfMCGTGcDPnX5/8evgOXA2duRWHZNxvgO17ZjhG5+xkr5ouv0TOYToTbV2sIG 4ld7SKwmNwJTyeQ/EklKvEufsiTnzsy0oPnNeDRDam+yaPK8jg6suV3V/OjeWsnnjfKy iu/880w7Is99zx9mDby8xEFnoKgkCv7jJGjyZtkHr/AfGruc6EPwhlTGt4SYTif8c6OM tKAObqhjcgppVa6Cp+eHa4Dk9yL+lOFYgc9/NNpdC6ZDgl0AWQZuYs2GZvv6iuhvp0n5 EZeQ== X-Gm-Message-State: APjAAAVFaWzV1QF3zHtsmuk0WzuRGZSXhzhWld1ZmEENc1O3eROskm13 G72czUwHKtINLRTYLV1mu+mq7I8p X-Google-Smtp-Source: APXvYqx523vGhji7vCAhdq7jS8CKCZXwN4ew82IR9VtzPXpZ/I5GWTI5eVRmKqcJy/BlQBOR8uT7zQ== X-Received: by 2002:a6b:f319:: with SMTP id m25mr2599092ioh.33.1568339369962; Thu, 12 Sep 2019 18:49:29 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id s22sm8053641ioc.29.2019.09.12.18.49.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2019 18:49:29 -0700 (PDT) From: Noam Postavsky To: Dima Kogan Subject: Re: bug#36056: Regression? (Python Documentation String Indent In Auto Fill Mode) References: <7310965c-3f16-a013-ed9d-736ad7b8b8be@lycos.com> <878sqzztlc.fsf@secretsauce.net> <87zhjealrj.fsf_-_@gmail.com> <87o8zt2kn6.fsf@shorty.i-did-not-set--mail-host-address--so-tickle-me> Date: Thu, 12 Sep 2019 21:49:28 -0400 In-Reply-To: <87o8zt2kn6.fsf@shorty.i-did-not-set--mail-host-address--so-tickle-me> (Dima Kogan's message of "Mon, 09 Sep 2019 15:02:37 -0700") Message-ID: <87sgp19d93.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36056 Cc: 36056@debbugs.gnu.org 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: -1.0 (-) Dima Kogan writes: > Thanks for looking at this. I haven't tried your proposed patch, but it > certainly looks like it would work. Do you think it's a reasonable > solution? Feels a bit like a workaround, but we have comments and tests, > so maybe it's fine, I guess. Yeah, it's kind of messy, but I don't see another of doing it, so I've pushed to master. cbb8a8ad97 2019-09-12T20:25:30-04:00 "Fix fill-paragraph in python docstrings (Bug#36056)" https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=cbb8a8ad979ed7975bfc7e9fa6aeeb4d9d6b7084 From unknown Sat Jun 14 03:54:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 11 Oct 2019 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator