GNU bug report logs -
#15137
python mode patch
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15137 in the body.
You can then email your comments to 15137 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15137
; Package
emacs
.
(Mon, 19 Aug 2013 21:53:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daniel Elliott <danelliottster <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 19 Aug 2013 21:53:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
I'm submitting a patch that has been tremendously helpful to me.
Please consider this for addition into the next release of the world's
most excellent editor.
2013-08-19 Dan Elliott <danelliottster <at> gmail.com>
* progmodes/python.el (python-shell-send-region): added fix
suggested by Barry Warsaw for python-mode.el to fix unexpected
indentation error w\
hen sending region to interpreter
=== modified file 'lisp/progmodes/python.el'
*** lisp/progmodes/python.el 2013-08-16 05:15:51 +0000
--- lisp/progmodes/python.el 2013-08-19 21:14:34 +0000
*************** Returns the output. See `python-shell-s
*** 2128,2134 ****
;; When sending a region, add blank lines for non sent code so
;; backtraces remain correct.
(make-string (1- line-num) ?\n))
! (buffer-substring start end))
nil t))
(defun python-shell-send-buffer (&optional arg)
--- 2128,2137 ----
;; When sending a region, add blank lines for non sent code so
;; backtraces remain correct.
(make-string (1- line-num) ?\n))
! ;; wrap with a conditional to avoid errors about python
unexpected indentation
! "if True:\n"
! (buffer-substring start end)
! "\n")
nil t))
(defun python-shell-send-buffer (&optional arg)
Thank you for all of your hard work.
- dan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15137
; Package
emacs
.
(Tue, 27 Aug 2013 01:55:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 15137 <at> debbugs.gnu.org (full text, mbox):
> ! (buffer-substring start end))
[...]
> ! ;; wrap with a conditional to avoid errors about python unexpected indentation
> ! "if True:\n"
> ! (buffer-substring start end)
> ! "\n")
That looks pretty good, thank you.
Fabián, could you take a look?
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15137
; Package
emacs
.
(Sat, 31 Aug 2013 12:45:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 15137 <at> debbugs.gnu.org (full text, mbox):
monnier <at> iro.umontreal.ca writes:
>> ! (buffer-substring start end))
> [...]
>> ! ;; wrap with a conditional to avoid errors about python unexpected indentation
>> ! "if True:\n"
>> ! (buffer-substring start end)
>> ! "\n")
>
> That looks pretty good, thank you.
> Fabián, could you take a look?
>
The idea is good but the patch needs bit more of work -- this approach
will work when an indented region is sent but won't when sending a
region which starts with no indentation at all. Also backtraces numbers
will be wrong for a -1 offset.
I'll push something for this soon.
Regards,
Fabián.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15137
; Package
emacs
.
(Sun, 01 Sep 2013 07:24:01 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
Am 31.08.2013 14:44, schrieb fabian <at> anue.biz:
>
> monnier <at> iro.umontreal.ca writes:
>
>>> ! (buffer-substring start end))
>> [...]
>>> ! ;; wrap with a conditional to avoid errors about python unexpected indentation
>>> ! "if True:\n"
>>> ! (buffer-substring start end)
>>> ! "\n")
>>
>> That looks pretty good, thank you.
>> Fabián, could you take a look?
>>
>
> The idea is good but the patch needs bit more of work -- this approach
> will work when an indented region is sent but won't when sending a
> region which starts with no indentation at all.
Right. Current python-mode.el shifts region-or-whatever-delivered left until it starts at column 0.
> Also backtraces numbers
> will be wrong for a -1 offset.
>
Correct. BTW there is still the Emacs count-lines bug: at BOL it counts one less than from secoond column.
> I'll push something for this soon.
>
>
> Regards,
> Fabián.
>
>
>
>
Reply sent
to
fgallina <at> gnu.org
:
You have taken responsibility.
(Mon, 02 Sep 2013 14:17:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Daniel Elliott <danelliottster <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 02 Sep 2013 14:17:03 GMT)
Full text and
rfc822 format available.
Message #19 received at 15137-done <at> debbugs.gnu.org (full text, mbox):
Solved this in revno 114108.
Regards,
Fabián.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15137
; Package
emacs
.
(Mon, 09 Sep 2013 14:17:03 GMT)
Full text and
rfc822 format available.
Message #22 received at 15137 <at> debbugs.gnu.org (full text, mbox):
Fabian,
You are correct on both counts. Please let me know if I can be of
assistance to you. Thanks for your time and effort.
- dan
On Sat, Aug 31, 2013 at 7:44 AM, <fabian <at> anue.biz> wrote:
>
> monnier <at> iro.umontreal.ca writes:
>
>>> ! (buffer-substring start end))
>> [...]
>>> ! ;; wrap with a conditional to avoid errors about python unexpected indentation
>>> ! "if True:\n"
>>> ! (buffer-substring start end)
>>> ! "\n")
>>
>> That looks pretty good, thank you.
>> Fabián, could you take a look?
>>
>
> The idea is good but the patch needs bit more of work -- this approach
> will work when an indented region is sent but won't when sending a
> region which starts with no indentation at all. Also backtraces numbers
> will be wrong for a -1 offset.
>
> I'll push something for this soon.
>
>
> Regards,
> Fabián.
Forcibly Merged 15137 15400.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 17 Sep 2013 15:58:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 16 Oct 2013 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 250 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.