[Python-mode] py-master-file behavior doesn't work
Andreas Röhler
andreas.roehler at online.de
Thu Jun 9 08:38:16 CEST 2011
Am 08.06.2011 16:16, schrieb Roman Dzvinkovsky:
> Hi,
>
> even when I set py-master-file variable locally in python buffer,
> py-execute-buffer and others still use temporary file, so I can't see
> context in IPython.
> Is it broken or I do something wrong?
>
> Thanks in advance,
> Roman.
>
Thanks for the report.
Made an entry in the bug-tracker at
https://bugs.launchpad.net/python-mode/+bug/794850
Please consider subscribing there in order to get upcoming discussions.
Could you try the patch against py-execute-region? (IMO exists a
respective bug still at py-execute-import-or-reload.)
;;;;;;;;;;;
=== modified file 'python-mode.el'
--- python-mode.el 2011-05-27 06:58:43 +0000
+++ python-mode.el 2011-06-09 05:38:38 +0000
@@ -1889,9 +1889,11 @@
(let* ((filename (expand-file-name py-master-file))
(buffer (or (get-file-buffer filename)
(find-file-noselect filename))))
- (set-buffer buffer)))
- (py-execute-region (point-min) (point-max) async)
- (pop-to-buffer old-buffer)))
+ (set-buffer buffer)
+ (py-execute-region (point-min) (point-max) async)
+ (pop-to-buffer old-buffer))
+ (py-execute-region (point-min) (point-max) async)
+ (pop-to-buffer old-buffer))))
(defun py-execute-import-or-reload (&optional async)
"Import the current buffer's file in a Python interpreter.
;;;;;;;;;;;
More information about the Python-mode
mailing list