#24 Dislike "working on region in file ...."

open
nobody
None
5
2004-12-11
2004-12-11
Bo Peng
No

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... " )
"\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
a=5
print a

I get in python buffer

>>> a=5
... print a
5
>>>

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.

Bo

Discussion

  • Skip Montanaro
    Skip Montanaro
    2004-12-12

    Logged In: YES
    user_id=44345

    I'm sorry, I don't quite understand what you're asking. Do you
    want more than the output in the output buffer? If so, I think the
    current behavior is correct. This is not an interactive terminal
    session, but the output of executing a chunk of Python code
    more-or-less as a batch sort of thing.