From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#36056: 26.2; Python Documentation String Indent In Auto Fill Mode Date: Mon, 03 Jun 2019 01:57:45 +0100 Message-ID: <87h897scxi.fsf@tcd.ie> References: <7310965c-3f16-a013-ed9d-736ad7b8b8be@lycos.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="219543"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 36056@debbugs.gnu.org To: ricercar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 03 02:58:18 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXbIo-000uxa-3K for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Jun 2019 02:58:18 +0200 Original-Received: from localhost ([127.0.0.1]:55182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXbIk-0005kM-LR for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Jun 2019 20:58:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXbIa-0005ju-0A for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2019 20:58:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXbIY-0001Xf-Vx for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2019 20:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55885) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hXbIY-0001XU-Kx for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2019 20:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hXbIY-0006T1-I4 for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2019 20:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Jun 2019 00:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36056 X-GNU-PR-Package: emacs Original-Received: via spool by 36056-submit@debbugs.gnu.org id=B36056.155952348124852 (code B ref 36056); Mon, 03 Jun 2019 00:58:02 +0000 Original-Received: (at 36056) by debbugs.gnu.org; 3 Jun 2019 00:58:01 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: <7310965c-3f16-a013-ed9d-736ad7b8b8be@lycos.com> (ricercar's message of "Sun, 2 Jun 2019 11:01:49 +0200") 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: 209.51.188.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:160035 Archived-At: 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