[IPython-user] Hate "working on region in file blah blah" when using python-mode.el

Bo Peng ben.bob at gmail.com
Sat Dec 11 01:45:57 CST 2004

These messages are totally meaningless. Why cannot it be the code
actually being executed? I have modified python-mode.el

==> insert the following line 
  (setq text-to-be-executed (concat
          (mapconcat 'identity (split-string (buffer-string) "\n")  "\n... " )
===> before this. (line 1700?)
        (write-region (point-min) (point-max) file nil 'nomsg))
      (if (not py-file-queue)
          (py-execute-file proc file)

===> and change 
       (msg (format "## working on region in file %s...\n" filename))
===> to (line 1303?)
        (msg text-to-be-executed)

so that when I execute a region
print a

I get in python buffer

>>> a=5
... print a

As a matter of fact, S-mode (for R or S-plus), matlab-mode all work in
this way and I see no reason why we should tolerate "working on region
in ..." any more.


More information about the IPython-user mailing list