New problem with py-temp-directory

Bug #965762 reported by Richard Stanton
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

Using r911 under OS X, I have TMPDIR set to a valid directory, yet when I run a python script under python-mode then run

C-h v py-temp-directory

I get the result nil, which seems odd.

I tried running the following code, taken from python-mode.el, in my *scratch* buffer:

(defun ok '(lambda (x)
               (and x
                    (setq x (expand-file-name x)) ; always true
                    (file-directory-p x)
                    (file-writable-p x)
                    x)))

(defun fff ()
  "RHS test of temp-dir code"
    (or (funcall ok py-temp-directory)
        (funcall ok (getenv "TMPDIR"))
        (funcall ok (getenv "TEMP/TMP"))
        (funcall ok "/usr/tmp")
        (funcall ok "/tmp")
        (funcall ok "/var/tmp")
        (and (eq system-type 'darwin)
             (funcall ok "/var/folders"))
        (and (or (eq system-type 'ms-dos)(eq system-type 'ms-dos)(eq system-type 'windows-nt))
             (funcall ok (concat "c:" (py-separator-char) "Users" )))
    (error
     "Couldn't find a usable temp directory -- set `py-temp-directory'")))

(fff)
"/var/folders/zf/bgjm4tvs3wv_6q7_6z3b2nx00000gn/T/"

Note that this produces the desired result.

Changed in python-mode:
importance: Undecided → Medium
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.0.6
status: New → Confirmed
Changed in python-mode:
status: Confirmed → 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

Remote bug watches

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