windows problem with py-execute-directory

Bug #1071374 reported by Andreas Roehler
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

Am 25.10.2012 11:11, schrieb Andy Smith:> New question #212270 on python-mode.el:
> https://answers.launchpad.net/python-mode/+question/212270
>
>
> Hi All,
>
> On windows I've had to replace line 9274...
>
> (py-execute-directory (or (ignore-errors (file-name-directory (file-remote-p (buffer-file-name) 'localname)))(getenv "WORKON_HOME")(getenv "HOME")))
>
> with ...
>
> (py-execute-directory (or (file-name-directory buffer-file-name)(getenv "WORKON_HOME")(getenv "HOME")))
>
> i.e. the (ignore-errors .....) clause has failed on me.
>
> Without this modification I get....
>>>> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "c:/cygwin/tmp/python-6060ECQ.py", line 3, in <module>
> import os; os.chdir("C:\home\andy")
> WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\home\x07ndy'
>
> I'm not an elisp guru but I guess the ignore-errors clause is failing, and the 'or' is moving on to(getenv "HOME"), and some wierd escaping is happening on my home directory - "C:\home\andy".
>
> I don't know why (buffer-file-name) is in paren. It would make sense if if buffer-file-name is a function , but buffer-file-name is a variable so doesn't need to be wrapped in parens???!! Given that, i can't see how that clause can ever work.
>
> Take with a pinch of salt though - like i say I'm not an elisp guru by any stretch.
>
> Cheers,
>
> A.
>

Changed in python-mode:
milestone: none → 6.1.0
assignee: nobody → Andreas Roehler (a-roehler)
importance: Undecided → Medium
Revision history for this message
Andreas Roehler (a-roehler) wrote :

Hi,

seems you are using an older version.
May you check out the current trunk and try again?

Thanks,

Andreas

Changed in python-mode:
status: New → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.