From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Re: python-mode: keep mark when shifting [patch] Date: Mon, 13 Mar 2006 11:34:07 +0000 Message-ID: <06D1482E-BC8E-4A14-B687-348392FC25EE@gmail.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1142249676 13049 80.91.229.2 (13 Mar 2006 11:34:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Mar 2006 11:34:36 +0000 (UTC) Cc: henrik.enberg@telia.com, Richard Stallman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 13 12:34:33 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FIlJl-00048k-Pg for ged-emacs-devel@m.gmane.org; Mon, 13 Mar 2006 12:34:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FIlJl-0002P9-6N for ged-emacs-devel@m.gmane.org; Mon, 13 Mar 2006 06:34:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FIlJX-0002P4-20 for emacs-devel@gnu.org; Mon, 13 Mar 2006 06:34:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FIlJT-0002Os-Ci for emacs-devel@gnu.org; Mon, 13 Mar 2006 06:34:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FIlJT-0002Op-1U for emacs-devel@gnu.org; Mon, 13 Mar 2006 06:34:11 -0500 Original-Received: from [64.233.166.180] (helo=pproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FIlNQ-0000GH-GH for emacs-devel@gnu.org; Mon, 13 Mar 2006 06:38:16 -0500 Original-Received: by pproxy.gmail.com with SMTP id z74so852979pyg for ; Mon, 13 Mar 2006 03:34:10 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=spCGhZ8IMPoLkZs8iNCVvTfokCnLgaqrxwTuX2gifzxklecSnVRSJPFPIKFeJYqfiSyQ3XIP68buW7vvFSV212OtgdX7OYWHdeA+FI6NHekTH8vGAI7IMtd31ucX6mQpnFBD95SAGmc7R7zQqpNsmDPEy/60YdOG2LRqTOol9T4= Original-Received: by 10.65.197.4 with SMTP id z4mr1086094qbp; Mon, 13 Mar 2006 03:34:10 -0800 (PST) Original-Received: from ?129.215.174.81? ( [129.215.174.81]) by mx.gmail.com with ESMTP id f13sm961555qba.2006.03.13.03.34.08; Mon, 13 Mar 2006 03:34:09 -0800 (PST) In-Reply-To: Original-To: Dave Love X-Mailer: Apple Mail (2.746.2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51548 Archived-At: On 13 Mar 2006, at 00:22, Dave Love wrote: > The shift-region functions are inherited from the old python-mode.el > and may or may not really be a good idea. Consider the following use case: A code block is to be moved out of its context in order to stick it into a separate function. I yank it at its destination, write a "def newfunc():" at the top. But now I have to reindent it. Repeated use of C-c > and C-c < do that job just fine. However, because it is typically used repeatedly on the same region, deactivating the mark is very inconvenient. In other languages, I would use C-M-\ to re-indent automatically, which is impossible in Python, since indentation carries semantics and doesn't follow from the code. You mentioned that other indentation function (i.e. shift functions) also deactivate the mark. If that's so, I would argue that these should be changed as well for the same reason.