From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dale Sedivec Newsgroups: gmane.emacs.bugs Subject: bug#42513: Possible fix for Python indentation problem Date: Tue, 15 Sep 2020 18:25:29 -0500 Message-ID: References: <20200724114012.7bb27a6d@parabola> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32351"; mail-complaints-to="usenet@ciao.gmane.io" To: 42513@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 16 01:26:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIKKx-0008Ge-4F for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Sep 2020 01:26:11 +0200 Original-Received: from localhost ([::1]:55534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIKKv-00040C-Nv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Sep 2020 19:26:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIKKo-000401-DP for bug-gnu-emacs@gnu.org; Tue, 15 Sep 2020 19:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49347) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIKKo-00085U-4F for bug-gnu-emacs@gnu.org; Tue, 15 Sep 2020 19:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kIKKo-0000Vu-0j for bug-gnu-emacs@gnu.org; Tue, 15 Sep 2020 19:26:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <20200724114012.7bb27a6d@parabola> Resent-From: Dale Sedivec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Sep 2020 23:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42513 X-GNU-PR-Package: emacs Original-Received: via spool by 42513-submit@debbugs.gnu.org id=B42513.16002123401948 (code B ref 42513); Tue, 15 Sep 2020 23:26:01 +0000 Original-Received: (at 42513) by debbugs.gnu.org; 15 Sep 2020 23:25:40 +0000 Original-Received: from localhost ([127.0.0.1]:60893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIKKS-0000VM-Do for submit@debbugs.gnu.org; Tue, 15 Sep 2020 19:25:40 -0400 Original-Received: from mail-io1-f43.google.com ([209.85.166.43]:40630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIKKP-0000V9-I3 for 42513@debbugs.gnu.org; Tue, 15 Sep 2020 19:25:39 -0400 Original-Received: by mail-io1-f43.google.com with SMTP id j2so6112187ioj.7 for <42513@debbugs.gnu.org>; Tue, 15 Sep 2020 16:25:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codefu-org.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=wj8TOvDfYtvyjIuDKp66KwzA4Okdbp4ck+wTv+DA0fg=; b=a14KmWI7nKMB+moJEZBroREYOP9imVzGVpLX47ni07Jk96O4Y2N41MFCkl/lG6yEpI QgnpAHhMkIWmASakPPQAlG06DJI72X+q7oGiQyYI/Bw439/bF0M4kAOL3TYixaaT4IEE 7/kez4rHdMMf0/RrJTu7aK6Fm1h18Ii34Q6R9JpRutgIkLpnERXLpZz2Tsv7kgAiPRo0 MqyyRQT0wOZGghfsYQjnc4aXs4fA81gZBnG9CaacylH9o6B7deKfNI0yzfJ64jkz94Q8 z7Xaj9/RI+oiCMdNRVfBRASd7cAb+w7RxOl8CcvyDTGi/VLOIOJYEEd4kpuKQsnBbytJ vw0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=wj8TOvDfYtvyjIuDKp66KwzA4Okdbp4ck+wTv+DA0fg=; b=JCHHzInXjGQ0vj/tTxQme5vXAdyfn5Y3NzAeeyc5OdfJCyBB47bETP/wvGBMlF65Pg IZoUlgbS7G8rLlsb46xLm4dmJQFI655q/iJg1SFmiCwA61vPatWqQFYaBcyXqta/ZZel a9sP40sGb/xUvkTUW47nfRxNyg1TyxJhm00xi+Dpd4qYmSw27fU/vpuii9tmTZwDL4XK l190St7SfQ7pbH4TcZlOXLWLmfB77HVfVrbZmhPCKHosIZtABUZcRbo7km6MxMmnFLth xTmhiyUgW8SEJeTZH2Djok+Vb2SLdx1GizGeSKqVhfTZ1QBTde9bkV40wB4OOZ7MKJe2 rk0A== X-Gm-Message-State: AOAM533odNqEoQkGUkWXU0Uir3bR2HA6FSPGEGzlcmNsvM8FwAwJ2OtL 2fscVlEzlkzIA9AYbd6bFA5f+Sf/QOmDpE6t X-Google-Smtp-Source: ABdhPJw1I46ApDYkfbW/afIn7zVv/qAqVY5EBFYhXaOrmIZgol6/wP4XxjeYQb9RS6MFip9OqQoyPw== X-Received: by 2002:a6b:8fc9:: with SMTP id r192mr17218991iod.24.1600212331300; Tue, 15 Sep 2020 16:25:31 -0700 (PDT) Original-Received: from dale.caliginous.net (152.160.30.136.in-addr.arpa. [136.30.160.152]) by smtp.gmail.com with ESMTPSA id o10sm9889928ilk.36.2020.09.15.16.25.30 for <42513@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2020 16:25:30 -0700 (PDT) X-Mailer: Apple Mail (2.3445.104.15) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188154 Archived-At: FYI I'm testing this fix against master: diff --git a/python.el b/python.el index b36a583..24f5f87 100644 --- a/python.el +++ b/python.el @@ -4991,6 +4991,7 @@ likely an invalid python file." ;; block and the current line, otherwise it ;; is not an opening block. (save-excursion + (python-nav-end-of-statement) (forward-line) (let ((no-back-indent t)) (save-match-data = (https://github.com/dsedivec/python/commit/7d2a97ca995c4a6673fa68861e42c54= c9e8f6596.diff if my MUA mangles that.) All this does is move to the end of the block opener (e.g. the "if" = statement) before moving to the next line, where it expects to be within = the "if"s block. Dale=