Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8505027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:12:12+00:00 2026-06-11T02:12:12+00:00

I am using lein2. I would like to load some ns by default when

  • 0

I am using lein2. I would like to load some ns by default when the repl starts. Is it possible to either specify in project.clj the ns that should be loaded, when lein2 repl is executed for that project?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:12:13+00:00Added an answer on June 11, 2026 at 2:12 am

    You will find a lot of answers in the sample project

    ;; Options to change the way the REPL behaves
    :repl-options {;; Specify the string to print when prompting for input.
                   ;; defaults to something like (fn [ns] (str *ns* "=> "))
                   :prompt (fn [ns] (str "your command for <" ns ">, master? " ))
                   ;; Specify the ns to start the REPL in (overrides :main in
                   ;; this case only)
                   :init-ns foo.bar
                   ;; This expression will run when first opening a REPL, in the
                   ;; namespace from :init-ns or :main if specified
                   ;; This expression will run when first opening a REPL, in the
                   ;; namespace from :init-ns or :main if specified
                   :init (println "here we are in" *ns*)
    

    Using a project.clj I had handy:

    (defproject test "1.0.0"
      :repl-options { :init-ns test.core 
                      :init (do
                              (use 'clojure.set) 
                              (println (union #{1 2 3} #{3 4 5}))
                              (use 'incanter.core)
                              (println (factorial 5))) }
      :dependencies [[org.clojure/clojure "1.4.0"]
                     [incanter/incanter-core "1.3.0-SNAPSHOT"]])
    

    When I fire up lein repl

    $ lein repl
    nREPL server started on port 1121
    REPL-y 0.1.0-beta10
    Clojure 1.4.0
        Exit: Control+D or (exit) or (quit)
    Commands: (user/help)
        Docs: (doc function-name-here)
              (find-doc "part-of-name-here")
      Source: (source function-name-here)
              (user/sourcery function-name-here)
     Javadoc: (javadoc java-object-or-class-here)
    Examples from clojuredocs.org: [clojuredocs or cdoc]
          (user/clojuredocs name-here)
          (user/clojuredocs "ns-here" "name-here")
    #{1 2 3 4 5}
    120.0
    test.core=>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a Clojure project using Leiningen and would now like to add the
I have a lein project (using cascalog--but that's not particularly important). I'm trying to
Using import datetime in python, is it possible to take a formatted time/date string
I'm using lein to manage my project, and I have a number of :dependencies
I am asking this question to straighten out a confusion I have about project.clj
The point of this question is to clear up confusion about Clojure project.clj dependencies
I know it's possible to create a war file using lein ring war ,
using the following instructions: http://www.pgrs.net/2011/10/30/using-local-jars-with-leiningen/ I installed some local jars into local repository. When
I'm creating a compojure project using hiccup-1.0.0-beta1. I get the following stack trace when
I'm working on a project using a LEON2 Processor (Sparc V8). The processor uses

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.