 
 (defun floobits-event-highlight (req)
   (let* ((ranges (floo-get-item req 'ranges))
-         (ranges-length (- (length ranges) 1))
-         (buffer (get-file-buffer (floo-get-item req 'full_path)))
-         (user_id (floo-get-item req 'user_id))
-         (username (floo-get-item req 'username))
-         (pos (+ 1 (elt (elt ranges ranges-length) 0)))
-         (buffer (or buffer (and floobits-follow-mode (find-file (floo-get-item req 'full_path))))))
+        (ranges-length (- (length ranges) 1))
+        (user_id (floo-get-item req 'user_id))
+        (username (floo-get-item req 'username))
+        (pos (+ 1 (elt (elt ranges ranges-length) 0)))
+        (buffer (get-file-buffer (floo-get-item req 'full_path)))
+        (buffer (or buffer (and floobits-follow-mode (find-file (floo-get-item req 'full_path))))))
 
   (when buffer
     (floobits-apply-highlight user_id buffer ranges)

(defun floobits-after-change (begin end old_length)
  (if (_floobits-is-buffer-public (current-buffer))
     (let ((text (floobits-get-buffer-text (current-buffer)))
           (changed (buffer-substring-no-properties begin end)))
      ; (floo-set-item 'floobits-change-set 'after text)
      (floo-set-item 'floobits-change-set 'changed changed)
      (floo-set-item 'floobits-change-set 'begin begin)

  (floobits-load-floorc)
  (floobits-destroy-connection)
  (lexical-let* ((req (list
                (cons 'username floobits-username)
                (cons 'secret floobits-secret)
                (cons 'perms '((AnonymousUser . [])))
                (cons 'dir_to_share dir-to-share)))
                (func (lambda () (floobits-send-to-agent req 'share_dir))))
    (floobits-create-connection func)))

(defun floobits-event-error (req)
