Closed m-g-r closed 7 years ago
Maybe instead of splitting it into 5 different variables we can use one url value at Emacs Lisp level, perform url split then and submit extracted values to the uruk level. What do you think?
Actually, I'd just use a list of form (host port user password content-base). I do that already internally. I would want to do url spiltting and such things.
And while we are at this, probably add the option to include the sixth member: security-options, which uruk already supports. see: https://docs.marklogic.com/javadoc/xcc/com/marklogic/xcc/ContentSourceFactory.html
Cheers, Max
Still, I think this is better than the current state. It could be replaced by a list in a separate commit.
I don't think how Wolfgang Petry is relevant to this PR :)
Even if the list never needs to be constructed by a person, having 6 positions with different meanings is rather unwieldly. I'd use a plist, but maybe that is not the emacs way.
I think plist is pretty cool option for manual config. Its indeed have meaningful structure. I'll look how we can adapt dbselector
for this convention.
Ah, sorry, actually I use plists: (:host "localhost" :port "8021" :user "admin" :password "admin")
I use a function map-to-plist in clojure, while cider-any-uruk contains the counterpart cider-any-uruk-plist-to-map. And in Emacs Lisp there is plist-get to access property lists.
Ok, I did the change to a property list now.
Customization also works as plist; tested, although I don't use it. Maybe you can improve on that but I think it is ok as I specified a default plist (with nil values for the values).
(The dbselector example is just optional (and we don't use it right now), so that shouldn't be an impediment.)
@m-g-r I'm sorry I wasn't active more then a week. My business trip ended yesterday, updates to project coming soon.
I suggest to switch from URI for host+port to separate host and port.
Reason: Actually the URI is meant to be an alternative to specify everything: protocol://user:password@host:port/content-base but cider-any-uruk uses separate variables for user, password, and content-base.
So let's also split the URI into separate variables for host and port.
scripts/init.el is updated as well but I did not test it.