Staurt, Phillip: Correct me if I'm wrong, the main idea recommended is:
(1) don't try to do it via (:require ...) inside of (ns ... ) (2) define a function, which calls (require ... ) [i.e. the function, outside of (ns ... )] Thus, the end solution ends up being: magic.cljx (defn load-standard-requires [] (require ... ) (require ... )) foo.cljx: (ns foo ... ) (magic/load-standard-requires) bar.cljx: (ns bar .. ) (magic/load-standard-requires) Can either of you confirm this is the main plan of attack you have suggested? (It seems reasonable, but I want to make sure I understand what you're recommending.) On Wed, Jan 22, 2014 at 9:33 AM, Michał Marczyk <michal.marc...@gmail.com>wrote: > Not addressing the main problem, but require takes multiple libspecs, > so you can write > > (ns foo > (:require [foo.bar :as bar] > [foo.quux :as quux])) > > to avoid repeating the keyword, at least. :require in ns expands to a > call to require-the-function, so the latter supports multiple libspecs > too (and so require-standard could be written more succinctly). > > Cheers, > Michał > > > On 22 January 2014 08:15, t x <txrev...@gmail.com> wrote: > > Hi, > > > > I have the following problem: > > > > (ns foo.bar > > ... > > ... > > ... ) > > > > There's basically 10 lines of require that I want as part of nearly > _every_ > > ns I declare is there a way to define some soft of alias / > abbrevraviation > > that is used in namespaces at will? > > > > For example: > > > > ## somewhere, in a magic file: > > > > (def require-standard > > (require [ ... :as ... ]) > > (require [ ... :as ... ]) > > (require [ ... :as ... ]) > > (require [ ... :as ... ])) > > > > (ns foo.bar > > require-standard > > ...) > > > > Thanks! > > > > > > > > > > -- > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clojure@googlegroups.com > > Note that posts from new members are moderated - please be patient with > your > > first post. > > To unsubscribe from this group, send email to > > clojure+unsubscr...@googlegroups.com > > For more options, visit this group at > > http://groups.google.com/group/clojure?hl=en > > --- > > You received this message because you are subscribed to the Google Groups > > "Clojure" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to clojure+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/groups/opt_out. > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.