<!DOCTYPE html><html><head>
<style type="text/css">body { font-family:'DejaVu Sans Mono'; font-size:12px}</style>
</head><body><div>I keep running into to this rather trivial but annoying problem while working in slime. Emacs is running (of course), and god only knows what directory I was in when I started it up days ago. I am often working on more than one project, or I will be looking for some piece of data in a folder other than what Slime considers the "current directory" (which I usually determine by M-x d and looking to see where it's at). Whatever the case, if I want to run a few lines of code that access a different directory than the "current" one, I end up doing various ad hoc things, like figuring out the relative path between where it is and where I want it to be, or just typing out a fully-qualified pathname. </div><div><br></div><div>Is there a way to do this more easily? </div><div><br></div><div>I know that if I put something like</div><div><br></div><div>(defparameter *i-am-here*<br>  (make-pathname :name nil :type nil :version nil :defaults (parse-namestring *load-truename*)))</div><div><br></div><div>in a file located in the directory I'm looking at, that the parameter will be set correctly when the file is loaded. But that begs the question, since I have to know where that file is to load it. </div><div><br></div><div>What I'd like to be able to do would be something like this:<br></div><div><br></div><div>(with-open-file (fs (merge-pathnames "data.file" (directory-of-file-buffer)) :direction :input)</div><div>  ;; do stuff</div><div>)</div><div><br></div><div>How do other people handle this situation?</div><div><br></div><div>--Jeff</div></body></html>