Skip to content

Search Projects and Workspaces

Find saved text across two Projects, visit a checked match, and return to your editing position. Both interaction profiles use the same commands and result controls.

Prepare Two Projects

Complete Keep Projects and Workspaces Across Restart first. Use two disposable Projects named App and Other in an ordered Workspace named Pair. Creating the Workspace saves its composition; choose open-workspace through Alt-x and select Pair to activate it.

In App, save origin containing origin and target.rs containing hit. é界. In Other, save target.rs containing hit! λ. Open App's origin before searching. Save your edits explicitly with Ctrl-X Ctrl-S; search reads saved filesystem contents and leaves unsaved buffer text intact.

Search and Inspect Coverage

Choose project-search-text through Alt-x, type hit. and press Enter. The result belongs to App and includes the period literally. Hide the panel with Ctrl-G, then choose workspace-search-text-regexp and enter hit.. The expression matches both files because its dot matches a scalar. The header identifies saved-file scope; rows identify the Project, relative file, line and byte column. Selecting a row leaves editing point unchanged.

Use workspace-search-text for a literal query over Pair, or project-search-text-regexp for an expression within the current Project. project-search-repeat reuses the last accepted query and policies against the current context of the same scope kind. Missing context or an invalid expression preserves your previous results and gives a refusal reason.

Hidden entries, ignored files and binary-looking files are excluded by default. Inspect the header's policy and coverage counts before treating a result set as exhaustive. An unsupported .gitignore rule identifies its file and line; correct the rule and refresh. The reference defines the maintained subset and its limits.

Visit and Return

Select a match with Up/Down and press Enter. Rur opens or reuses an ordinary file buffer through the normal pane policy. Ctrl-G hides the result panel and leaves that file available for editing. pop-selection-location returns to your previous editing position; it preserves text undo history.

Try inserting X at the visited match. Choose show-search-results and visit the old row again. A changed live buffer refuses the saved-file location and preserves your edit, point and undo history. Hide the panel, undo the trial edit and save the restored bytes. Then return to origin with pop-selection-location. The result panel cannot replace text across files.

Refresh, Continue and Cancel

Change App's saved target.rs outside Rur to contain two matching lines. Choose show-search-results and press r. Refresh uses the original captured Workspace composition and query, so the new generation has three matches. Changed membership or policy may require a fresh scoped search. An old row cannot authorize a visit in the replacement generation.

With many matching lines, a page normally contains 64 rows. An incomplete header names the reason and available actions. Press c only when Continue is offered: Rur rechecks the captured context, policy and file evidence before replacing the page. Traversal, read, analysis or request-match exhaustion can leave incomplete coverage without a continuation. Refresh or narrow the query, filters or scope as appropriate; incomplete coverage does not mean no matches.

Ctrl-G in the result panel hides it while work can continue. To cancel running search work, return to editing and press Ctrl-G. Confirmed rows remain inspectable with a cancelled outcome and no continuation; a late reply cannot replace them. Editing, Save and terminal output continue between search quanta. q in the result panel closes that source and retires its remaining work; source files and ordinary buffers remain available.

Add a Filtered Command

Add this declaration to your trusted personal configuration, then run reload-configuration. Choose search-rust-hits through Alt-x with Pair active. It searches saved Rust files for literal hit and excludes vendor descendants.

Rur.configuration.command('search-rust-hits', ->(context) {
  context.workspace_search('hit', 'literal', 'sensitive', {
    'includes' => ['*.rs'], 'excludes' => ['vendor/**']
  })
}, { 'kind' => 'session', 'requires' => 'view', 'effects' => ['interaction'] })

Includes narrow eligible files; they do not override hidden, ignore or binary policy. The scoped-search reference lists the copied Ruby options, exact policy precedence and recovery actions.

Previous: Find Text and Save Navigation | Part | User Guide | Next: Files, Projects, and Workspaces