all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 23.0.60; python.el: auto-indentation doesn't work with continuation lines
@ 2008-04-24  7:24 ` Torsten Bronger
  2008-04-26 18:32   ` Edward O'Connor
  2008-05-29 23:20   ` bug#155: marked as done (23.0.60; python.el: auto-indentation doesn't work with continuation lines) Emacs bug Tracking System
  0 siblings, 2 replies; 11+ messages in thread
From: Torsten Bronger @ 2008-04-24  7:24 UTC (permalink / raw)
  To: emacs-pretest-bug

When I use a continuation line (either by parenthesis or by backslash) in a
Python program, the following, non-continuated line is erroneous indented.  For
example,

def open_file():
    file_ = open("file.txt",
                 "r")

makes <TAB> jump between column 0 and 17, although 4 would be correct.


In GNU Emacs 23.0.60.2 (x86_64-unknown-linux-gnu)
 of 2008-04-20 on wilson
Windowing system distributor `The Cygwin/X Project', version 11.0.60899901
configured using `configure  '--prefix=/usr/local/' '--mandir=/usr/local/share/man/' '--infodir=/usr/local/share/info/' '--with-x-toolkit=no' '--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-x''

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: de_DE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  global-auto-revert-mode: t
  savehist-mode: t
  display-time-mode: t
  desktop-save-mode: t
  mouse-wheel-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-compression-mode: t
  line-number-mode: t





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 23.0.60; python.el: auto-indentation doesn't work with continuation lines
  2008-04-24  7:24 ` 23.0.60; python.el: auto-indentation doesn't work with continuation lines Torsten Bronger
@ 2008-04-26 18:32   ` Edward O'Connor
  2008-04-26 18:51     ` Torsten Bronger
  2008-05-29 23:20   ` bug#155: marked as done (23.0.60; python.el: auto-indentation doesn't work with continuation lines) Emacs bug Tracking System
  1 sibling, 1 reply; 11+ messages in thread
From: Edward O'Connor @ 2008-04-26 18:32 UTC (permalink / raw)
  To: emacs-devel; +Cc: emacs-pretest-bug

Torsten Bronger wrote:

> When I use a continuation line (either by parenthesis or by backslash)
> in a Python program, the following, non-continuated line is erroneous
> indented. For example,
>
> def open_file():
>     file_ = open("file.txt",
>                  "r")
>
> makes <TAB> jump between column 0 and 17, although 4 would be correct.

Actually, that indentation is correct. The arguments in multi-line
function calls should be aligned in such a way.


Ted





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 23.0.60; python.el: auto-indentation doesn't work with continuation lines
  2008-04-26 18:32   ` Edward O'Connor
@ 2008-04-26 18:51     ` Torsten Bronger
  2008-04-28 17:06       ` David Robinow
  0 siblings, 1 reply; 11+ messages in thread
From: Torsten Bronger @ 2008-04-26 18:51 UTC (permalink / raw)
  To: emacs-devel; +Cc: emacs-pretest-bug

Hallöchen!

Edward O'Connor writes:

> Torsten Bronger wrote:
>
>> When I use a continuation line (either by parenthesis or by
>> backslash) in a Python program, the following, non-continuated
>> line is erroneous indented. For example,
>>
>> def open_file():
>>     file_ = open("file.txt",
>>                  "r")
>>
>> makes <TAB> jump between column 0 and 17, although 4 would be
>> correct.
>
> Actually, that indentation is correct. The arguments in multi-line
> function calls should be aligned in such a way.

I said, the "following, non-continuated line is erroneous indented":

