 To see what the returned structure looks like, you can use
 `ycmd-display-completions'."
   (with-current-buffer buffer
-      (goto-char pos)
-
-      (when (ycmd-parsing-in-progress-p)
-        (message "Ycmd completion unavailable while parsing is in progress."))
-
-      (when ycmd-mode
+    (goto-char pos)
+
+    (when (ycmd-parsing-in-progress-p)
+      (message "Ycmd completion unavailable while parsing is in progress."))
+
+    (when ycmd-mode
+      (let* ((extra-content (and ycmd-force-semantic-completion
+                                 'force-semantic))
+             (content (ycmd--standard-content-with-extras
+                       buffer extra-content)))
         (ycmd--request
          "/completions"
-         (ycmd--standard-content-with-extras buffer t)
-         :parser 'json-read))))
+         content
+         :parser 'json-read)))))
 
 (defun ycmd--handle-exception (results &optional default-handler)
   (cond ((string-equal (assoc-default 'TYPE (assoc-default 'exception results))

        ("line_num" . ,line-num)
        ("column_num" . ,column-num)))))

(defun ycmd--standard-content-with-extras (buffer &optional force-semantic use-tags)
  "Generate 'standard' content for BUFFER with extras."
  (append (ycmd--standard-content buffer)
          (when (and force-semantic ycmd-force-semantic-completion)
            '(("force_semantic" . "true")))
          (when (and use-tags ycmd-tag-files)
            (-when-let (tag-files (ycmd--get-tag-files buffer))
              `(("tag_files" . ,tag-files))))))


(defvar ycmd--log-enabled nil

"
  (when (and ycmd-mode (not (ycmd-parsing-in-progress-p)))
    (let* ((buff (current-buffer))
           (extra-content (and ycmd-tag-files 'tags))
           (content (cons '("event_name" . "FileReadyToParse")
                          (ycmd--standard-content-with-extras
                           buff extra-content))))

      ;; Record that the buffer is being parsed
      (ycmd--report-status 'parsing)
