ag91 / emacs-with-nyxt Goto Github PK
View Code? Open in Web Editor NEWSome code to make Emacs interact with Nyxt
Some code to make Emacs interact with Nyxt
Hi,
When I run emacs-with-nyxt-start-and-connect-to-nyxt
Nyxt opens ok but my prompt gets blocked with the following message:
"Setting sly package to NYXT-USER"
If I C-g
to stop the process I can see the following error:
The value
NIL
is not of type
SLYNK::CONNECTION
[Condition of type TYPE-ERROR]
My config currently includes the following:
(use-package emacs-with-nyxt
:ensure nil
:load-path "~/.emacs.d/site-lisp/emacs-with-nyxt"
)
(use-package sly
:config
(setq sly-lisp-implementations '((sbcl ("/usr/bin/sbcl"))))
)
I modified just two lines in emacs-with-nyxt.el to require sly and also open nyxt with swank:
;;(require 'slime)
(require 'org)
(require 's)
(require 'sly)
;; Many lines further...
(async-shell-command (format "nyxt -e \"(nyxt-user::start-swank)\""
And added auto-config.lisp to ~/.config/nyxt/.
Thanks for raising the problem of directly passing text to and from the browser to emacs. So far, I have seen very few solutions for collecting information from a browser without a clipboard.
For example, Grasp firefox extension for org-capture gathers information into an org file on keystrokes. But the python configuration introduces unnecessary complexity into the organization and leads away from the required implementation "without additional layers". Emacs Everywhere still uses clipboard and some xdotool dependencies.
In emacs, this issue is sort of resolved automatically if you use the Emacs inbuild browser yourself. Unfortunately, it does not handle many sites.
Unfortunately, the instructions leave a lot to be desired. Despite the abundance of posts, there is no direct instruction on the installation process, no adjustments are made to the process yet.
How did I manage to install emacs-with-nyxt after looking for information in many places.
installed the sly package from melpa.
Added use via use-package to my emacs configuration file
(use-package sly :config (setq sly-lisp-implementations '((sbcl ("/usr/bin/sbcl")))) )
Run linux package manager which installed sbcl to /usr/bin/sbcl
Installed quicklisp as found it nned in the file emacs-with-nyxt.el. Detailed instructions on installation, fortunately, on the official site
added an auto-config.lisp file to ~/.config/nyxt and an emacs-with-nyxt.el file to the folder where my emacs packages are located (/contrib/ in my case).
Added a package call to my emacs configuration file
(use-package emacs-with-nyxt :ensure nil :load-path "~/.emacs.d/contrib/emacs-with-nyxt")
not finding a connection & following the advice of users, added a symlink from the /slynk subfolder to the subfolder where the sly package is located which was installed from melpa.
sudo ln -s ~/.local/share/nyxt/extensions/slynk/ ~/.emacs.d/elpa/sly-20220131.1646/slynk/
After that, the connection is created. The browser is controlled from emacs. You can send a command to open this or that url from emacs.
But the most hot part is how to send text directly from emacs into the browser.
From the one post where you are on the form in browser and typed ctrl-x '
and it will open emacs, then type ctrl-x #
and emacs will send some text to the form I don't see this happen.
For example, opened google search form , typed ctrl-x '
and just '
was put into search form. After pressing ctrl-x #
I see message something like this 'no server editing buffer..' .
What to do to actually send text from emacs to nyxt? Can text from any file wtih emacs be sent into nyxt?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.