atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.82k stars 410 forks source link

Resume search (or more generally: resume any minibuffer) #774

Closed shubham1172 closed 3 years ago

shubham1172 commented 4 years ago

I am using vi bindings and trying to n to go to the next search result, but it says "NEXT-SEARCH-HINT is deprecated".

Version 1.5.0

jmercouris commented 4 years ago

That is true, NEXT-SEARCH-HINT is in fact deprecated :-)

can you please try building from Master? The search hints have been completely overhauled

shubham1172 commented 4 years ago

@jmercouris, how to move forward/backward while searching then?

jmercouris commented 4 years ago

In that case you would see all the results in the minibuffer, you could move up and down using the arrow keys or C-n and C-p

shubham1172 commented 4 years ago

Any specific reason search hints are being removed? I found them to be a useful feature :(

jmercouris commented 4 years ago

They are not removed, only the interface to them is changed :-) that is why the NEXT-SEARCH-HINT command is deprecated

Here's how it looks on master on my machine:

Screen Shot 2020-06-02 at 11 08 12

jmercouris commented 4 years ago

Sorry, wrong screenshot :-) here's the correct one:

Screen Shot 2020-06-02 at 11 10 59

shubham1172 commented 4 years ago

Yes, I get it, but I really liked the idea of the previous interface since I'd have a better view of the screen without the mini-buffer and it would have been really easy to n my way continuously like pressing return on conventional browsers after Ctrl+F.

Ambrevar commented 4 years ago

Search results are now highlighted (as in most other browsers). What exactly did you find useful that you see gone?

Ambrevar commented 4 years ago

I think you are right, I'm also missing the feature of resuming a search.

We could fix this more generally like Emacs Helm does: have a "continue minibuffer" command to restore a previous minibuffer in the state we left it.

Should not be hard.

aadcg commented 4 years ago

I'd like to address something somehow related. Why is there function like remove-search-hints? It seems to me more comfortable (and "Emacsy") that C-g (noop) would do just that.

I'm really enjoying using Nyxt. Hopefully, I'll get into the code base, learn some Common Lisp and make myself useful to this community.

jmercouris commented 4 years ago

Hello André, thanks for your question.

First, search hints are added via Parenscript (javascript). They then need to be removed from the page. The noop command is designed to cancel any command, not just element hints. How would it know how to cancel link hints?

Your point does make me think of a way to do this. Every command can have a destructive-interrupt. A case of some sort that can be ran when a "noop" command is detected. Is this worth it? Maybe. Probably not, at least not at this time.

I'm glad that you are enjoying Nyxt :-). If you need any help with learning Common Lisp, please see the resources in the developer readme, and feel free to ask questions on IRC!

thanks,

-John

aadcg commented 4 years ago

John Mercouris notifications@github.com writes:

First, search hints are added via Parenscript (javascript). They then need to be removed from the page. The noop command is designed to cancel any command, not just element hints. How would it know how to cancel link hints?

Right. My observation was that when there are element hints, then hitting the keybinding assigned to the noop command (not running the noop command itself) should run remove-search-hints.

I'm drawing a parallel with Emacs. C-g runs keyboard-quit, but if we do a search (C-s) and then give up on it, C-g runs isearch-abort.

Your point does make me think of a way to do this. Every command can have a destructive-interrupt. A case of some sort that can be ran when a "noop" command is detected. Is this worth it? Maybe. Probably not, at least not at this time.

I see, there must be way more important things to do at the moment.

I'm glad that you are enjoying Nyxt :-). If you need any help with learning Common Lisp, please see the resources in the developer readme, and feel free to ask questions on IRC!

Thanks!

Ambrevar commented 3 years ago

This is now fixed on master.