Skip to content

Conversation

@astoff
Copy link
Owner

@astoff astoff commented Feb 20, 2022

It would be nice if, as in Info, isearch would continue searching subsequent document pages after hitting the last match of a given page.

This is implemented, as best as possible, in this branch. However, rendering document pages is quite slow, so isearch can freeze for several seconds in the process. A progress report is shown, and interrupting the search with C-g seems to work fine.

It's not clear whether this feature is better or worse than nothing. Perhaps @minad has an opinion?

@minad
Copy link

minad commented Feb 20, 2022

So this allows you to search through the entire devdocs starting at the beginning? I am not sure if I like Isearch to be used for this, in particular if it leads to slowdown. Did you consider adding another search functionality, based on grep, or even possibly with the ability to plug-in consult-grep?

@astoff
Copy link
Owner Author

astoff commented Feb 20, 2022

I'm working on a grep-like function right now. When it's ready we can decide if the isearch thing is still interesting.

We'd have to see about integrating the grep with Consult. I need to convert HTML to text before grepping, and I'm just using shr for that (mainly because it doesn't require external programs, and already reports the correct line numbers). As a downside, I believe this approach makes it harder to make things asynchronous in a way that's friendly to Consult.

@minad
Copy link

minad commented Feb 20, 2022

What about converting the html at installation time? If you don't want that there is no other alternative to convert in an external process if you want to preserve the asynchronicity. Having an asynchronous would be particularly nice. Also note that shr is slow.

@astoff
Copy link
Owner Author

astoff commented Jun 6, 2022

Even though Info-mode has this feature, it is probably not a good idea to implement here. A better UI would be a grep-like command as in #15, assuming we can polish it to be fast enough.

@astoff astoff closed this Jun 6, 2022
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.

3 participants