title: leinigen repl with profile
body: <p>This question is a follow up to <a href="https://stackoverflow.com/questions/18551918/how-does-one-pre-load-a-clojure-file-in-the-leiningen-repl">How does one pre-load a clojure file in the leiningen repl?</a>.</p>
  
  <p>My <code>~/.lein/profiles.clj</code> looks as follows:</p>
  
  <pre><code>{  
    :user {:source-paths ["C:/Users/username/.lein/src"] }
  }
  </code></pre>
  
  <p>My <code>~/.lein/src/user.clj</code> might look as follows:</p>
  
  <pre><code>(ns user)
  
  (println "user file loaded")  
  </code></pre>
  
  <p>When I run <code>lein repl</code> within a folder containing a <code>project.clj</code>, then the <code>user.clj</code> file is executed, but when I run <code>lein repl</code> from another folder it doesn't load my user profile. Is there a workaround for this or is this behavior by design? In fact, I know that Leinigen is indeed loading my <code>profile.clj</code> (even when there is no project.clj) because there are also other things inside (taken from the excellent <a href="http://dev.solita.fi/2014/03/18/pimp-my-repl.html" rel="nofollow noreferrer">pimp my repl</a> article). Leinigen is just having problems with my additional source-paths setting.</p>
  
  <p>One other question related to this is the fact that I need to specify the full path of the folder for my <code>user.clj</code> file : <code>"C:/Users/username/.lein/src"</code>. When I change that to <code>"~/.lein/src"</code> leiningen fails to load my file. </p>