Function: combobulate-query-builder-edit-nodes
combobulate-query-builder-edit-nodes is an interactive and natively
compiled function defined in combobulate-query.el.
Signature
(combobulate-query-builder-edit-nodes)
Documentation
Edit the nodes in the query builder buffer.
Key Bindings
combobulate-query-mode-map C-c e
Source Code
;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-query.el
(defun combobulate-query-builder-edit-nodes ()
"Edit the nodes in the query builder buffer."
(interactive)
(combobulate-query-builder-live-or-error)
(combobulate-query-ring-save-query)
(pop-to-buffer combobulate-query-builder-target-buffer-name)
(let* ((query (combobulate-query-builder-get-query))
(nodes (combobulate-query-capture
(combobulate-root-node)
query nil nil nil)))
;; Search the query string for `@before', `@after', and `@mark' capture
;; groups. Raise an error if neither are present.
(unless (and (not (eq combobulate-cursor-tool 'multiple-cursors))
(or (string-match-p "@before" query)
(string-match-p "@after" query)
(string-match-p "@mark" query)))
(error "You are editing with multiple cursors. Please mark nodes with `@before', `@after', and/or `@mark' to determine cursor placement"))
(if (>= (length nodes) combobulate-query-builder-edit-max-nodes)
(error "Too many nodes to edit (%d)" (length nodes))
(combobulate-cursor-edit-nodes nodes))))