               (setq buffer-read-only t)))
           added))
       (setq floobits-open-buffers current-buffers)
-      (let* (
-          (added-text
-            (mapcar
-              (lambda (buf-path)
-                (cons (intern buf-path)
-                  (floobits-get-buffer-text (find-buffer-visiting buf-path))))
-            added))
-        (req (list
-        (cons 'current current-buffers)
-        (cons 'added added-text)
-        (cons 'deleted deleted))))
+      (let* ((added-text (mapcar 
+                          (lambda (buf-path) 
+                            (cons (intern buf-path)(floobits-get-buffer-text (find-buffer-visiting buf-path)))) added))
+            (req (list
+            (cons 'current current-buffers)
+            (cons 'added added-text)
+            (cons 'deleted deleted))))
         (floobits-send-to-agent req 'buffer_list_change)))))
 
 (provide 'floobits)

  (interactive (list (read-from-minibuffer "Floobits workspace URL (owner/workspace): " "https://floobits.com/r/")))
  (floobits-load-floorc)
  (let* ((url-struct (url-generic-parse-url floourl))
    (domain (url-host url-struct))
    (port (url-port url-struct))
    (path (url-filename url-struct))
    (path
      (if (string= "/" (substring path -1))
        (concat path "")
        (concat path "/")))
    (_ (string-match "^/r/\\(.*\\)/\\(.*\\)/" path))
    (owner (match-string 1 path))
    (workspace (match-string 2 path)))
    (if (and path workspace owner)
      (progn
        (floobits-destroy-connection)


(defun floobits-event-rename_buf (req)
  (let* ((old-path (floo-get-item req 'old_path))
        (new-path (floo-get-item req 'path))
        (buf (get-file-buffer old-path)))
    (message "renaming %s to %s" old-path new-path)
    (rename-file old-path new-path 1)
    (when buf
