>>>>> "Rick" == Rick Hanson <rick@tamos.net> writes:
Rick> You say that the pre-condition is that you don't have write
Rick> access to '/'
Correct.
Rick> and then you're trying to write a file (via
Rick> 'write-image') into '/'?
Wrong. I'm trying to write a file via write-image into my current
directory, which (I didn't make clear) was my home directory. (Or,
presumably, any directory to which I have write access.)
Rick> Am I missing some other info?
Perhaps -- (with-cwd) is supposed to _temporarily_ set the working
directory, evaluate its body (which in my example is just the number
0), then restore it.
If you put (display (cwd)) after the call to (with-cwd), but before
the call to dump-scsh-program, you'll see that your working directory
is not /, but rather, whatever it was when you started the program.
This is the correct behavior.
However, despite that, the call to dump-scsh-program will _still_ fail
with "Permission denied".
--
A novice of the temple once approached the Master Programmer with a question.
"Master, does Emacs have the Buddha nature?" the novice asked.
The Master Programmer had been in the temple for many years and
could be relied upon to know these things. He thought for
several minutes before replying. "I don't see why not. It's
bloody well got everything else."
|