Skip to content

Conversation

@maw
Copy link
Contributor

@maw maw commented Aug 11, 2023

I added some code to cycle between search scopes:

  • Searching the currently specified directory. This is how deadgrep has always worked.
  • Limit the search to files that correspond to open buffers in the currently specified directory.
  • Expand the search to all files that correspond to open buffers, both in and out of the currently specified directory.

I think this is cool. But here are some problems (that I am willing to address)

  • Some of the new code is probably in the wrong place in deadgrep.el
  • What this new stuff means probably isn't obvious enough in the UI or the documentation
  • My set theory is rusty so I forget what this should be called, but there's a fourth scope that I didn't implement: all files in currently selected directory plus all (other) open files.
  • If you're in the "open buffers" scope, then the selected directory is ignored. The UI should probably reflect this somehow, maybe by greying out Directory:.
  • Scope: in the deadgrep UI this should probably be moved near Directory:, probably just above it.

maw added 5 commits August 11, 2023 12:52
deadgrep--filenames-of-open-files returns the names of the files that back
open buffers.

deadgrep--filenames-of-open-files-in-project returns the names of open files
in the current project.
@maw maw changed the title Add options to constrain and broaden files searched 3 Add options to constrain and broaden files searched Aug 11, 2023
@maw
Copy link
Contributor Author

maw commented Aug 11, 2023

Another annoyance: if you're using the in directory open buffers scope it shows full paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant