use :only in ns

2014-06-05 Thread Glen Rubin
In my ns i am using a couple of libraries, e.g. (ns providence.core (:gen-class) (:use seesaw.chooser)) However, I only want to use 1 or 2 commands from these libraries, for example (choose-file) from the above seesaw.chooser. How do I specify only a single library? thanks -- You

Re: use :only in ns

2014-06-05 Thread François Rey
This may help: https://groups.google.com/forum/#!msg/clojure/cFmCkdq9tQk/I23-uiqsEwEJ https://groups.google.com/forum/#%21msg/clojure/cFmCkdq9tQk/I23-uiqsEwEJ -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: use :only in ns

2014-06-05 Thread Leonardo Borges
I believe you want: (ns providence.core (:gen-class) (:require [seesaw.chooser :refer [choose-file]])) Cheers, Leonardo Borges www.leonardoborges.com On Thu, Jun 5, 2014 at 4:08 PM, Glen Rubin rubing...@gmail.com wrote: In my ns i am using a couple of libraries, e.g. (ns

Re: use :only in ns

2014-06-05 Thread Linus Ericsson
Either :use with [seesaw.chooser :only [choose-file]] like (ns ... (:gen-class) (:use [seesaw.chooser :only [choose-file]]) or the beefed up refer functionality: http://clojuredocs.org/clojure_core/clojure.core/refer which can have :only, :exclude and :rename to avoid collisions, which

Re: use :only in ns

2014-06-05 Thread François Rey
On 05/06/14 08:29, Leonardo Borges wrote: I believe you want: (ns providence.core (:gen-class) (:require [seesaw.chooser :refer [choose-file]])) This will make available the whole seesaw.chooser namespace available via prefixed notation, with the bonus that choose-file which will be

Re: use :only in ns

2014-06-05 Thread Leonardo Borges
This will make available the whole seesaw.chooser namespace available via prefixed notation, with the bonus that choose-file which will be accessible without a namespace prefix. If just a couple vars are needed, then the :use :only is a preferable solution. Ah good point. I tend to forget