Permalink
Browse files

init import

  • Loading branch information...
1 parent fe697d6 commit 0fa3738d186e7d025e770ec288d29f49f7600bee @tavisrudd committed Mar 18, 2011
Showing with 22 additions and 0 deletions.
  1. +22 −0 dss-couchdb.el
View
@@ -0,0 +1,22 @@
+(require 'relax)
+
+(defun dss/couch-new-doc (id)
+ (interactive "sDocument ID: ")
+ (let ((url-request-method "PUT")
+ (url-request-data "{}"))
+ (url-retrieve (relax-url id) 'relax-visit-new-doc)))
+
+(defun dss/couch-new-design-doc (id)
+ (interactive
+ (list (read-from-minibuffer "Document ID: " "_design/" )))
+ (dss/couch-new-doc id))
+
+;; (defun relax-new-doc (choose-id)
+;; "Create a new document. With prefix arg, prompt for a document ID."
+;; (interactive "P")
+;; (let ((url-request-method (if choose-id "PUT" "POST"))
+;; (url-request-data "{}")
+;; (id (if choose-id (read-from-minibuffer "Document ID: "))))
+;; (url-retrieve (relax-url id) 'relax-visit-new-doc)))
+
+(provide 'dss-couchdb)

0 comments on commit 0fa3738

Please sign in to comment.