2021-11-10, updated: 2021-12-09
Tested with Nyxt 3.0.0.
The bureaucracies of the web
We all know the feeling of filling forms. Sometimes, you just want to send an email to some company or buy something, but, first, there is a form to be filled.
Bureaucracy is like fishing in places known to be without fish. – James Parkinson.
Filling one form is a boring task but someone needs to bite the bullet. An unacceptably uncomfortable situation arises when you need to re-fill the same form multiple times or re-introduce exactly the same data into a different form. In order to prevent that suffering, Nyxt now has two new commands:
First, you fill a form for a single time. Before pressing the button to submit the data, you execute the command
save-input-data. This creates a
.lisp file just like the ones from bookmarks or annotations to record what was inserted. You'll find this file in ~/.local/share/nyxt/inputs.lisp by default. This file is supposed to be readable by computers and people :)
reload-current-buffer to reload the web-page. As the same form appears as a blank slate, do not repeat yourself! Instead of re-typing the data, you can just execute the command
set-input-from-saved and choose the appropriate option listed by the prompt-buffer.
An interesting point here is the possibility to re-use data from one web-page on another. It will work as long as the web page from the original source of data has the same computational structure as the recipient web-page.
For instance, Atlas Engineer has two different web-pages with forms. The first one is a Contact page oriented towards Atlas itself. The second web-page is a Contact page oriented towards Nyxt which is the company's main product. Despite the different goals, both pages share forms with identical HTML structure.
Symmetry is beauty
Finally, as you know, Nyxt already had command variations designed to use the domain being used in the current buffer (tab). The main example is the frequently used
switch-buffer. If the user has multiple buffers (tabs) and wants to switch only to options under the same domain, they can execute
switch-buffer-domain. It will work exactly as a subset of
switch-buffer, filtering the options listed in the prompt-buffer.
set-input-data-from-saved also has a command variation:
set-input-data-from-saved-domain. Thus, only data saved from forms belonging to the same domain as the one on the current buffer will be shown. Stay tuned and may the power of Nyxt be with you!
XKCD 970 https://xkcd.com/970/
P.S.: In case you did not get it, there is an Easter egg in the article. Since posting my phone number would be irresponsible, I used a reference to the popular song called Jenny which was written by Alex Call and Jim Keller. The music was a big hit and as a consequence the number mentioned during it is one of the most well-known telephone numbers ever. The song was released in 1981, by that time, people actually knew by heart telephone numbers.
Did you enjoy this article? Register for our newsletter to receive the latest hacker news from the world of Lisp and browsers!
- Maximum one email per month
- Unsubscribe at any time