def open_file():
    file_ = open("file.txt",
                 "r")
    here_to_proceed = True

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                                      Jabber ID: bronger@jabber.org
               (See http://ime.webhop.org for further contact info.)





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 23.0.60; python.el: auto-indentation doesn't work with continuation lines
  2008-04-26 18:51     ` Torsten Bronger
@ 2008-04-28 17:06       ` David Robinow
  2008-04-28 18:02         ` Glenn Morris
  0 siblings, 1 reply; 11+ messages in thread
From: David Robinow @ 2008-04-28 17:06 UTC (permalink / raw)
  To: emacs-devel

On Sat, Apr 26, 2008 at 2:51 PM, Torsten Bronger
<bronger@physik.rwth-aachen.de> wrote:
>  Edward O'Connor writes:
>  > Actually, that indentation is correct. The arguments in multi-line
>  > function calls should be aligned in such a way.
>
>  I said, the "following, non-continuated line is erroneous indented":
>
>  def open_file():
>     file_ = open("file.txt",
>                  "r")
>     here_to_proceed = True
>
To clarify, the last line above is aligned with the continued line
above it, rather than starting at the correct indentation level.
This is with Dave Love's python.el included in emacs.
 python-mode.el, by Tim Peters, Barry Warsaw et al, indents this correctly.

Recently there was some discussion about emacs switching to
python-mode.el (or perhaps trying to merge the two?)
The authors of python-mode.el, if I remember correctly, expressed
willingness to assign copyright.
What is the current status of python-mode.el ?

Is it proper to look at python-mode.el when making changes to python.el?

Is it a waste of time to fix bugs in python.el, since it will soon be replaced?

DR




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 23.0.60; python.el: auto-indentation doesn't work with continuation lines
  2008-04-28 17:06       ` David Robinow
@ 2008-04-28 18:02         ` Glenn Morris
  2008-04-28 18:41           ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2008-04-28 18:02 UTC (permalink / raw)
  To: David Robinow; +Cc: emacs-devel

"David Robinow" wrote:

> To clarify, the last line above is aligned with the continued line
> above it, rather than starting at the correct indentation level.
> This is with Dave Love's python.el included in emacs.
>  python-mode.el, by Tim Peters, Barry Warsaw et al, indents this correctly.

So does the python.el in Emacs 22, so it ought not to be too hard to fix.

> Recently there was some discussion about emacs switching to
> python-mode.el (or perhaps trying to merge the two?)
> The authors of python-mode.el, if I remember correctly, expressed
> willingness to assign copyright.

See etc/TODO:

  ** Possibly install python-mode in place of python.el, or combine the two.
  Someone needs to do the work of figuring out who all the non-trivial
  python-mode.el contributors are and getting assignments.
  http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg02156.html
  http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg02201.html
  http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg02489.html
  http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg02234.html

> Is it proper to look at python-mode.el when making changes to python.el?

IMO no, until the legal issues are fully sorted out. It's my
impression that this may be difficult.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 23.0.60; python.el: auto-indentation doesn't work with continuation lines
  2008-04-28 18:02         ` Glenn Morris
@ 2008-04-28 18:41           ` Stefan Monnier
  2008-04-28 19:53             ` Glenn Morris
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2008-04-28 18:41 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel, David Robinow

>> To clarify, the last line above is aligned with the continued line
>> above it, rather than starting at the correct indentation level.
>> This is with Dave Love's python.el included in emacs.
>> python-mode.el, by Tim Peters, Barry Warsaw et al, indents this correctly.
> So does the python.el in Emacs 22, so it ought not to be too hard to fix.

Could someone take a closer look (including trying it out with Dave
Love's version)?

>> Is it proper to look at python-mode.el when making changes to python.el?
> IMO no, until the legal issues are fully sorted out.

Indeed.


        Stefan




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 23.0.60; python.el: auto-indentation doesn't work with continuation lines
  2008-04-28 18:41           ` Stefan Monnier
@ 2008-04-28 19:53             ` Glenn Morris
  2008-04-29  1:03               ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2008-04-28 19:53 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, David Robinow

Stefan Monnier wrote:

> Could someone take a closer look (including trying it out with Dave
> Love's version)?

Syncing this change from DL's version fixes it:

*** python.el	17 Apr 2008 20:09:54 -0000	1.85
--- python.el	28 Apr 2008 19:51:29 -0000
***************
*** 977,985 ****
  multi-line bracketed expressions."
    (beginning-of-line)
    (python-beginning-of-string)
!   (let ((point (point)))
      (while (and (python-continuation-line-p)
! 		(> point (setq point (point))))
        (beginning-of-line)
        (if (python-backslash-continuation-line-p)
  	  (progn
--- 977,987 ----
  multi-line bracketed expressions."
    (beginning-of-line)
    (python-beginning-of-string)
!   (let (point)
      (while (and (python-continuation-line-p)
! 		(if point
! 		    (< (point) point)
! 		  t))
        (beginning-of-line)
        (if (python-backslash-continuation-line-p)
  	  (progn
***************
*** 987,993 ****
  	    (while (python-backslash-continuation-line-p)
  	      (forward-line -1)))
  	(python-beginning-of-string)
! 	(python-skip-out))))
    (back-to-indentation))
  
  (defun python-skip-out (&optional forward syntax)
--- 989,996 ----
  	    (while (python-backslash-continuation-line-p)
  	      (forward-line -1)))
  	(python-beginning-of-string)
! 	(python-skip-out))
!       (setq point (point))))
    (back-to-indentation))
  
  (defun python-skip-out (&optional forward syntax)




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 23.0.60; python.el: auto-indentation doesn't work with continuation lines
  2008-04-28 19:53             ` Glenn Morris
@ 2008-04-29  1:03               ` Stefan Monnier
  2008-04-29  3:45                 ` Glenn Morris
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2008-04-29  1:03 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel, David Robinow

>> Could someone take a closer look (including trying it out with Dave
>> Love's version)?

> Syncing this change from DL's version fixes it:

What do you mean by "syncing"?  Is it a change in DL's version that we
haven't yet merged, or is it a change that we introduced?


        Stefan




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 23.0.60; python.el: auto-indentation doesn't work with continuation lines
  2008-04-29  1:03               ` Stefan Monnier
@ 2008-04-29  3:45                 ` Glenn Morris
  2008-04-29  4:22                   ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2008-04-29  3:45 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, David Robinow

Stefan Monnier wrote:

> Is it a change in DL's version that we haven't yet merged

Yes.

I can merge this one if you like, but don't want to do a full update.

It looks like your "vendor branch" wasn't updated last time this was
done, so it's not immediately obvious how much needs to be done.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 23.0.60; python.el: auto-indentation doesn't work with continuation lines
  2008-04-29  3:45                 ` Glenn Morris
@ 2008-04-29  4:22                   ` Stefan Monnier
  0 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2008-04-29  4:22 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel, David Robinow

>> Is it a change in DL's version that we haven't yet merged
> Yes.

> I can merge this one if you like, but don't want to do a full update.

I'm all for a full update.  We should strive to minimize the differences
between the two versions.

> It looks like your "vendor branch" wasn't updated last time this was
> done, so it's not immediately obvious how much needs to be done.

Hmm.. the ChangeLog says:

2008-02-21  Dave Love  <fx@gnu.org>
	* progmodes/python.el: Merge from Dave Love's 2008-01-20 version.
[...]

So it looks like the vendor-branch was not used for that merge.


        Stefan




^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#155: marked as done (23.0.60; python.el: auto-indentation  doesn't work with continuation lines)
  2008-04-24  7:24 ` 23.0.60; python.el: auto-indentation doesn't work with continuation lines Torsten Bronger
  2008-04-26 18:32   ` Edward O'Connor
@ 2008-05-29 23:20   ` Emacs bug Tracking System
  1 sibling, 0 replies; 11+ messages in thread
From: Emacs bug Tracking System @ 2008-05-29 23:20 UTC (permalink / raw)
  To: Glenn Morris

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]


Your message dated Thu, 29 May 2008 19:10:03 -0400
with message-id <18495.14283.684156.693737@fencepost.gnu.org>
and subject line Re: 23.0.60; python.el: auto-indentation doesn't work with continuation lines 
has caused the Emacs bug report #155,
regarding 23.0.60; python.el: auto-indentation doesn't work with continuation lines
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 don@donarmstrong.com
immediately.)


-- 
155: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=155
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 6687 bytes --]

