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: Sat, 11 Mar 2006 17:12:10 +0000 Message-ID: <1C6A93B4-3088-40A5-8553-A72B4BD6582B@gmail.com> References: <8E0F3F60-B0BA-4F00-AA96-9A776781F331@gmail.com> <20060310204059.GA6292@rocksteady.printf.se> 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 1142110051 10410 80.91.229.2 (11 Mar 2006 20:47:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 11 Mar 2006 20:47:31 +0000 (UTC) Cc: Dave Love , Emacs-Devel ' Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 11 21:47:28 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 1FIAzi-0005Bo-9R for ged-emacs-devel@m.gmane.org; Sat, 11 Mar 2006 21:47:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FIAzh-0003yM-Rp for ged-emacs-devel@m.gmane.org; Sat, 11 Mar 2006 15:47:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FI7dc-00046r-44 for emacs-devel@gnu.org; Sat, 11 Mar 2006 12:12:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FI7dX-00046T-Vd for emacs-devel@gnu.org; Sat, 11 Mar 2006 12:12:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FI7dX-00046Q-Pq for emacs-devel@gnu.org; Sat, 11 Mar 2006 12:12:15 -0500 Original-Received: from [64.233.166.177] (helo=pproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FI7h6-0004Q7-G0 for emacs-devel@gnu.org; Sat, 11 Mar 2006 12:15:56 -0500 Original-Received: by pproxy.gmail.com with SMTP id z74so588352pyg for ; Sat, 11 Mar 2006 09:12:15 -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=RhVmYIcjTtK5cGgNOXA6aDqpm57ekoRBzBzVOWettLMQhwurqxgoxesrdokgHuXcCjKu+4McUSwccMWA0eoHteQep/Ht83yx+PPM6KjzeOcL+UT6IA2HhUQ8de3aM7s/IWRcI6BlibjryxRkaGEydFVb3disxnwAWLHwkXlUfVw= Original-Received: by 10.65.51.16 with SMTP id d16mr1428615qbk; Sat, 11 Mar 2006 09:12:15 -0800 (PST) Original-Received: from ?129.215.174.81? ( [129.215.174.81]) by mx.gmail.com with ESMTP id e14sm730574qba.2006.03.11.09.12.14; Sat, 11 Mar 2006 09:12:14 -0800 (PST) In-Reply-To: <20060310204059.GA6292@rocksteady.printf.se> Original-To: Henrik Enberg 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:51483 Archived-At: On 10 Mar 2006, at 20:40, Henrik Enberg wrote: > David Reitter writes: > >> The patch below fixed a behavior of python-mode that I've found >> somewhat annoying: it deactivates the mark whenever you do C-c < >> or C- >> c > to shift a block to the left or right. Because one commonly needs >> to do this several times in a row (checking visually in between), >> it's very unhelpful if the mark gets deactivated. > > Since other indent commands that works on a region in Emacs deactivate > the mark, wouldn't this be a bit surprising? I agree, as long as we are talking about manual indent commands, which are often applied repeatedly. (fill-paragraph, for example, can deactivate the mark of course.) The ideal situation in my view would be a default indent command which is modified by the major mode if necessary. That way, I wouldn't have to learn different key bindings for indent commands for programming in Perl and Python. This command can then ensure that the mark does not get deactivated.