From 6eb68dc25b13771811fa7afc2d0b3b90347a57b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabi=C3=A1n=20Ezequiel=20Gallina?= Date: Thu, 17 May 2012 00:03:01 -0300 Subject: [PATCH] Fixed pdb-track on Windows make-temp-file is returning the temp file path with the wrong type of slashes. --- lisp/progmodes/python.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 76901aaa69e..0611a4c9b45 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1061,6 +1061,17 @@ commands.)" (message (format "Sent: %s..." (buffer-substring (point-min) (line-end-position))))) + ;; Fix Windows/MS-DOS temp file path + (when (or (eq system-type 'windows-nt) + (eq system-type 'ms-dos) + (eq system-type 'cygwin)) + (setq temp-file + (with-temp-buffer + (insert temp-file) + (goto-char (point-min)) + (while (search-forward "/" nil t) + (replace-match "\\" nil t)) + (buffer-substring (point-min) (point-max))))) (with-current-buffer (process-buffer process) (setq inferior-python-mode-current-file current-file) (setq inferior-python-mode-current-temp-file temp-file)) -- 2.39.5