Function: combobulate-query-builder-eval-query
combobulate-query-builder-eval-query is a natively compiled function
defined in combobulate-query.el.
Signature
(combobulate-query-builder-eval-query QUERY)
Documentation
Evaluate query QUERY against the target buffer.
Source Code
;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-query.el
(defun combobulate-query-builder-eval-query (query)
"Evaluate query QUERY against the target buffer."
(with-current-buffer combobulate-query-builder-target-buffer-name
(remove-overlays)
(let ((captures (combobulate-query-capture combobulate-query-builder-parser query)))
(if (= (length captures) 0)
(with-current-buffer combobulate-query-builder-buffer-name
(combobulate-query-builder-update-header
;; rudimentary check for capture groups.
(if (string-match-p "@" (combobulate-query-builder-get-query))
(propertize "No matches" 'face 'font-lock-warning-face)
(propertize "No capture group(s) in query" 'face 'error))))
(with-current-buffer combobulate-query-builder-buffer-name
(combobulate-query-builder-update-header
(propertize (format "%d match(es) found" (length captures)) 'face 'success)))
(setq combobulate-query-builder-match-capture-faces-alist nil)
(mapc #'combobulate-query-builder--highlight-capture captures)))))