 	    (when (< 3000 cont) ; timeout after 3 seconds
 	      (error "Server timeout.")))))))))
 
+(defun ycmd-load-conf-file (filename)
+  (interactive
+   (list
+    (read-file-name "Filename: ")))
+  (let ((filename (expand-file-name filename)))
+    (ycmd-request
+     "/load_extra_conf_file"
+     `(("filepath" . ,filename)))))
+
 ;; TODO: ycmd-close
 
 (defun ycmd-display-completions (pos)

      (insert (ycmd-json-encode options)))
    options-file))

(defun ycmd-open ()
  (interactive)

  (setq ycmd-hmac-secret (ycmd-generate-hmac-secret))
  
  (let ((proc-buff (get-buffer-create "*ycmd-server*")))
    (set-buffer proc-buff)
    (erase-buffer)
    
    (let* ((options-file (ycmd-create-options-file ycmd-hmac-secret))
           (server-command (if (listp ycmd-server-command)
                               ycmd-server-command
                             (list ycmd-server-command)))

                    ("filepath" . ,full-path)
                    ("line_num" . ,line-num))))
         (ycmd-request "/completions" content :parser 'json-read)))

(defun* ycmd-request (location content &key (parser 'buffer-string))
  (let* ((content (json-encode content))
