         (progn
           (setq ectags--file-name local-tags-filename)
           t)
-      ;; (progn (message "Valid tags table")
-      ;;        (setq ectags--obarray (make-ectags-obarray)))
       (error "Not a valid tags table")
       nil)))
 

                         "\n"
                         (shell-command-to-string
                          (format
                           ectags-big-file-command-format
                           ectags--regexp
                           ectags--file-name))
                         t))
        (ectags-match tag-line))
    (message "No `ectags--file-name' for the current buffer!")))

    ;; (let ((right (string-to-number
    ;;               (car (s-split
    ;;                     " "
    ;;                     (shell-command-to-string
    ;;                      (format "wc -l %s" (buffer-file-name)))))))
    ;;       (line nil)
    ;;       (middle 0)
    ;;       (left 0))
    ;;   (vlf-beginning-of-file)
    ;;   (while (> right left)
    ;;     (setq middle (/ (+ left right) 2))
    ;;     ;; (message "!!!!!!!! Parsing line %d (l: %d, r: %d)" middle left right)
    ;;     (vlf-goto-line middle)

    ;;     (if (looking-at (format ectags-line-parsing-regex-format ectags--regexp))
    ;;         (progn
    ;;           (message "!!!!!!!! Found %s at line %d\n" ectags--regexp (line-number-at-pos))
    ;;           )
    ;;       (if (string-lessp ectags--regexp (thing-at-point 'symbol))
    ;;           (progn ;; (message "!!!!!!!! %s < %s" (thing-at-point 'symbol) ectags--regexp)
    ;;                  (setq right middle))
    ;;         ;; (message "!!!!!!!! %s > %s" (thing-at-point 'symbol) ectags--regexp)
    ;;         (setq left (1+ middle))))))))

(defun ectags-seek (tag-name)
  "Seek a match for the current regexp with the tags in \
the current tag table buffer"
  (setq ectags--matches nil)
  (setq ectags--regexp tag-name)

  ;; Open the tags file now if it wasn't already
  ;; (when (not (ectags-table-list))
  ;;   (ectags-visit-tags-table "tags"))
  (setq debug-on-error t)
  (ectags-visit-tags-table "tags")

  (ectags-scan-external))
  ;; (dolist (tags-buffer (ectags-table-list))
    ;; (if (assoc 'vlf-batch-size (buffer-local-variables tags-buffer))
    ;; (funcall #'ectags-scan-external 'ectags-match tags-buffer)))
    ;;  (funcall #'ectags-scan 'ectags-match tags-buffer))))

  ;; (setq ectags--matches
  ;;       (sort ectags--matches #'(lambda (x y)
  ;;                                  (< (car x) (car y))))))

;;* Helper functions
(defun ectags-get-tag-signature (&optional tag-name)

  :version "24.4"
  :group 'tools)

(defcustom ectags-external-search-command
  "rg --no-heading --no-line-number \"^%s\\b\" %s"
  "The command used to search the tags file.  \
The first '%s' is for the tag name, the second '%s' for the tag filename.  \
Will use the following priority (times based on linux kernel's tag \
file of 489 MB):
- rg   0.756s
- grep 1.192s"
  :group 'ectags
  :type 'string)

(defcustom ectags-max-candidates 24
  "How many candidates to select between."
