From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [joakim@verona.se: pyhon mode indentation problem] Date: Thu, 15 Jun 2006 11:09:49 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1150384219 31255 80.91.229.2 (15 Jun 2006 15:10:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Jun 2006 15:10:19 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 15 17:10:17 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 1FqtU2-0005ND-56 for ged-emacs-devel@m.gmane.org; Thu, 15 Jun 2006 17:10:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FqtU1-0004od-KU for ged-emacs-devel@m.gmane.org; Thu, 15 Jun 2006 11:10:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FqtTj-0004jE-N7 for emacs-devel@gnu.org; Thu, 15 Jun 2006 11:09:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FqtTi-0004ib-Kg for emacs-devel@gnu.org; Thu, 15 Jun 2006 11:09:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FqtTi-0004iN-AL for emacs-devel@gnu.org; Thu, 15 Jun 2006 11:09:50 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fqtd8-0001g6-Bo for emacs-devel@gnu.org; Thu, 15 Jun 2006 11:19:34 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1FqtTh-0006f6-F6; Thu, 15 Jun 2006 11:09:49 -0400 Original-To: emacs-devel@gnu.org 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:55913 Archived-At: Maybe someone would like to work on this. ------- Start of forwarded message ------- From: joakim@verona.se To: emacs-pretest-bug@gnu.org Date: Wed, 14 Jun 2006 13:02:36 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: pyhon mode indentation problem X-Spam-Status: No, score=0.2 required=5.0 tests=NO_REAL_NAME autolearn=no version=3.0.4 Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: python mode auto indentation has been broken for me for some time. I tried again today and it works better, but not much. I tried using emacs -nw -q and the little python program below. the problem is especially obvious on the line marked #1, or #2 Try moving the indentation to column 0. Emacs will say "sole indentation". I'm expecting indentation to go 4 spaces in under the "for" or the "if" statement. #!/usr/bin/python import os loop=0 missingfiles=0 for filenum in range(1,471): filename="%03d.pgm"%filenum #1 #print(filename) if not os.access(filename,os.F_OK): missingfiles=missingfiles+1 print "%s "%filename , loop=loop+1 if loop==20: loop=0 #2 print print print "missing files:%d"%missingfiles I had a look at python.el, and at line 510 there is code like: (or (cond ((python-open-block-statement-p t) python-indent) I would expect (python-open-block-statement-p t) to return t, and the indentation to occur, but it returns nil. However, I have no idea how this code is supposed to work, so take this with a grain of salt. If emacs crashed, and you have the emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/local/share/emacs/22.0.51/etc/DEBUG for instructions. In GNU Emacs 22.0.51.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars, multi-tty) of 2006-04-11 on kurono.home configured using `configure '--with-x-toolkit=lucid' '--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png'' 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 locale-coding-system: utf-8 default-enable-multibyte-characters: t Major mode: Python Minor modes in effect: display-time-mode: t show-paren-mode: t erc-truncate-mode: t erc-spelling-mode: t erc-log-mode: t erc-bbdb-mode: t erc-autoaway-mode: t erc-autojoin-mode: t erc-button-mode: t erc-ring-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-match-mode: t erc-fill-mode: t erc-stamp-mode: t erc-netsplit-mode: t erc-smiley-mode: t erc-irccontrols-mode: t senator-minor-mode: t which-function-mode: t semantic-idle-summary-mode: t semantic-idle-scheduler-mode: t auto-compression-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: C-s ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O B ESC O B ESC O B TAB TAB TAB TAB TAB TAB TAB TAB TAB TAB TAB C-x C-s C-x C-g ESC x e m a c s SPC b SPC u SPC DEL DEL r e SPC DEL C-a C-k r e p o r t SPC e m SPC b SPC RET Recent messages: Wrote /home/joakim/bin/missing No buffer matching `2', create one? (y or n) Quit Preparing diary... [2 times] Closes for filenum in range(1,471): Sole indentation [6 times] Wrote /home/joakim/bin/missing incremental parser error: "Wrong type argument: consp, nil" [3 times] Wrote /home/joakim/bin/missing [2 times] Loading emacsbug...done - -- Joakim Verona http://www.verona.se _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug ------- End of forwarded message -------