Evaluating expressions from terminal as if evaluated from the window

Hi!

I am trying to evaluate lisp expressions from the terminal. So far I have tried nyxt --remote --eval (my-expression), but this does not seem to evaluate it as if I ran it from the session. For example, (delete-current-buffer) does not delete the current buffer.

Am I missing something? How do I get expressions ran through the terminal to behave as if I ran them directly in the session?

Edit: Version is 2.2.4 on guix.

Hmmmmmmmm. Seems like it doesn’t work indeed. I’ve opened the issue about it: `--remote --eval` does not run the code · Issue #2750 · atlas-engineer/nyxt · GitHub so that we don’t forget.

1 Like

Okay, do you have remote-evaluation-p on?

No, I did not. It works now, thanks :slight_smile:

However, evaluating through the terminal is noticeably slower than for example through slime. Also, the window always focuses after an expression is evaluated this way. Is this also fixable?

What I am trying to do is getting voice control software (talon voice) to work smoothly with the browser, so I am having it execute commands through the shell. The current way I am doing it is having emacs connected to nyxt through the swank server and using slime through emacsclient --eval, but this necessitates both emacs running and it having an established connection to nyxt already. Letting talon communicate directly with nyxt and having it run as smoothly as evaluating the expressions through slime would be very nice.

Evaluating from the terminal starts another instance of Nyxt—that’s the slowdown reason. Focusing the window is also the side-effect of this.

I’m pretty sure both of these issues are fixable. Care to report on GitHub so that we don’t lose track of thise use-case/problem?

Sure!