From: Torsten Bronger <bronger@physik.rwth-aachen.de>
To: emacs-pretest-bug@gnu.org
Cc: 
Subject: 23.0.60; python.el: auto-indentation doesn't work with continuation lines
Date: Thu, 24 Apr 2008 09:24:01 +0200 (CEST)
Message-ID: <20080424072401.69CDFE4497@wilson.homeunix.com>

When I use a continuation line (either by parenthesis or by backslash) in a
Python program, the following, non-continuated line is erroneous indented.  For
example,

def open_file():
    file_ = open("file.txt",
                 "r")

makes <TAB> jump between column 0 and 17, although 4 would be correct.


In GNU Emacs 23.0.60.2 (x86_64-unknown-linux-gnu)
 of 2008-04-20 on wilson
Windowing system distributor `The Cygwin/X Project', version 11.0.60899901
configured using `configure  '--prefix=/usr/local/' '--mandir=/usr/local/share/man/' '--infodir=/usr/local/share/info/' '--with-x-toolkit=no' '--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-x''

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: de_DE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  global-auto-revert-mode: t
  savehist-mode: t
  display-time-mode: t
  desktop-save-mode: t
  mouse-wheel-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-compression-mode: t
  line-number-mode: t





[-- Attachment #3: Type: message/rfc822, Size: 1286 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: 155-done@emacsbugs.donarmstrong.com
Subject: Re: 23.0.60; python.el: auto-indentation doesn't work with continuation lines
Date: Thu, 29 May 2008 19:10:03 -0400
Message-ID: <18495.14283.684156.693737@fencepost.gnu.org>


This has been fixed.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-05-29 23:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <18495.14283.684156.693737@fencepost.gnu.org>
2008-04-24  7:24 ` 23.0.60; python.el: auto-indentation doesn't work with continuation lines Torsten Bronger
2008-04-26 18:32   ` Edward O'Connor
2008-04-26 18:51     ` Torsten Bronger
2008-04-28 17:06       ` David Robinow
2008-04-28 18:02         ` Glenn Morris
2008-04-28 18:41           ` Stefan Monnier
2008-04-28 19:53             ` Glenn Morris
2008-04-29  1:03               ` Stefan Monnier
2008-04-29  3:45                 ` Glenn Morris
2008-04-29  4:22                   ` Stefan Monnier
2008-05-29 23:20   ` bug#155: marked as done (23.0.60; python.el: auto-indentation doesn't work with continuation lines) Emacs bug Tracking System

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.