Function: combobulate-query-builder-copy-and-match-node-at-point
combobulate-query-builder-copy-and-match-node-at-point is an
interactive and natively compiled function defined in
combobulate-query.el.
Signature
(combobulate-query-builder-copy-and-match-node-at-point)
Documentation
Copy the node at point, match its text, and insert it into the query builder.
Key Bindings
combobulate-query-mode-map C-c n
Source Code
;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-query.el
(defun combobulate-query-builder-copy-and-match-node-at-point ()
"Copy the node at point, match its text, and insert it into the query builder."
(interactive)
(combobulate-query-builder-live-or-error)
(let ((node (with-current-buffer combobulate-query-builder-target-buffer-name
(combobulate-proffer-choices
(cons (combobulate-node-at-point nil t)
(combobulate-get-parents (combobulate-node-at-point nil t)))
#'combobulate-proffer-action-highlighter
:prompt-description "Pick a node to copy and match"))))
(unless node
(user-error "No node selected"))
(combobulate-query-builder-insert
(combobulate-query-builder-to-string
`((,(combobulate-query--node-type node))
,@(combobulate-query-builder-match-form
'@hl.default (combobulate-query-builder-get-node-text node)))))))