Barry A. Warsaw writes:
looks like the xemacsers have a patch. does that do the trick?
The patch posted yesterday fixes the problem starting a Python buffer
(thanks Kirill!). Python.exe was being passed as both argv[0] and
argv[1], which clearly was making the interpreter unhappy.
Getting "Execute buffer" to work requires this little patch of
mine - the tempfile name passed to Python has backslashes in it,
which again makes the interpreter unhappy. Even if I customize
py-temp-dir to be C:/tmp instead of C:\tmp the temp file name created
has the backslash instead of the forward slash. Here's a trivial
patch to get python-mode working. There's probably a better way to do
this, depending on whether we are on a Windows platform, etc, but the
string replacement I do should be a no-op on Unix platforms.
--- python-mode.el.orig Sat May 30 11:42:58 1998
+++ python-mode.el Sat May 30 11:43:06 1998
@@ -1176,10 +1176,10 @@
(format "python-%d" py-serial-number)
(setq py-serial-number (1+ py-serial-number)))
(make-temp-name "python")))
- (file (concat (file-name-as-directory py-temp-directory) temp)))
+ (file (replace-in-string (concat (file-name-as-directory py-temp-directory) temp)
"\\\\" "/" )))
(write-region start end file nil 'nomsg)
(cond
- ;; always run the code in it's own asynchronous subprocess
+ ;; always run the code in its own asynchronous subprocess
(async
(let* ((buf (generate-new-buffer-name py-output-buffer)))
(start-process "Python" buf py-python-command "-u" file)