From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#2381: marked as done (Python mode: python-shift-left and python-shift-right are not working if the region is inactive) Date: Fri, 20 Feb 2009 16:40:04 +0000 Message-ID: References: <499EDAEF.5010300@gmx.at> <3D92E094-6B70-4489-A162-A5050842D94C@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1235148004-9922-0" X-Trace: ger.gmane.org 1235148263 21999 80.91.229.12 (20 Feb 2009 16:44:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Feb 2009 16:44:23 +0000 (UTC) To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 20 17:45:38 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LaYV8-0002xW-G7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Feb 2009 17:45:22 +0100 Original-Received: from localhost ([127.0.0.1]:51382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaYTl-0007gT-Qv for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Feb 2009 11:43:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LaYTW-0007a7-Sn for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 11:43:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LaYTV-0007Zb-7D for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 11:43:42 -0500 Original-Received: from [199.232.76.173] (port=36949 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaYTV-0007ZW-1s for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 11:43:41 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:58261) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LaYTU-00060g-7t for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 11:43:40 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1KGhaxm011131; Fri, 20 Feb 2009 08:43:36 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n1KGe4Tj010040; Fri, 20 Feb 2009 08:40:04 -0800 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 2381 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:25519 Archived-At: This is a multi-part message in MIME format... ------------=_1235148004-9922-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Fri, 20 Feb 2009 17:31:43 +0100 with message-id <499EDAEF.5010300@gmx.at> and subject line Re: bug#2381: Python mode: python-shift-left and python-sh= ift-right are not working if the region is inactive has caused the Emacs bug report #2381, regarding Python mode: python-shift-left and python-shift-right are not wor= king if the region is inactive to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 2381: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D2381 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1235148004-9922-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 19 Feb 2009 06:54:03 +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.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1J6rxO3029166 for ; Wed, 18 Feb 2009 22:54:00 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1La2nH-00080L-0l for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 01:53:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1La2nE-0007xV-RA for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 01:53:58 -0500 Received: from [199.232.76.173] (port=32853 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1La2nE-0007xC-L2 for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 01:53:56 -0500 Received: from wa-out-1112.google.com ([209.85.146.176]:23711) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1La2nE-0006JI-4w for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 01:53:56 -0500 Received: by wa-out-1112.google.com with SMTP id k17so146656waf.26 for ; Wed, 18 Feb 2009 22:53:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:content-type :message-id:cc:content-transfer-encoding:from:subject:date:to :x-mailer; bh=JJm/gxg1ar/po7dyun7mECVUN4CqMuil5DJ3jce4Blk=; b=UUNWHjPYw7j1j9OSEYiznrC555UFgwhzAHwzcmNcmPk/dy5FlE6tENWWElWRHvTA85 AzCVHULaumQd1VPzrAtCR5ReH+wgAn/FLEC04WJzHyrTuqsA67O7BQUKYxXRLfTOcvfV 6ImZibudtux2LYRAm8GJnARrKGI6AGuasMzf0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:content-type:message-id:cc:content-transfer-encoding :from:subject:date:to:x-mailer; b=W122gkdn+OQ5VUih15s5nBYuoHwEfBXahY1flixYGdVhnnFj5rd+4PKRjVy0lRBBJA nXOp2DidUgiPiclFS1iczKPxLCWcnmrIJe8IaPhHCoknRN7QJCSXad8+l/Mpxk1K/3uG 1JYQ7bKX0VkHl1NgXEyPn5+y+lxjLcw53k1zQ= Received: by 10.115.92.2 with SMTP id u2mr3544584wal.137.1235026433213; Wed, 18 Feb 2009 22:53:53 -0800 (PST) Received: from ?140.253.32.116? (lois-ph.cat.csiro.au [140.253.32.116]) by mx.google.com with ESMTPS id m29sm1876396poh.20.2009.02.18.22.53.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Feb 2009 22:53:52 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <3D92E094-6B70-4489-A162-A5050842D94C@gmail.com> Cc: Guillaume Salagnac Content-Transfer-Encoding: 7bit From: Guillaume Salagnac Subject: Python mode: python-shift-left and python-shift-right are not working if the region is inactive Date: Thu, 19 Feb 2009 16:53:53 +1000 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.753.1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) In Python mode (the one provided by lisp/progmodes/python.el) there are two functions that look very handy for indenting/reindenting code : python-shift-left and python-shift-right. According to their documentation string, they can work either on the current active region, or on the current line if the region is not active. However, this latter feature does not seem to work properly. Steps to reproduce error: open emacs, type M-x python-mode, type some code, and try "C-c <" or "C-c >" with no active region. A simple fix seems to be achieved by replacing this "(point) (point)" default value, which is obviously empty, by "(line-beginning- position) (line-end-position)" in both functions. Cheers, -Guillaume Standard report-emacs-bug gibberish follows : In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.14.3) of 2008-10-14 on rothera, modified by Debian (emacs-snapshot package, version 1:20081013-1) Windowing system distributor `The X.Org Foundation', version 11.0.10502000 configured using `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '-- libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/ info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable- locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/ 23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/ 23.0.60/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with- x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux- gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Python Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x p y t h o n SPC m o d e i f SPC T r u e : x = 1 y = 1 C-c < M-x r e p o r t - e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. call-interactively: End of buffer [4 times] ------------=_1235148004-9922-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 2381-done) by emacsbugs.donarmstrong.com; 20 Feb 2009 16:33:43 +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.0 required=4.0 tests=GMAIL,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 n1KGXclm008628 for <2381-done@emacsbugs.donarmstrong.com>; Fri, 20 Feb 2009 08:33:40 -0800 Received: (qmail invoked by alias); 20 Feb 2009 16:33:32 -0000 Received: from 62-47-63-147.adsl.highway.telekom.at (EHLO [62.47.63.147]) [62.47.63.147] by mail.gmx.net (mp020) with SMTP; 20 Feb 2009 17:33:32 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19YxRhK689YeQjgtmBm1FWY5RzxURafUgKNG62JMh ZuTHS3sEJNm3lq Message-ID: <499EDAEF.5010300@gmx.at> Date: Fri, 20 Feb 2009 17:31:43 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 2381-done@emacsbugs.donarmstrong.com CC: Guillaume Salagnac Subject: Re: bug#2381: Python mode: python-shift-left and python-shift-right are not working if the region is inactive References: <3D92E094-6B70-4489-A162-A5050842D94C@gmail.com> In-Reply-To: <3D92E094-6B70-4489-A162-A5050842D94C@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.66 > In Python mode (the one provided by lisp/progmodes/python.el) there are > two functions that look very handy for indenting/reindenting code : > python-shift-left and python-shift-right. > > According to their documentation string, they can work either on the > current active region, or on the current line if the region is not > active. However, this latter feature does not seem to work properly. > > Steps to reproduce error: open emacs, type M-x python-mode, type some > code, and try "C-c <" or "C-c >" with no active region. > > A simple fix seems to be achieved by replacing this "(point) (point)" > default value, which is obviously empty, by "(line-beginning-position) > (line-end-position)" in both functions. I checked in your suggestion as * progmodes/python.el (python-shift-left, python-shift-right): When the mark is not active shift the current line. (Bug#2381) Suggested by Guillaume Salagnac Thanks for the report, martin. ------------=_1235148004-9922-0--