From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrea Crotti Newsgroups: gmane.emacs.help,gmane.comp.python.general Subject: Re: Emacs Python indention Date: Sun, 12 Jun 2011 12:59:55 +0200 Message-ID: References: <20110611224311.62a6e5b1@chaostal.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7BIT X-Trace: dough.gmane.org 1307876482 2865 80.91.229.12 (12 Jun 2011 11:01:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 12 Jun 2011 11:01:22 +0000 (UTC) Cc: python-list@python.org, help-gnu-emacs@gnu.org To: Bastian Ballmann Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 12 13:01:18 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QViPu-0004cs-Bb for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Jun 2011 13:01:18 +0200 Original-Received: from localhost ([::1]:49813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QViPt-0005iq-G1 for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Jun 2011 07:01:17 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QViOf-0005hS-Vm for help-gnu-emacs@gnu.org; Sun, 12 Jun 2011 07:00:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QViOd-0005Zt-UQ for help-gnu-emacs@gnu.org; Sun, 12 Jun 2011 07:00:01 -0400 Original-Received: from mta-1.ms.rz.rwth-aachen.de ([134.130.7.72]:64132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QViOd-0005ZV-J4 for help-gnu-emacs@gnu.org; Sun, 12 Jun 2011 06:59:59 -0400 Original-Received: from ironport-out-1.rz.rwth-aachen.de ([134.130.5.40]) by mta-1.ms.rz.RWTH-Aachen.de (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008)) with ESMTP id <0LMO00IR3BVXQXE0@mta-1.ms.rz.RWTH-Aachen.de> for help-gnu-emacs@gnu.org; Sun, 12 Jun 2011 12:59:57 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.65,354,1304287200"; d="scan'208";a="118055188" Original-Received: from relay-2.ms.rz.rwth-aachen.de (HELO relay.rwth-aachen.de) ([134.130.7.75]) by ironport-in-1.rz.rwth-aachen.de with ESMTP; Sun, 12 Jun 2011 12:59:56 +0200 Original-Received: from plaetekopp (plaetekopp.informatik.RWTH-Aachen.DE [137.226.59.97]) by relay.rwth-aachen.de (8.14.4+Sun/8.13.8/1) with ESMTP id p5CAxtb9024957; Sun, 12 Jun 2011 12:59:55 +0200 (CEST) Original-Received: from crotti by plaetekopp with local (Exim 4.72) (envelope-from ) id 1QViOZ-0000Ui-KB; Sun, 12 Jun 2011 12:59:55 +0200 In-reply-to: <20110611224311.62a6e5b1@chaostal.de> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 134.130.7.72 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81336 gmane.comp.python.general:692587 Archived-At: Bastian Ballmann writes: > Hi Emacs / Python coders, > > moving a region of python code for more than one indention in Emacs is > quite annoying, cause the python-shift-left and -right functions always > loose the mark and one has to reactivate it with \C-x \C-x or > guess how many indentions one want to make and do a \C-u \C-c > > > That were the only solutions I found on the net and well both are > not very comfortable so here's a fix for that. With the following code > you can use \C-c left and right to move your Python code to the left > and to the right :) > HF > > Basti [...] Nice functions... But actually I use python-mode.el from the bzr trunk and the indentation works really nicely, with C-c > or C-c <, and doesn't lose the mark. Another nice thing is that often TAB does also the right thing, indenting or unindenting if for example we add remove one level.