all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Warren Harris <warrensomebody@gmail.com>
To: David Reitter <david.reitter@gmail.com>
Cc: 6057@debbugs.gnu.org
Subject: bug#6057: 23: py-indent-region broken
Date: Tue, 27 Apr 2010 19:11:49 -0700	[thread overview]
Message-ID: <203F1D0B-5CD4-4351-8C67-29A5043F74F8@gmail.com> (raw)
In-Reply-To: <8554C113-BAB1-4A76-BA32-9AB2FC7FE9B7@gmail.com>

David,

Thanks for filing this against gnu emacs. A couple of other things to  
note (if they're not apparent already):

1. python-mode now seems to be indenting automatically, without  
hitting tab -- You'll notice this whenever breaking a line in the  
middle by hitting return. This is a change from the previous behavior.  
(This one doesn't matter to me one way or the other... but I'm not  
sure the change was intentional.)

2. indentation is *extremely* slow -- I routinely have one-line nested  
python dictionaries (often many KB in length) that I'd like format,  
and I do this via keyboard macro that searches for the commas and  
inserts returns after them. Doing this in the latest version of  
aquamacs will max out my cpu for many minutes on end. The previous  
version could do this very quickly.

Warren


On Apr 27, 2010, at 6:50 PM, David Reitter wrote:

> X-Debbugs-Cc: Warren Harris <warrensomebody@gmail.com>
>
> py-indent-region seems dysfunctional when we're at column 0.
>
> Enter this:
>
> if 1=1:
> print 5
> print 8
> if 1=1:
>    print 6
> else:
>    print 6
>    print 5
>
> Then mark lines  2-5 (incl), which could be seen as a consistently  
> indented block of code that was pasted there. C-c TAB should now  
> shift it to the right, but it does nothing.
>
> Contrast this with a situation where the block is already indented:
>
> if 0=0:
>    if 1=1:
>    print 5
>    print 8
>    if 1=1:
>        print 6
> else:
>    print 6
>    print 5
>
> Select lines 3-6 (incl) and hit C-c TAB.  Works.
>
> This is python.el from lisp/progmodes.
>
> Begin forwarded message:
>
>> From: Warren Harris <warren@metaweb.com>
>> Date: April 27, 2010 6:41:23 PM EDT
>> To: Bug reports for Aquamacs Emacs <aquamacs-bugs@aquamacs.org>
>> Cc: David Reitter <david.reitter@gmail.com>
>> Subject: Re: [Aquamacs-bugs] 23.1.93; cursor column position not  
>> preserved across short lines
>
>
>
>> 3. indent-region in python mode does nothing. (This happens in  
>> 2.0b5 too.) However, line-by-line indention (with tab) works.
>
>
>
> In GNU Emacs 23.1.96.48 (x86_64-apple-darwin10.3.0, NS apple- 
> appkit-1038.29)
> of 2010-04-26 on scarlett.local - Aquamacs Distribution 2.0preview6
> Windowing system distributor `Apple', version 10.3.1038
> configured using `configure  '--with-ns''
>
> 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_US.UTF-8
>  value of $XMODIFIERS: nil
>  locale-coding-system: utf-8-unix
>  default enable-multibyte-characters: t
>
> Major mode: Python
>
> Minor modes in effect:
>  shell-dirtrack-mode: t
>  diff-auto-refine-mode: t
>  which-function-mode: t
>  savehist-mode: t
>  smart-frame-positioning-mode: t
>  aquamacs-autoface-mode: t
>  recentf-mode: t
>  osx-key-mode: t
>  tabbar-mwheel-mode: t
>  tabbar-mode: t
>  show-paren-mode: t
>  delete-selection-mode: t
>  pc-selection-mode: t
>  cua-mode: t
>  tooltip-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
>  auto-encryption-mode: t
>  auto-compression-mode: t
>  column-number-mode: t
>  line-number-mode: t
>  transient-mark-mode: t
>
> Recent input:
> - I N D E N T - R E G <tab> <return> ^C <tab> <down-mouse-1>
> <mouse-movement> <mouse-1> <switch-frame> <down-mouse-1>
> <mouse-1> <double-down-mouse-1> <mouse-movement> <mouse-movement>
> <double-drag-mouse-1> <down-mouse-1> <mouse-movement>
> <drag-mouse-1> ^H F <return> <wheel-down> <wheel-down>
> <wheel-down> <double-wheel-down> <wheel-down> <double-wheel-down>
> <wheel-down> <double-wheel-down> <wheel-down> <double-wheel-down>
> <switch-frame> <up> <up> <up> <up> <S-down> ^C <tab>
> <up> <up> <S-down> <S-down> ^C <tab> <up> <S-down>
> <S-down> ^C <tab> <down> <up> <up> <left> <backspace>
> <backspace> <backspace> <up> <right> <down> E L S E
> : <return> P R I N T SPC 6 <up> <up> <up> <down> <return>
> P R I N T SPC 8 <return> I F SPC 1 = 1 : <return> <tab>
> P R I N T SPC 6 <up> <up> <up> <up> <up> <right> <down>
> <S-down> <S-down> <S-down> <S-down> ^C <tab> <up> <up>
> <up> <up> <up> <S-down> <S-down> <S-down> <S-down>
> <S-down> ^C <tab> <switch-frame> <wheel-down> <double-wheel-down>
> <triple-wheel-down> <wheel-down> <wheel-down> <wheel-down>
> <wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
> <triple-wheel-up> <wheel-down> <double-wheel-down>
> <triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
> <switch-frame> ^C > <up> <up> <up> <up> <up> <up> <down>
> <up> I F SPC 0 = 0 : <right> <S-down> <S-down> <S-down>
> <S-down> <up> <up> <up> <S-down> <S-down> <S-down>
> <S-down> ^C <tab> <S-up> <S-up> <S-up> <S-up> ^C <tab>
> <up> ⌘Z <up> <up> <up> <up> <up> <up> <up> <S-down>
> <backspace> <S-down> <S-down> <S-down> <S-down> <S-down>
> ^C < <S-up> <S-up> <S-up> <S-up> <S-up> ^C <tab> <S-down>
> ^C <tab> <down> <up> <down> <down> <down> <up> <up>
> <up> SPC ⌘Z ⌘A ⌘C <ns-application-activated> <down-mouse-1>
> <mouse-movement> <mouse-1> <down-mouse-1> <mouse-1>
> <return> <up> I F SPC 0 = 0 : <right> <S-down> <S-down>
> <S-down> <S-down> <S-down> ^C > ⌘A ⌘C <ns-application-activated>
> <down> <down> <S-down> <S-down> <S-down> <S-down> ^C
> <tab> ⌘Z <S-up> <S-up> <down> <up> <up> <up> <up> <S-down>
> <S-down> <S-down> <S-down> <S-down> ^C <tab> ^C <tab>
> <up> ⌘Z ⌘Z ⌘Z ⌘Z <down> <S-down> <S-down> <S-down>
> <S-down> ^C <tab> <ns-application-activated> <menu-bar>
> <help-menu> <bug-diagnosis> <send-emacs-bug-report
>>
>
> Recent messages:
> Undo...
> Undo!
> Undo...
> Undo!
> Undo...
> Undo!
> Undo...
> Undo!
> Undo...
> Undo!
>
> Load-path shadows:
> /Users/dr/Library/Preferences/Aquamacs Emacs/Recent Files hides / 
> Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/Recent  
> Files
> /Users/dr/Library/Preferences/Aquamacs Emacs/Preferences hides / 
> Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/ 
> Preferences
> /Users/dr/Library/Preferences/Aquamacs Emacs/places hides /Users/dr/ 
> Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/places
> /Users/dr/Library/Preferences/Aquamacs Emacs/minibuffer-history  
> hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/ 
> minibuffer-history
> /Users/dr/Library/Preferences/Aquamacs Emacs/frame-positions hides / 
> Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/frame- 
> positions
> /Users/dr/Library/Preferences/Aquamacs Emacs/customizations hides / 
> Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/ 
> customizations
> /Users/dr/Library/Application Support/Aquamacs Emacs/JDEE/site-start  
> hides /Library/Application Support/Aquamacs Emacs/SLIME/site-start
> /Users/dr/Library/Application Support/Aquamacs Emacs/JDEE/site-start  
> hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/ 
> aquamacs/site-start
>
> Features:
> (shadow sort mail-extr message ecomplete rfc822 mml mml-sec
> password-cache mm-decode mm-bodies mm-encode mailcap mail-parse  
> rfc2231
> rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
> mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util hashcash
> mail-utils emacsbug jka-compr find-func python-mode info-look info
> ansi-color compile animate eldoc slime-banner slime-asdf slime-fancy
> slime-fontifying-fu slime-package-fu slime-references slime-xref- 
> browser
> slime-scratch slime-presentations slime-highlight-edits slime-fuzzy
> slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc
> slime-parse slime-repl slime derived apropos edmacro kmacro hideshow
> hyperspec ess-help skeleton newcomment ess-toolbar ess-mous mouseme
> browse-url ess-menu ess-swv ess-noweb noweb-font-lock-mode essl-bugs
> essd-omg essl-omg essd-els essd-sas essl-sas essa-sas executable shell
> essd-arc essd-vst essd-xls essl-lsp essd-sta essl-sta make-regexp
> essd-sp6 essd-sp5 essd-sp3 essd-r essd-r-args essl-s ess-inf ess-utils
> comint ess-mode noweb-mode ess ess-cust ess-emcs ess-site cc-mode
> cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
> log-edit ring pcvs-util add-log diff-mode vc vc-dispatcher pp
> multi-isearch vc-git which-func imenu slime-autoloads load-emacs- 
> plugins
> aquamacs-mode-defaults auctex-config server tex-site smart-dnd
> aquamacs-aux savehist mouse-sel one-buffer-one-frame
> smart-frame-positioning drews_init color-theme-autoloads saveplace
> visual-line aquamacs-bug aquamacs-autoface-mode aquamacs-editing
> sendmail recentf tree-widget cus-edit osxkeys emulate-mac-keyboard- 
> mode
> frame-cmds strings misc-fns thingatpt+ thingatpt frame-fns avoid
> aquamacs-mac-fontsets fit-frame aquamacs-frame-setup aquamacs-tabbar
> tabbar-window cl cl-19 tabbar easy-mmode cus-start cus-load
> load-emacs-pre-plugins aquamacs-site-start cocoa-compatibility  
> filladapt
> aquamacs-redo check-for-updates aquamacs-menu osx_defaults
> aquamacs-tool-bar aquamacs mac-extra-functions aquamacs-tools
> aquamacs-macros parse-time timezone time-date paren delsel pc-select
> cua-base wid-edit regexp-opt advice advice-preload byte-opt bytecomp
> byte-compile debug help-fns help-mode view image-file disp-table  
> tooltip
> ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar  
> dnd
> fontset image fringe lisp-mode register page menu-bar rfn-eshadow  
> timer
> select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu
> font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
> thai tai-viet lao korean japanese hebrew greek romanian slovak czech
> european ethiopic indian cyrillic chinese case-table epa-hook
> jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces
> cus-face files text-properties overlay md5 base64 format env code- 
> pages
> mule custom widget hashtable-print-readable backquote
> make-network-process ns multi-tty emacs)
>
> Command line: (/Users/dr/ae.git/nextstep/Aquamacs.app/Contents/MacOS/ 
> Aquamacs)
>
> PATH: /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/ 
> opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/ 
> Versions/Current/bin:/opt/local/lib/postgresql82/bin:/opt/local/bin:/ 
> opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/ 
> local/git/bin:/usr/texbin:/usr/X11/bin:/Users/dr/Applications:/Users/ 
> dr/Applications/bin:/Users/dr/Projects/openccg/bin:/usr/texbin/ 
> powerpc-apple-darwin-current:/usr/local/git/bin:/Developer/Platforms/ 
> iPhoneFOSS.platform/Developer/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ 
> texbin:/usr/local/texlive/2009/bin
>
> exec-path: (/opt/local/bin /opt/local/sbin /opt/local/bin /opt/local/ 
> sbin /opt/local/bin /opt/local/sbin /Library/Frameworks/ 
> Python.framework/Versions/Current/bin /opt/local/lib/postgresql82/ 
> bin /opt/local/bin /opt/local/sbin /usr/bin /bin /usr/sbin /sbin / 
> usr/local/bin /usr/local/git/bin /usr/texbin /usr/X11/bin /Users/dr/ 
> Applications /Users/dr/Applications/bin /Users/dr/Projects/openccg/ 
> bin /usr/texbin/powerpc-apple-darwin-current /usr/local/git/bin / 
> Developer/Platforms/iPhoneFOSS.platform/Developer/bin /usr/bin /bin / 
> usr/sbin /sbin /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/MacOS/ 
> bin /usr/local/texlive/2009/bin)
>
>







  reply	other threads:[~2010-04-28  2:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BFFD276B-0D65-4753-8C1C-DD7F62E9E1F1@metaweb.com>
2010-04-28  1:50 ` bug#6057: 23: py-indent-region broken David Reitter
2010-04-28  2:11   ` Warren Harris [this message]
2012-12-12 21:09   ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=203F1D0B-5CD4-4351-8C67-29A5043F74F8@gmail.com \
    --to=warrensomebody@gmail.com \
    --cc=6057@debbugs.gnu.org \
    --cc=david.reitter@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.