From pdm@zamazal.org Sat Feb 21 02:25:29 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 21 Feb 2009 10:25:29 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1LAPQoL023771 for ; Sat, 21 Feb 2009 02:25:27 -0800 Received: from mail.gnu.org ([199.232.76.166]:33052 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Lap0t-0003E5-Vf for emacs-pretest-bug@gnu.org; Sat, 21 Feb 2009 05:23:16 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Lap2y-0001Vj-Oh for emacs-pretest-bug@gnu.org; Sat, 21 Feb 2009 05:25:25 -0500 Received: from ip51.strelice.net ([217.66.176.51]:24476 helo=zamazal.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lap2y-0001VJ-6x for emacs-pretest-bug@gnu.org; Sat, 21 Feb 2009 05:25:24 -0500 Received: from blackbird.nest.zamazal.org ([192.168.129.12]) by zamazal.org with esmtp (Exim 4.69) (envelope-from ) id 1Lap2w-0001f3-OL for emacs-pretest-bug@gnu.org; Sat, 21 Feb 2009 11:25:22 +0100 Received: from pdm by blackbird.nest.zamazal.org with local (Exim 4.69) (envelope-from ) id 1Lap2w-0001f0-5J for emacs-pretest-bug@gnu.org; Sat, 21 Feb 2009 11:25:22 +0100 From: Milan Zamazal To: emacs-pretest-bug@gnu.org Subject: 23.0.90; python-mode: Indent commands behavior X-Hashcash: 1:20:090221:emacs-pretest-bug@gnu.org::jXXeXB0u67H1P1qZ:0000000000000000000000000000000000002DOS Date: Sat, 21 Feb 2009 11:25:22 +0100 Message-ID: <87k57k9je5.fsf@blackbird.nest.zamazal.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) In GNU Emacs 23.0.90.1 (x86_64-pc-linux-gnu, GTK+ Version 2.12.11) of 2009-02-03 on blackbird, modified by Debian (emacs-snapshot package, version 1:20090202-1) The indent commands `C-c <' and `C-c >' work only on active regions. This is annoying, inconsistent with `C-x TAB' behavior, and not useful (even if it worked as announced in its documentation, i.e. shifting the current line, which it doesn't, a similar effect can be achieved more easily by TAB presses). So I suggest to change the behavior of these commands to always work on the region, whether it is active or not, or to provide a configuration option which can enable such a behavior. Regards, Milan Zamazal From rudalics@gmx.at Sat Feb 21 06:13:47 2009 Received: (at 2421) by emacsbugs.donarmstrong.com; 21 Feb 2009 14:13:48 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id n1LEDekV016347 for <2421@emacsbugs.donarmstrong.com>; Sat, 21 Feb 2009 06:13:41 -0800 Received: (qmail invoked by alias); 21 Feb 2009 14:13:34 -0000 Received: from 62-47-54-116.adsl.highway.telekom.at (EHLO [62.47.54.116]) [62.47.54.116] by mail.gmx.net (mp003) with SMTP; 21 Feb 2009 15:13:34 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/cdFpaxfXcIG6tO+fip+RpZCqN0/7kj8q2LZfb1P UqUMOGOjaO43g7 Message-ID: <49A00B66.80908@gmx.at> Date: Sat, 21 Feb 2009 15:10:46 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 2421@debbugs.gnu.org CC: Milan Zamazal Subject: Re: bug#2421: 23.0.90; python-mode: Indent commands behavior References: <87k57k9je5.fsf@blackbird.nest.zamazal.org> In-Reply-To: <87k57k9je5.fsf@blackbird.nest.zamazal.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.75 > The indent commands `C-c <' and `C-c >' work only on active regions. > This is annoying, inconsistent with `C-x TAB' behavior, and not useful > (even if it worked as announced in its documentation, i.e. shifting the > current line, which it doesn't, I changed that yesterday, so it now should work as documented. > a similar effect can be achieved more > easily by TAB presses). > > So I suggest to change the behavior of these commands to always work on > the region, whether it is active or not, or to provide a configuration > option which can enable such a behavior. Isn't that shift behavior something that should be done via rectangles? IIRC, someone even proposed to keep the region active after the command completes in order to apply a second shift step if needed. martin From pdm@zamazal.org Sat Feb 21 06:59:17 2009 Received: (at 2421) by emacsbugs.donarmstrong.com; 21 Feb 2009 14:59:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from zamazal.org (ip51.strelice.net [217.66.176.51]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1LExEJb027409 for <2421@emacsbugs.donarmstrong.com>; Sat, 21 Feb 2009 06:59:15 -0800 Received: from blackbird.nest.zamazal.org ([192.168.129.12]) by zamazal.org with esmtp (Exim 4.69) (envelope-from ) id 1LatJx-0003uQ-Aw; Sat, 21 Feb 2009 15:59:13 +0100 Received: from pdm by blackbird.nest.zamazal.org with local (Exim 4.69) (envelope-from ) id 1LatJt-0003uN-85; Sat, 21 Feb 2009 15:59:09 +0100 From: Milan Zamazal To: martin rudalics Cc: 2421@debbugs.gnu.org Subject: Re: bug#2421: 23.0.90; python-mode: Indent commands behavior References: <87k57k9je5.fsf@blackbird.nest.zamazal.org> <49A00B66.80908@gmx.at> X-Hashcash: 1:20:090221:rudalics@gmx.at::PgndsmqnW1pVVoiz:000+U0 X-Hashcash: 1:20:090221:2421@emacsbugs.donarmstrong.com::a2qzvePLlzPe2vfM:000000000000000000000000000000484k Date: Sat, 21 Feb 2009 15:59:09 +0100 In-Reply-To: <49A00B66.80908@gmx.at> (sfid-20090221_154024_475414_5AC6AA10) (martin rudalics's message of "Sat, 21 Feb 2009 15:10:46 +0100") Message-ID: <87ab8falaa.fsf@blackbird.nest.zamazal.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>>>> "mr" == martin rudalics writes: mr> Isn't that shift behavior something that should be done via mr> rectangles? Do you mean by the user? No, this would require marking the region on exact characters rather than lines, i.e. it would be less comfortable and would make the operation more visual than logical. `C-x TAB' is also not superfluous. mr> IIRC, someone even proposed to keep the region active after the mr> command completes in order to apply a second shift step if mr> needed. This would be OK for me. Regards, Milan Zamazal From rgm@gnu.org Sat Feb 21 11:41:22 2009 Received: (at control) by emacsbugs.donarmstrong.com; 21 Feb 2009 19:41:22 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1LJfKhJ003032 for ; Sat, 21 Feb 2009 11:41:21 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Laxgp-00065X-PA; Sat, 21 Feb 2009 14:39:07 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18848.22619.690330.1610@fencepost.gnu.org> Date: Sat, 21 Feb 2009 14:39:07 -0500 From: Glenn Morris To: control Subject: control message X-Debbugs-No-Ack: yes close 2228 close 2229 tags 2348 moreinfo reassign 2426 emacs,ns severity 2422 wishlist severity 2421 wishlist reassign 2402 emacs,ns reassign 2377 emacs,ns reassign 2375 emacs,ns tags 2365 moreinfo From rudalics@gmx.at Sun Feb 22 10:32:56 2009 Received: (at 2421) by emacsbugs.donarmstrong.com; 22 Feb 2009 18:32:56 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id n1MIWqwi025810 for <2421@emacsbugs.donarmstrong.com>; Sun, 22 Feb 2009 10:32:53 -0800 Received: (qmail invoked by alias); 22 Feb 2009 18:32:46 -0000 Received: from 62-47-42-137.adsl.highway.telekom.at (EHLO [62.47.42.137]) [62.47.42.137] by mail.gmx.net (mp069) with SMTP; 22 Feb 2009 19:32:46 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+tT21SBYmtu40x3tdeRGgFaWRC77Evz+mPzW11Ue LVnPZxsimiwVJ8 Message-ID: <49A199A0.2030505@gmx.at> Date: Sun, 22 Feb 2009 19:29:52 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Milan Zamazal CC: 2421@debbugs.gnu.org Subject: Re: bug#2421: 23.0.90; python-mode: Indent commands behavior References: <87k57k9je5.fsf@blackbird.nest.zamazal.org> <49A00B66.80908@gmx.at> <87ab8falaa.fsf@blackbird.nest.zamazal.org> In-Reply-To: <87ab8falaa.fsf@blackbird.nest.zamazal.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.72 > mr> Isn't that shift behavior something that should be done via > mr> rectangles? > > Do you mean by the user? No, this would require marking the region on > exact characters rather than lines, i.e. it would be less comfortable You're right that rect.el doesn't have suitable code for highlighting and dragging rectangles. cua-rect.el has two functions for shifting rectangles, but I don't know whether they could be used here. > and would make the operation more visual than logical. That was my intention. I don't know whether `python-shift-left' and `python-shift-right' are of any use without a prefix argument. With a prefix argument, they are simple wrappers for `indent-rigidly'. And `indent-rigidly' is a purely visual operation. That is, if indenting part of a program changes the semantics of the program, it's the user who's responsible, without any "logical" support from `python-mode'. But since I never use these functions you shouldn't take my remarks too seriously. Maybe you could propose a patch to provide the behavior you like. In any case, it might be better to use `use-region-p' instead of `mark-active' to be more consistent with Emacs 23. martin From pdm@zamazal.org Mon Feb 23 10:25:37 2009 Received: (at 2421) by emacsbugs.donarmstrong.com; 23 Feb 2009 18:25:37 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from zamazal.org (ip51.strelice.net [217.66.176.51]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1NIPYIw031736 for <2421@emacsbugs.donarmstrong.com>; Mon, 23 Feb 2009 10:25:35 -0800 Received: from blackbird.nest.zamazal.org ([192.168.129.12]) by zamazal.org with esmtp (Exim 4.69) (envelope-from ) id 1LbfUj-0001lF-Fx; Mon, 23 Feb 2009 19:25:33 +0100 Received: from pdm by blackbird.nest.zamazal.org with local (Exim 4.69) (envelope-from ) id 1LbfUe-0001lB-8n; Mon, 23 Feb 2009 19:25:28 +0100 From: Milan Zamazal To: martin rudalics Cc: 2421@debbugs.gnu.org Subject: Re: bug#2421: 23.0.90; python-mode: Indent commands behavior References: <87k57k9je5.fsf@blackbird.nest.zamazal.org> <49A00B66.80908@gmx.at> <87ab8falaa.fsf@blackbird.nest.zamazal.org> <49A199A0.2030505@gmx.at> Date: Mon, 23 Feb 2009 19:25:28 +0100 In-Reply-To: <49A199A0.2030505@gmx.at> (sfid-20090223_013312_112480_3DB6D4EE) (martin rudalics's message of "Sun, 22 Feb 2009 19:29:52 +0100") Message-ID: <87y6vxvwmf.fsf@blackbird.nest.zamazal.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= >>>>> "mr" == martin rudalics writes: mr> I don't know whether `python-shift-left' and mr> `python-shift-right' are of any use without a prefix argument. They are, I often use them after adding or removing a statement in a code. mr> With a prefix argument, they are simple wrappers for mr> `indent-rigidly'. Yes, this makes no sense. It would be more logical if they indented by (* python-indent count). mr> Maybe you could propose a patch to provide the behavior you mr> like. OK, see below for some suggestion. mr> In any case, it might be better to use `use-region-p' instead of mr> `mark-active' to be more consistent with Emacs 23. But then the indent commands would work only if transient-mark-mode was enabled, wouldn't they? 2009-02-23 Milan Zamazal * python.el (python-shift-left, python-shift-right): When called with a prefix argument, indent by that many levels, not columns. * python.el (python-shift-left, python-shift-right): Don't deactivate the active mark. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=python.el.patch --- python.el.orig 2009-02-23 19:06:19.000000000 +0100 +++ python.el 2009-02-23 19:18:37.000000000 +0100 @@ -2013,17 +2013,18 @@ (list (region-beginning) (region-end) current-prefix-arg) (list (line-beginning-position) (line-end-position) current-prefix-arg))) (if count - (setq count (prefix-numeric-value count)) + (setq count (* python-indent (prefix-numeric-value count))) (setq count python-indent)) - (when (> count 0) - (save-excursion - (goto-char start) - (while (< (point) end) - (if (and (< (current-indentation) count) - (not (looking-at "[ \t]*$"))) - (error "Can't shift all lines enough")) - (forward-line)) - (indent-rigidly start end (- count))))) + (let (deactivate-mark) + (when (> count 0) + (save-excursion + (goto-char start) + (while (< (point) end) + (if (and (< (current-indentation) count) + (not (looking-at "[ \t]*$"))) + (error "Can't shift all lines enough")) + (forward-line)) + (indent-rigidly start end (- count)))))) (add-to-list 'debug-ignored-errors "^Can't shift all lines enough") @@ -2036,10 +2037,11 @@ (if mark-active (list (region-beginning) (region-end) current-prefix-arg) (list (line-beginning-position) (line-end-position) current-prefix-arg))) - (if count - (setq count (prefix-numeric-value count)) - (setq count python-indent)) - (indent-rigidly start end count)) + (let (deactivate-mark) + (if count + (setq count (* python-indent (prefix-numeric-value count))) + (setq count python-indent)) + (indent-rigidly start end count))) (defun python-outline-level () "`outline-level' function for Python mode. --=-=-= Regards, Milan Zamazal --=-=-=-- From rudalics@gmx.at Tue Feb 24 05:45:21 2009 Received: (at 2421) by emacsbugs.donarmstrong.com; 24 Feb 2009 13:45:21 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id n1ODjCC0000756 for <2421@emacsbugs.donarmstrong.com>; Tue, 24 Feb 2009 05:45:14 -0800 Received: (qmail invoked by alias); 24 Feb 2009 13:45:06 -0000 Received: from 62-47-57-75.adsl.highway.telekom.at (EHLO [62.47.57.75]) [62.47.57.75] by mail.gmx.net (mp006) with SMTP; 24 Feb 2009 14:45:06 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/PzgV8qczPJjxWWZl1YbZDdmHDkKPBRRlnkqMjUk InuaA1092AZwlu Message-ID: <49A3F8C1.3000703@gmx.at> Date: Tue, 24 Feb 2009 14:40:17 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Milan Zamazal CC: 2421@debbugs.gnu.org Subject: Re: bug#2421: 23.0.90; python-mode: Indent commands behavior References: <87k57k9je5.fsf@blackbird.nest.zamazal.org> <49A00B66.80908@gmx.at> <87ab8falaa.fsf@blackbird.nest.zamazal.org> <49A199A0.2030505@gmx.at> <87y6vxvwmf.fsf@blackbird.nest.zamazal.org> In-Reply-To: <87y6vxvwmf.fsf@blackbird.nest.zamazal.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.68 > mr> I don't know whether `python-shift-left' and > mr> `python-shift-right' are of any use without a prefix argument. > > They are, I often use them after adding or removing a statement in a > code. I'm confused. Why don't you use TAB in that case? > mr> With a prefix argument, they are simple wrappers for > mr> `indent-rigidly'. > > Yes, this makes no sense. It would be more logical if they indented by > (* python-indent count). It might be even more logical to restrict ourselves to valid indentation points only. In any case we would need some feedback from `python-mode' users for such a change. The same goes for not deactivating the mark. > mr> In any case, it might be better to use `use-region-p' instead of > mr> `mark-active' to be more consistent with Emacs 23. > > But then the indent commands would work only if transient-mark-mode was > enabled, wouldn't they? The commands should DTRT when `transient-mark-mode' is enabled because it's the default with Emacs 23. That is, with `transient-mark-mode' on, these commands should operate on the region only if the mark is active and should respect `use-empty-active-region'. I have no idea what TRT is now when `transient-mark-mode' is off. You appear reluctant to use transient mark mode, I suppose ... martin From pdm@zamazal.org Tue Feb 24 06:58:31 2009 Received: (at 2421) by emacsbugs.donarmstrong.com; 24 Feb 2009 14:58:31 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from zamazal.org (ip51.strelice.net [217.66.176.51]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1OEwSnN019650 for <2421@emacsbugs.donarmstrong.com>; Tue, 24 Feb 2009 06:58:29 -0800 Received: from blackbird.nest.zamazal.org ([192.168.129.12]) by zamazal.org with esmtp (Exim 4.69) (envelope-from ) id 1Lbyjr-000278-13; Tue, 24 Feb 2009 15:58:27 +0100 Received: from pdm by blackbird.nest.zamazal.org with local (Exim 4.69) (envelope-from ) id 1Lbyjp-000275-MH; Tue, 24 Feb 2009 15:58:25 +0100 From: Milan Zamazal To: martin rudalics Cc: 2421@debbugs.gnu.org Subject: Re: bug#2421: 23.0.90; python-mode: Indent commands behavior References: <87k57k9je5.fsf@blackbird.nest.zamazal.org> <49A00B66.80908@gmx.at> <87ab8falaa.fsf@blackbird.nest.zamazal.org> <49A199A0.2030505@gmx.at> <87y6vxvwmf.fsf@blackbird.nest.zamazal.org> <49A3F8C1.3000703@gmx.at> Date: Tue, 24 Feb 2009 15:58:25 +0100 In-Reply-To: <49A3F8C1.3000703@gmx.at> (sfid-20090224_144517_892779_FFFFFFFFEFF219C2) (martin rudalics's message of "Tue, 24 Feb 2009 14:40:17 +0100") Message-ID: <87k57f7uge.fsf@blackbird.nest.zamazal.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>>>> "mr" == martin rudalics writes: mr> Why don't you use TAB in that case? Because I didn't know it can work on regions! Perhaps this makes the python-shift-* commands redundant for my use, I'll see. I'm sorry for the confusion. Regards, Milan Zamazal From pdm@zamazal.org Wed Mar 4 08:42:26 2009 Received: (at 2421) by emacsbugs.donarmstrong.com; 4 Mar 2009 16:42:26 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from zamazal.org (ip51.strelice.net [217.66.176.51]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n24GgNsd011723 for <2421@emacsbugs.donarmstrong.com>; Wed, 4 Mar 2009 08:42:24 -0800 Received: from blackbird.nest.zamazal.org ([192.168.129.12]) by zamazal.org with esmtp (Exim 4.69) (envelope-from ) id 1LeuAo-00063q-DO; Wed, 04 Mar 2009 17:42:22 +0100 Received: from pdm by blackbird.nest.zamazal.org with local (Exim 4.69) (envelope-from ) id 1LeuAi-00063n-7F; Wed, 04 Mar 2009 17:42:16 +0100 From: Milan Zamazal To: martin rudalics Cc: 2421@debbugs.gnu.org Subject: Re: bug#2421: 23.0.90; python-mode: Indent commands behavior References: <87k57k9je5.fsf@blackbird.nest.zamazal.org> <49A00B66.80908@gmx.at> <87ab8falaa.fsf@blackbird.nest.zamazal.org> <49A199A0.2030505@gmx.at> <87y6vxvwmf.fsf@blackbird.nest.zamazal.org> <49A3F8C1.3000703@gmx.at> Date: Wed, 04 Mar 2009 17:42:16 +0100 In-Reply-To: <49A3F8C1.3000703@gmx.at> (sfid-20090224_144517_892779_FFFFFFFFEFF219C2) (martin rudalics's message of "Tue, 24 Feb 2009 14:40:17 +0100") Message-ID: <87tz69w87r.fsf@blackbird.nest.zamazal.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>>>> "mr" == martin rudalics writes: mr> I don't know whether `python-shift-left' and mr> `python-shift-right' are of any use without a prefix argument. >> >> They are, I often use them after adding or removing a statement >> in a code. mr> I'm confused. Why don't you use TAB in that case? Well, actually TAB runs indent-region. But I need simple shift instead. Consider the following example: def foo(): for i in range(3): print i print i + 1 print i + 2 I just pasted the print lines from a differently indented code and want to fix the indentation by shifting the region of the print lines: def foo(): for i in range(3): print i print i + 1 print i + 2 TAB can't do it: def foo(): for i in range(3): print i print i + 1 print i + 2 Neither repeated pressing of C->: def foo(): for i in range(3): print i print i + 1 print i + 2 To get what I want I have to press `C-8 C->'. I don't like it, I'd like to call `M-x SOMETHING-shift-right' twice or `M-2 M-x SOMETHING-shift-right'. >> It would be more logical if they indented by (* python-indent >> count). mr> It might be even more logical to restrict ourselves to valid mr> indentation points only. Perhaps, but it's not that important. mr> In any case we would need some feedback from `python-mode' users mr> for such a change. The same goes for not deactivating the mark. If people like the current behavior, configuration options may be introduced. mr> I have no idea what TRT is now when `transient-mark-mode' is mr> off. Neither do I. Regards, Milan Zamazal From rudalics@gmx.at Thu Mar 5 11:00:35 2009 Received: (at 2421) by emacsbugs.donarmstrong.com; 5 Mar 2009 19:00:35 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id n25J0UpZ025359 for <2421@emacsbugs.donarmstrong.com>; Thu, 5 Mar 2009 11:00:32 -0800 Received: (qmail invoked by alias); 05 Mar 2009 19:00:24 -0000 Received: from 62-47-46-85.adsl.highway.telekom.at (EHLO [62.47.46.85]) [62.47.46.85] by mail.gmx.net (mp016) with SMTP; 05 Mar 2009 20:00:24 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18kvSJ9x48kWeSzpkJ303wUl9x3HxhqzcuROYv0cV NDAYskLNpKZkpK Message-ID: <49B020C1.5020501@gmx.at> Date: Thu, 05 Mar 2009 19:58:09 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Milan Zamazal CC: 2421@debbugs.gnu.org Subject: Re: bug#2421: 23.0.90; python-mode: Indent commands behavior References: <87k57k9je5.fsf@blackbird.nest.zamazal.org> <49A00B66.80908@gmx.at> <87ab8falaa.fsf@blackbird.nest.zamazal.org> <49A199A0.2030505@gmx.at> <87y6vxvwmf.fsf@blackbird.nest.zamazal.org> <49A3F8C1.3000703@gmx.at> <87tz69w87r.fsf@blackbird.nest.zamazal.org> In-Reply-To: <87tz69w87r.fsf@blackbird.nest.zamazal.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 > Well, actually TAB runs indent-region. But I need simple shift instead. > Consider the following example: > > def foo(): > for i in range(3): > print i > print i + 1 > print i + 2 > > I just pasted the print lines from a differently indented code and want > to fix the indentation by shifting the region of the print lines: > > def foo(): > for i in range(3): > print i > print i + 1 > print i + 2 > > TAB can't do it: > > def foo(): > for i in range(3): > print i > print i + 1 > print i + 2 We could pass the prefix argument to `indent-region' with the semantics that the latter ignores the mode-specific `indent-region-function' and calls `indent-line' for each line in the region instead. Alternatively, `python-indent-region' could, like `python-indent-line', remember whether the last command was an `indent-for-tab-command' and call `python-indent-line-1' with no argument for each line in the region. Obviously, the region would have to stay to make this practical. And in some pathological cases it might be hard to find the appropriate indentation points. Anyhow, I'm afraid that people won't approve such changes. > To get what I want I have to press `C-8 C->'. I don't like it, I'd like > to call `M-x SOMETHING-shift-right' twice or > `M-2 M-x SOMETHING-shift-right'. That's why I earlier said that some rectangle code should handle this. martin From pdm@zamazal.org Fri Mar 6 00:25:06 2009 Received: (at 2421) by emacsbugs.donarmstrong.com; 6 Mar 2009 08:25:06 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from zamazal.org (ip51.strelice.net [217.66.176.51]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n268P3UT003538 for <2421@emacsbugs.donarmstrong.com>; Fri, 6 Mar 2009 00:25:04 -0800 Received: from blackbird.nest.zamazal.org ([192.168.129.12]) by zamazal.org with esmtp (Exim 4.69) (envelope-from ) id 1LfVMc-00042M-6i; Fri, 06 Mar 2009 09:25:02 +0100 Received: from pdm by blackbird.nest.zamazal.org with local (Exim 4.69) (envelope-from ) id 1LfVMV-00042J-W2; Fri, 06 Mar 2009 09:24:56 +0100 From: Milan Zamazal To: martin rudalics Cc: 2421@debbugs.gnu.org Subject: Re: bug#2421: 23.0.90; python-mode: Indent commands behavior References: <87k57k9je5.fsf@blackbird.nest.zamazal.org> <49A00B66.80908@gmx.at> <87ab8falaa.fsf@blackbird.nest.zamazal.org> <49A199A0.2030505@gmx.at> <87y6vxvwmf.fsf@blackbird.nest.zamazal.org> <49A3F8C1.3000703@gmx.at> <87tz69w87r.fsf@blackbird.nest.zamazal.org> <49B020C1.5020501@gmx.at> Date: Fri, 06 Mar 2009 09:24:55 +0100 In-Reply-To: <49B020C1.5020501@gmx.at> (sfid-20090305_200039_306895_0F17804A) (martin rudalics's message of "Thu, 05 Mar 2009 19:58:09 +0100") Message-ID: <87y6vjrrc8.fsf@blackbird.nest.zamazal.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hm, it seems the easiest solution will be that I put my own definitions to ~/.emacs. Regards, Milan Zamazal From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 08 17:43:39 2012 Received: (at 2421) by debbugs.gnu.org; 8 Oct 2012 21:43:39 +0000 Received: from localhost ([127.0.0.1]:34315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TLL6x-0004KM-Hc for submit@debbugs.gnu.org; Mon, 08 Oct 2012 17:43:39 -0400 Received: from mail-gg0-f172.google.com ([209.85.161.172]:56092) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TLL6u-0004K4-RW for 2421@debbugs.gnu.org; Mon, 08 Oct 2012 17:43:37 -0400 Received: by mail-gg0-f172.google.com with SMTP id i4so1374348ggn.3 for <2421@debbugs.gnu.org>; Mon, 08 Oct 2012 14:43:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=guQQr/8WT8gfa6SFMILW25uTg0wd+NgArme4M7NsIJs=; b=ijNaPA+uV6g0JF+iRog97o2slQX0Me8GPAOUA2JZ7MnC9rpegaKGpKPnvheDTR0qv4 2qwY9XN0FoWh+CtByZ7hhPaAAKDUAghRmJZ+E2TLk06/yQLis3AMXLqYfO6l8+JBjM5c OW7UaUjd7a3SMmLD63vDls8eQ9xNEZVRDzvV5xuSMdjrxt+pn4SH3kd5DS5FEC6eW0IS gymOGuXYmkkgS9jlMGQzxJrYgyPD4TivjXL3pnmODeTEE1DK9BHb9HpHREJarQqiQaTs lm65sqNt3pk0PrqC5B0DWY0R+9auQ8SZh14qPJtZRMFEY3+N4V1M7hSFpfnIM6XMCBvo BV2w== Received: by 10.236.173.164 with SMTP id v24mr17729226yhl.60.1349732581656; Mon, 08 Oct 2012 14:43:01 -0700 (PDT) Received: from [192.168.1.25] (host235.186-125-121.telecom.net.ar. [186.125.121.235]) by mx.google.com with ESMTPS id f15sm18194949anm.9.2012.10.08.14.43.00 (version=SSLv3 cipher=OTHER); Mon, 08 Oct 2012 14:43:01 -0700 (PDT) Message-ID: <507348FF.6040603@anue.biz> Date: Mon, 08 Oct 2012 18:43:27 -0300 From: =?ISO-8859-1?Q?Fabi=E1n_Ezequiel_Gallina?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120910 Thunderbird/15.0.1 MIME-Version: 1.0 To: 2421@debbugs.gnu.org Subject: 23.0.90; python-mode: Indent commands behavior Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlc4s5miFvCVjTyKs02HBlk/9sf2a+4GPCiXV3eYZuSQ1eDlKLCnArqgPpLI66+YDm6imYP X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 2421 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) Trunk's python mode works the same whether the region is active or not. Closing this one. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 08 17:44:06 2012 Received: (at control) by debbugs.gnu.org; 8 Oct 2012 21:44:06 +0000 Received: from localhost ([127.0.0.1]:34319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TLL7N-0004LV-SX for submit@debbugs.gnu.org; Mon, 08 Oct 2012 17:44:06 -0400 Received: from mail-yh0-f44.google.com ([209.85.213.44]:53486) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TLL7M-0004Km-8A for control@debbugs.gnu.org; Mon, 08 Oct 2012 17:44:04 -0400 Received: by mail-yh0-f44.google.com with SMTP id 56so1141727yhq.3 for ; Mon, 08 Oct 2012 14:43:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:content-type :content-transfer-encoding:x-gm-message-state; bh=zXlGKxcMJGZyCl1M4Hfab2Lq+x8aI8FgII2OAohG+oM=; b=IEMNZYKFKTUCyMN2TMXi2yZP+Lhb97REdlBTo2tiC7k9TUoajL8jeKz3d2IoWELKAD ju6zWBcFeYIyHNuP7trnU+ZNUs4jMJTl7d1mOwE6d5xg9K47sL9Vmh45IdEmAZ7t8NMc MKuijpwFNp+/4CQHoBnymrRnnF5NRzN+naM2OHTt5qWCARM1x2dcPQoCkq+p/fLr4/GE 8xm1NolcTKvXgyM8NEDpG9YVoJpqbrZ3gAnkt0LnNV/i0/Rrj/XzdHqFq+WADjmRxjYi mmNEYLyXSPDFc1zps7tCplovcN6CVTS2ToHyVjkeevzAs7OoXySv+B5Zh6ujGJdOTVDk KeTA== Received: by 10.236.143.237 with SMTP id l73mr17225203yhj.68.1349732609194; Mon, 08 Oct 2012 14:43:29 -0700 (PDT) Received: from [192.168.1.25] (host235.186-125-121.telecom.net.ar. [186.125.121.235]) by mx.google.com with ESMTPS id c12sm3287762ang.14.2012.10.08.14.43.27 (version=SSLv3 cipher=OTHER); Mon, 08 Oct 2012 14:43:28 -0700 (PDT) Message-ID: <5073491B.8020303@anue.biz> Date: Mon, 08 Oct 2012 18:43:55 -0300 From: =?ISO-8859-1?Q?Fabi=E1n_Ezequiel_Gallina?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120910 Thunderbird/15.0.1 MIME-Version: 1.0 To: control@debbugs.gnu.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmuHnLFUcE/ZeyRgK47+tlzkLOgnsShLvXO8LIlzuhtBmKlGnodMjOWGh/wFX2qlnQSAdJI X-Spam-Score: 4.9 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close #2421 [...] Content analysis details: (4.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.0 GOT_NO_SUBJECT No real subject -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.213.44 listed in list.dnswl.org] 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] 1.8 MISSING_SUBJECT Missing Subject: header X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 4.9 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close #2421 [...] Content analysis details: (4.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.213.44 listed in list.dnswl.org] 3.0 GOT_NO_SUBJECT No real subject 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] 1.8 MISSING_SUBJECT Missing Subject: header 0.0 TVD_SPACE_RATIO TVD_SPACE_RATIO close #2421 From unknown Mon Jun 23 11:27:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 06 Nov 2012 12:24:04 +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