Are more complicated search engine queries possible?

I’ve been looking into porting some bits of configuration I used to use with Conkeror over to Nyxt. Among them are some of my more complicated “webjumps,” which are essentially shortcuts to longer URLs (typically search engines) but which allow for more complicated processing of a user-supplied argument.

One webjump of mine checks whether the input string ends with two numbers with a space between them, and if so, it zero-pads the numbers to two digits and formats them together. For example, the string “foo bar 1 2” might be converted to “foo bar x01y02” before being handed off to the associated search engine in the usual way.

Another search engine of sorts that I visit frequently is a foreign language dictionary, but it has to be accessed via a POST request rather than the typical GET, with some additional fixed request parameters in addition to my search term.

The search-engines buffer slot in Nyxt is the closest thing to Conkeror’s webjumps I’ve found so far, but it seems strictly limited to GET requests, and with no tweaking of the user-supplied search term, which renders both of the cases I mentioned unworkable. Is that correct?

I presume that I could write my own commands specifically to handle the above two cases, but I’d really prefer to use the same go-to-URL interface for everything, to minimize cognitive load. Is that at all possible?

1 Like

Have you looked at nx-search-engines yet?

I have exactly the same requirements (both of them). Very interested in this and all other migration-from-Conkeror issues.

Looks like a useful and interesting project, but IIUIC no solution to either of OP’s issues.

When I posted this question originally, I wasn’t aware that Nyxt doesn’t have a unified go-to-URL interface like I expected. For example, if I save a bookmark to the Wikipedia home page using the tag “w”, I can’t just enter “w” after invoking set-url-new-buffer; by default, that searches for “w” using my default search engine. I have to scroll way down past the “New URL or search query” and “Global history” sections before I get to “Bookmarks”, and select it from there. Or, alternately, I can go to a bookmarked page more directly by running a different command, set-url-from-bookmark.

It looks like if I want a no-frills, Conkeror-style URL opening function, that takes bookmarks and URLs on a single Emacs-minibuffer-like line at the bottom of the window, and allows for webjump-like adjustments such as I described originally, I’ll need to write it myself. I expect I’ll enjoy it when I find the time to do so, I’m just a little surprised it doesn’t already exist.