Mmm, thanks. I see that prompt takes an
:input that I could use:
(define-command set-url (&key (prefill-current-url-p t))
"Set the URL for the current buffer, completing with history."
:prompt "Open URL"
:input (if prefill-current-url-p
(render-url (url (current-buffer))) "")
I am not sure I explained myself well. I will try again.
I wanted to open a QR code I generated with Nyxt (see Extending Nyxt via Emacs: how to leverage Common Lisp wealth to get your links as QR codes - Where parallels cross).
I want to do this via the Slime REPL, ideally with
open-file does not take a path argument. So I was thinking to somehow mimic the user input to skip the interactive bit.
In ELisp you have interactive functions: they would look like
(defun x (arg) (interactive (list (ask-for-input)) ...), where the function input
arg is used unless the function is called as a commnad: is not possible to have something like that in Nyxt?
I mean that the function
prompt is called only if I invoke the command from Nyxt, but I can pass an input when I am invoking the command from a Lisp REPL?