From unknown Mon Jun 23 02:26:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29098: 26.0.90; [PATCH] 2 patches: initial-buffer-choice and python-indent-dedent-line-backspace Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Nov 2017 05:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29098 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 29098@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150951391724063 (code B ref -1); Wed, 01 Nov 2017 05:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Nov 2017 05:25:17 +0000 Received: from localhost ([127.0.0.1]:44905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9lWf-0006G2-G5 for submit@debbugs.gnu.org; Wed, 01 Nov 2017 01:25:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9lWd-0006Fo-N5 for submit@debbugs.gnu.org; Wed, 01 Nov 2017 01:25:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9lWX-0000BX-6z for submit@debbugs.gnu.org; Wed, 01 Nov 2017 01:25:10 -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.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47642) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e9lWX-0000BG-2p for submit@debbugs.gnu.org; Wed, 01 Nov 2017 01:25:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9lWV-0007TD-DT for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2017 01:25:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9lWS-0008VU-8e for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2017 01:25:07 -0400 Received: from mail-io0-x22c.google.com ([2607:f8b0:4001:c06::22c]:43264) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9lWR-0008U8-Nu for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2017 01:25:03 -0400 Received: by mail-io0-x22c.google.com with SMTP id 134so3763114ioo.0 for ; Tue, 31 Oct 2017 22:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=m8yLeMeOrqTsSnSx+y0Ha0QaCmHb9WiXpCSGwfY0pkM=; b=aM6zxCVugA/2EeMsRRnIRmB5EK+h8z1AxegmDb8cx4G+d8ULMpqAAKFZrdDelSjk1A eMm3ODDf0T1i60A8X/Et9oMREjL0iTLfeyyI3RCK+TbHVKpzV+YqqLpPs23x8Dz6C3Z3 85VrL7GHamVG1gpL4U9n+zk0H/3kT6wJG4r/3UfOyMfi394BAmPR/I+PpPusS9/Iz9zU 7qK1lDKX/+BN79w/MfiX/6xIZwlBqRHjLGvWo3NLp//swdftYajT6AtWrCHcuazsLJao OktnOAp7G/fcaWdyy1eQ0rjMV2hfPpi7gm37QLqYxoI9ZWQGRfSz1tjyvQtEtyrAgjrO jnjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=m8yLeMeOrqTsSnSx+y0Ha0QaCmHb9WiXpCSGwfY0pkM=; b=EGbNzY59QNaAX/ALB/bGFcvp1NQCmaFUGN4dy/ABtlpjAJC1LVTdoCfSC8IMNvx5Al jnlK9odg1+EL/jPTvQTSHw0CYddFmX3rGXkHBsxDSETxMq1iwWn82Q1N73lrFWeivIrM Sd0ByUhVjK+yweJsM9dy4ANdYAPkJ8d4vPQLUsp59XheXmZf8N1qLmeuN8qy1VDBzRtl MawHaVtt0KtE5yDPrHJjtzx5TZZ7XMqumyNH0Z2o6sGHk8n3Eq2qfUG8bI6fddDehMhD 4sakF5Qtj6reB8polYmnVEqwnQgRQwLEXxB5+HbJfsXs1lzx2lKGvDFVA1ft/zkBr3B2 YLSA== X-Gm-Message-State: AMCzsaWsFmhP5MZXXXHqCW/dyhRXP93JnIDeWhmj9pKjp4/uQBNyH8b/ Yjpm1RV2Ms7cPFE+csqpGnQ1NA== X-Google-Smtp-Source: ABhQp+QxURBHBebALKC3jKqrPS5MitesMPbG4a8MRHl0/MF+b6c0DwdSrulzXxYZz2q+A27qqkM34w== X-Received: by 10.36.159.195 with SMTP id c186mr6461722ite.83.1509513902289; Tue, 31 Oct 2017 22:25:02 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id d1sm7795iti.35.2017.10.31.22.25.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Oct 2017 22:25:01 -0700 (PDT) From: Alex Date: Tue, 31 Oct 2017 23:24:48 -0600 Message-ID: <87a806muzj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) 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: -4.0 (----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I have 2 small patches that I think should go to emacs-26, and I'm not sure if they deserve their own individual reports. Is this alright, or should I split them up in the future? Anyway, these alleviate/solve some issues that I've seen people report. The first patch provides more information to an error message, and the second deals with pressing backspace in a python-mode buffer with an active region. When in a python-mode buffer with the contents: def foo(): print('bar') with an active region and point at the "p", then pressing backspace de-indents the line instead of deleting it. This is at odds with the behaviour in other modes, where a similar action deletes the line, at least with =E2=80=98delete-active-region=E2=80=99 non-nil. I thought about making this behaviour conditional using =E2=80=98delete-active-region=E2=80=99, but that might be a bit inconsisten= t. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Improve-error-messages-regarding-initial-buffer-choi.patch Content-Description: error >From 922fe8f466ad039f65fb423af6636bfd1695f039 Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Tue, 31 Oct 2017 21:10:52 -0600 Subject: [PATCH 1/2] Improve error messages regarding initial-buffer-choice * lisp/startup.el (command-line-1) : Make the messages conform to Emacs conventions, and show the invalid return value in the message. --- lisp/startup.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/startup.el b/lisp/startup.el index 4b538d130e..cf88c40e92 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -2506,9 +2506,9 @@ command-line-1 ((eq initial-buffer-choice t) (get-buffer-create "*scratch*")) (t - (error "initial-buffer-choice must be a string, a function, or t."))))) + (error "`initial-buffer-choice' must be a string, a function, or t"))))) (unless (buffer-live-p buf) - (error "initial-buffer-choice is not a live buffer.")) + (error "Value returned by `initial-buffer-choice' is not a live buffer: %S" buf)) (setq displayable-buffers (cons buf displayable-buffers)))) ;; Display the first two buffers in `displayable-buffers'. If -- 2.14.2 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-Delete-active-region-instead-of-de-indenting-in-pyth.patch Content-Description: python >From 50bd5bd058b71031f84c4d5a4d511353c671d66d Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Tue, 31 Oct 2017 22:36:16 -0600 Subject: [PATCH 2/2] Delete active region instead of de-indenting in python-mode This conforms to the behaviour of `backward-delete-char-untabify' when there's an active region. 183f9296f1 fixes this behaviour for `delete-selection-mode' only. * lisp/progmodes/python.el (python-indent-dedent-line): Restructure and check for an active region conditionally using a new optional argument. (python-indent-dedent-line-backspace): Use the new argument to `python-indent-dedent-line'. * test/lisp/progmodes/python-tests.el: Add test. --- lisp/progmodes/python.el | 19 +++++++++++-------- test/lisp/progmodes/python-tests.el | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 895117b9ee..56faab057d 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1150,21 +1150,24 @@ python-indent-line-function (and (memq this-command python-indent-trigger-commands) (eq last-command this-command)))) -(defun python-indent-dedent-line () - "De-indent current line." +(defun python-indent-dedent-line (&optional region-inhibits) + "De-indent current line. +If REGION-INHIBITS is non-nil, then don't de-indent when the +region is active as determined by `use-region-p'." (interactive "*") - (when (and (not (bolp)) - (not (python-syntax-comment-or-string-p)) - (= (current-indentation) (current-column))) - (python-indent-line t) - t)) + (unless (or (bolp) + (and region-inhibits (use-region-p)) + (python-syntax-comment-or-string-p) + (/= (current-indentation) (current-column))) + (python-indent-line t) + t)) (defun python-indent-dedent-line-backspace (arg) "De-indent current line. Argument ARG is passed to `backward-delete-char-untabify' when point is not in between the indentation." (interactive "*p") - (unless (python-indent-dedent-line) + (unless (python-indent-dedent-line t) (backward-delete-char-untabify arg))) (put 'python-indent-dedent-line-backspace 'delete-selection 'supersede) diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index a59885637e..1b9cd23d6b 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -2475,6 +2475,23 @@ python-tests-visible-string (line-beginning-position) (line-end-position)) "abcdef"))))) +(ert-deftest python-indent-dedent-line-backspace-4 () + "Check that an active region is deleted instead of the +line being de-indented." + (python-tests-with-temp-buffer + " +def foo(): + print('bar')" + (let ((transient-mark-mode t)) + (goto-char (point-max)) + (set-mark (point)) + (back-to-indentation) + (call-interactively #'python-indent-dedent-line-backspace) + (should + (string= (buffer-substring-no-properties + (line-beginning-position) (line-end-position)) + " "))))) + (ert-deftest python-bob-infloop-avoid () "Test that strings at BOB don't confuse syntax analysis. Bug#24905" (python-tests-with-temp-buffer -- 2.14.2 --=-=-=-- From unknown Mon Jun 23 02:26:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29098: 26.0.90; [PATCH] 2 patches: initial-buffer-choice and python-indent-dedent-line-backspace Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Nov 2017 19:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29098 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Cc: 29098@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 29098-submit@debbugs.gnu.org id=B29098.150956499430237 (code B ref 29098); Wed, 01 Nov 2017 19:37:01 +0000 Received: (at 29098) by debbugs.gnu.org; 1 Nov 2017 19:36:34 +0000 Received: from localhost ([127.0.0.1]:46433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9yoS-0007rb-3H for submit@debbugs.gnu.org; Wed, 01 Nov 2017 15:36:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9yoQ-0007rP-Bi for 29098@debbugs.gnu.org; Wed, 01 Nov 2017 15:36:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9yoH-0005nH-8J for 29098@debbugs.gnu.org; Wed, 01 Nov 2017 15:36:25 -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.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9yoH-0005nA-4f; Wed, 01 Nov 2017 15:36:21 -0400 Received: from [176.228.60.248] (port=2412 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e9yoF-0006Au-C0; Wed, 01 Nov 2017 15:36:21 -0400 Date: Wed, 01 Nov 2017 21:36:02 +0200 Message-Id: <837ev9ssf1.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87a806muzj.fsf@gmail.com> (message from Alex on Tue, 31 Oct 2017 23:24:48 -0600) References: <87a806muzj.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) 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: -5.0 (-----) > From: Alex > Date: Tue, 31 Oct 2017 23:24:48 -0600 > > I have 2 small patches that I think should go to emacs-26, and I'm not > sure if they deserve their own individual reports. Is this alright, or > should I split them up in the future? If they are unrelated (as in this case, I believe), it is best to split them. > >From 922fe8f466ad039f65fb423af6636bfd1695f039 Mon Sep 17 00:00:00 2001 > From: Alexander Gramiak > Date: Tue, 31 Oct 2017 21:10:52 -0600 > Subject: [PATCH 1/2] Improve error messages regarding initial-buffer-choice > > * lisp/startup.el (command-line-1) : Make the > messages conform to Emacs conventions, and show the invalid return > value in the message. This looks okay to me. > >From 50bd5bd058b71031f84c4d5a4d511353c671d66d Mon Sep 17 00:00:00 2001 > From: Alexander Gramiak > Date: Tue, 31 Oct 2017 22:36:16 -0600 > Subject: [PATCH 2/2] Delete active region instead of de-indenting in > python-mode > > This conforms to the behaviour of `backward-delete-char-untabify' when > there's an active region. 183f9296f1 fixes this behaviour for > `delete-selection-mode' only. > > * lisp/progmodes/python.el (python-indent-dedent-line): Restructure > and check for an active region conditionally using a new optional > argument. > (python-indent-dedent-line-backspace): Use the new argument to > `python-indent-dedent-line'. > * test/lisp/progmodes/python-tests.el: Add test. I'll let users of Python mode to comment on this. Thanks. From unknown Mon Jun 23 02:26:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29098: 26.0.90; [PATCH] 2 patches: initial-buffer-choice and python-indent-dedent-line-backspace Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Nov 2017 08:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29098 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Cc: 29098@debbugs.gnu.org Received: via spool by 29098-submit@debbugs.gnu.org id=B29098.150969825519504 (code B ref 29098); Fri, 03 Nov 2017 08:38:02 +0000 Received: (at 29098) by debbugs.gnu.org; 3 Nov 2017 08:37:35 +0000 Received: from localhost ([127.0.0.1]:48641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAXTr-00054R-0C for submit@debbugs.gnu.org; Fri, 03 Nov 2017 04:37:35 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:53906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAXTp-000549-74; Fri, 03 Nov 2017 04:37:33 -0400 Received: by mail-io0-f178.google.com with SMTP id 189so4618572iow.10; Fri, 03 Nov 2017 01:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=VRjZW/+jZvR3vpi2UayEeHuCByA50/CR31ixLtFkLrs=; b=HvgFs9LaJ25DiWcvRfoyfd34Y8Zsuu1KSOIPMZD5MsW0XGKO5kPhshquRasqj1Qtd2 ByPIVCBGn0C2KrspQUTBlgiR1DkRQPbVtqqcj80FE75a1eqteohzmpwi/H2EOkaCGSp8 hAX9x3lA38pzv3lkgMfwxKu+USZVjCBd/riNl2Wf8YR0FPCySI2gNEGdULPyMtPDthWt 5DgbAsCJe9vDdqQDrTP1Bo4OzeF3t6PMyCePAHg9WtKnEowJta3zBcx3p21G/yKR9Ifg 4/zIPHNqode1aZ7lqjHOI+knm9G3KC+K2hvuLkf6ZPVUvm79mss1I3NeqvzvaLkDX2Rk JH8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=VRjZW/+jZvR3vpi2UayEeHuCByA50/CR31ixLtFkLrs=; b=mvEBnMphTGHr13nkX6GWLvai4Fbt7at8Kpbkg+H3XtwoCFebFydCJuiGXkGs71L64N GaZ+DNTwD/QqJsYJ6Z2RDLypU0dfdMVc+RC943E7o3bQkPCGojr/XKCYgMGhG/Il4t4X m4Ot0iPwIIEIMP/3wW5biy81cczzELk+oIn0OV+ys8+NClcijd8GZtkWQRiM7xQixk+d sa8qxX+LdmwvGAsCVNPcealF9g1mBB10U0wNeWdF+uBzhn2GdszO0VY8XBYFAMnLVIDq SxxRBEJS8fKg5QyTTCkl/7jyvKfIOM8PPFVFbLP9pMEBcXAf/C5hO0OlU48UR88tZv8W XuqA== X-Gm-Message-State: AMCzsaVPHcqRuMA+fTMIkKF43Vsrk10rdml74dCuB/PynKHocq5XwDaA 9PRW9nFmXBSCgpWMdOypO5jtRA== X-Google-Smtp-Source: ABhQp+Tko0hAYTaF2yErQxzgox3J9AKN8CMkYnyJFWcPhZVXy5dvX8LHBQMdBi8kdAZZYG+Yr5DEzA== X-Received: by 10.107.188.68 with SMTP id m65mr7781140iof.255.1509698247419; Fri, 03 Nov 2017 01:37:27 -0700 (PDT) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id c15sm2404488iob.67.2017.11.03.01.37.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Nov 2017 01:37:26 -0700 (PDT) From: Noam Postavsky References: <87a806muzj.fsf@gmail.com> Date: Fri, 03 Nov 2017 04:37:25 -0400 In-Reply-To: <87a806muzj.fsf@gmail.com> (Alex's message of "Tue, 31 Oct 2017 23:24:48 -0600") Message-ID: <87d14z92re.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.1 (--) 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.1 (--) severity 29098 minor quit Alex writes: > I thought about making this behaviour conditional using > =E2=80=98delete-active-region=E2=80=99, but that might be a bit inconsist= ent. Could you elaborate on this? Wouldn't it be more consistent to respect delete-active-region, like other commands do? (I assume other commands do respect it.) From unknown Mon Jun 23 02:26:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29098: 26.0.90; [PATCH] 2 patches: initial-buffer-choice and python-indent-dedent-line-backspace Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Nov 2017 02:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29098 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Cc: 29098@debbugs.gnu.org Received: via spool by 29098-submit@debbugs.gnu.org id=B29098.15118368448617 (code B ref 29098); Tue, 28 Nov 2017 02:41:02 +0000 Received: (at 29098) by debbugs.gnu.org; 28 Nov 2017 02:40:44 +0000 Received: from localhost ([127.0.0.1]:33280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJVpE-0002Eu-7C for submit@debbugs.gnu.org; Mon, 27 Nov 2017 21:40:44 -0500 Received: from mail-it0-f54.google.com ([209.85.214.54]:41733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJVpD-0002Ef-74 for 29098@debbugs.gnu.org; Mon, 27 Nov 2017 21:40:43 -0500 Received: by mail-it0-f54.google.com with SMTP id x28so23699857ita.0 for <29098@debbugs.gnu.org>; Mon, 27 Nov 2017 18:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=eu/zRIrnlcADlYn8eqHk0FSajPO5HgJBtt4nbZokyMo=; b=OecVLpG8Hs+P1oPDXW6JYeDa7ffRghhfoh1GMIPSrBmTrt1XiNpOwAqrsVLv/WzuFu 4x3x+9/s7vdXSVpteC6gfPgIbf7nlFc1zhYQdeGTlv8S2jpp31gZM6J9ENfFQs4uVr4l SOG2gm+o70P0RGTQY/HJ6oJcXAtnnqOVVcL42J2Xz4MQNyXPkRUm7eQ3wpyAvsi/3WU4 +2ylHew9JunoLPlJ6p7B4ZBX5FVQ4NRKB6sRYyrpWyGsP+7Sy3sLCgjwMkc41PHPC0TV 2i56nSTy/117L5nJAFjvDVyo2NK/UdUtzxtuU1AYZNUxVAd+A/zD+f3SmngfpVnhK8m6 IEsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=eu/zRIrnlcADlYn8eqHk0FSajPO5HgJBtt4nbZokyMo=; b=sH/Na3F7XI74LqKXFD+XU8YxXgAW1A6ED98tlLSlQONzOAJYtyObhHqqbSo0WEjyYS qYef3glTanQHANq/ZuU6eQca2R2r4x+IREu4IEsH+DqnpauFrtx+QaMZgi2ZaeGEdfHp 8BKKqD2h0dF6xP56709eHRsVQxliA1udKSTxBHQDdS1mNfaQ0FafCrQd1+gox9JvgVPO /POS3EPOoNcsH8zor6wfKgF1iDH6sMxfJ2ezgkQJcvkV61xAlNeaq3l3fjYTMTk+xG1y j5yS9vRLqLQByPr9KzbQFTeaPf1GGddevJV/hPd6rMhTqd9cVPx/Kp90bgjP0pyoorL3 Jq2g== X-Gm-Message-State: AJaThX4oxa41Bc8whtNVBSR68bXqhlBeMZb1mA+cN1hHqGpBpPQcLwJq Ww00qGgJANGhKyd0v8ZgpXXaHQ== X-Google-Smtp-Source: AGs4zMZ/lBBaHAgDalw4oIObfdaS5IfPvzihEeBSkTSxRXEUFT7iFatkfNGdCqofP0QjynqKDubLsw== X-Received: by 10.36.53.144 with SMTP id k138mr468850ita.43.1511836837265; Mon, 27 Nov 2017 18:40:37 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id n7sm765223ioi.57.2017.11.27.18.40.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Nov 2017 18:40:35 -0800 (PST) From: Noam Postavsky References: <87a806muzj.fsf@gmail.com> <87d14z92re.fsf@users.sourceforge.net> Date: Mon, 27 Nov 2017 21:40:34 -0500 In-Reply-To: <87d14z92re.fsf@users.sourceforge.net> (Noam Postavsky's message of "Fri, 03 Nov 2017 04:37:25 -0400") Message-ID: <87y3mrm8gt.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.5 (/) 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: -0.5 (/) Noam Postavsky writes: > Alex writes: > >> I thought about making this behaviour conditional using >> =E2=80=98delete-active-region=E2=80=99, but that might be a bit inconsis= tent. > > Could you elaborate on this? Wouldn't it be more consistent to respect > delete-active-region, like other commands do? (I assume other commands > do respect it.) Ping? From unknown Mon Jun 23 02:26:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29098: 26.0.90; [PATCH] 2 patches: initial-buffer-choice and python-indent-dedent-line-backspace Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Aug 2018 12:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29098 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Cc: 29098@debbugs.gnu.org Received: via spool by 29098-submit@debbugs.gnu.org id=B29098.15338170546783 (code B ref 29098); Thu, 09 Aug 2018 12:18:02 +0000 Received: (at 29098) by debbugs.gnu.org; 9 Aug 2018 12:17:34 +0000 Received: from localhost ([127.0.0.1]:45576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fnjsk-0001lF-6i for submit@debbugs.gnu.org; Thu, 09 Aug 2018 08:17:34 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:33435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fnjsi-0001kx-DI; Thu, 09 Aug 2018 08:17:32 -0400 Received: by mail-io0-f193.google.com with SMTP id z20-v6so4597958iol.0; Thu, 09 Aug 2018 05:17:32 -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:content-transfer-encoding; bh=t3fmxEBF0TlWYWLhp3hc4seHkdpKYQrc25vbV/GTYwU=; b=MvcWx9DnEUF5v7d2JyLdA60LPz0P/D10Szz5zf1cPrN9DBNyPxcfch2PIZOoqIXaV2 Lf7XEyKqSC4GOqdoiRfIA3W+w62i4UT8YJDPEKGPWhENBWCjvfGqSRdQ9GBLDeHNweOr irqPW7A5uMq9oVsDp5FPiQytW8Wma9Ny+RixkhQ9u9aPQBB2Ksj335H5viHyDUMbQbYW 6Dpbwj2AA8NfeWtJuqj1jDuI4DDcX4LMoQYS7WY/TBwQUkL14aEWrbLvOB0AQIvIMi7L COEvrd4YWXLWVyubHpPm45g+RRrcqkhviPqMr7hZWClkAIPame/m+Fj6PXghqXn33N/t XkMQ== 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:content-transfer-encoding; bh=t3fmxEBF0TlWYWLhp3hc4seHkdpKYQrc25vbV/GTYwU=; b=fqmJSGXj3KZCY4ICk9bMPJTc/uEL4vqSVIPkq16Nnb8hvKi3rnXLYGUjekrDwYKiAE KdkSyI1Pw78DjL/d2X6TJhKQqavKHGuO2UnfeS4pqP7BV0lk6/vIdXyKxZ8DiywRh/Up f+203BHPY34/eSV4PY6ZYfB+lQwaHa1DNLyt7S/fpu6t12N1lxokroOqtt7R4kCasGR5 pbkkhdRCNjbvg0Bz5ifaDCHZFcmYtUiVrpCC7GCg68KgjAvnXB6c1sstA5UmSCPmmJOb wsk4qCpBWX0ESeIFrM4p7xLuT27Gc5uMK9RUVrFEOy56LAZE3wmwWIvlcuzFSqlrTMpf d4yQ== X-Gm-Message-State: AOUpUlExSVoGKP6VhtfzPWvL0P8teb65C3Qr8Yfwmg/OzstsyPrezJn+ RCGHXUnEr4WRmMgYwHSWyTaW4jv2 X-Google-Smtp-Source: AA+uWPxXP8ZK+eqHnt2XbfYqWIBeertBLo4y4IRQGI6dfYe79ek7e4OmC/ihrAwOYbDtVP5Q96o1dw== X-Received: by 2002:a5e:9706:: with SMTP id w6-v6mr1433606ioj.257.1533817046654; Thu, 09 Aug 2018 05:17:26 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id n127-v6sm3464466itn.7.2018.08.09.05.17.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Aug 2018 05:17:25 -0700 (PDT) From: Noam Postavsky References: <87a806muzj.fsf@gmail.com> Date: Thu, 09 Aug 2018 08:17:24 -0400 In-Reply-To: <87a806muzj.fsf@gmail.com> (Alex's message of "Tue, 31 Oct 2017 23:24:48 -0600") Message-ID: <87sh3nwx7v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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 (-) retitle 29098 improve initial-buffer-choice error messages tags 29098 fixed close 29098 26.2 quit Alex writes: > The first patch provides more information to an error message, and the > second deals with pressing backspace in a python-mode buffer with an > active region. I pushed this to emacs-26. [1: 96be6b6eb9]: 2018-08-09 08:12:07 -0400 Improve error messages regarding initial-buffer-choice (Bug#29098) https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3D96be6b6eb99ae1d7= 7702932c97e8b3a147c6265a > When in a python-mode buffer with the contents: > > def foo(): > print('bar') > > with an active region and point at the "p", then pressing backspace > de-indents the line instead of deleting it. This is at odds with the > behaviour in other modes, where a similar action deletes the line, at > least with =E2=80=98delete-active-region=E2=80=99 non-nil. > I thought about making this behaviour conditional using > =E2=80=98delete-active-region=E2=80=99, but that might be a bit inconsist= ent. I suggest opening a new bug thread to discuss this.