Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desactivating quit/exit at the REPL if desired #15

Open
jf7t2gd1n opened this issue Aug 7, 2023 · 8 comments
Open

Desactivating quit/exit at the REPL if desired #15

jf7t2gd1n opened this issue Aug 7, 2023 · 8 comments

Comments

@jf7t2gd1n
Copy link

Thanks for your interesting system.

When working at the REPL I would like sometimes to call clingon:run but desactivating exit (so I continue to be at the REPL) if desired. I did not find the way to do it experimenting with the features of clingon.

If that option is not present and you think it makes sense, could it be added?

Thanks. Best regards.

@dnaeon
Copy link
Owner

dnaeon commented Aug 7, 2023

Hey @jf7t2gd1n ,

That feature has been implemented like a couple of months ago.

See #12 for more details.

What version of clingon are you running?

@jf7t2gd1n
Copy link
Author

Thanks for your response.

I am using version 0.5.0 .

In /src/utils.lisp, it seems it checks for Sly or Slime.

I am using the REPL and the command line (not through Sly or Slime).

@dnaeon
Copy link
Owner

dnaeon commented Aug 7, 2023

Yep, currently it only works for Slime or Sly, as that's usually the way people interact with the REPL :)

Out of curiosity why do you use REPL from the command line instead of Sly/Slime?

@jf7t2gd1n
Copy link
Author

I use quite a lot the terminal, and sometimes I do not get to launch emacs.

@dnaeon
Copy link
Owner

dnaeon commented Aug 7, 2023

Currently the QUIT function works only for Sly/Slime by looking up the existing *FEATURES*. I'd be happy to review a PR, if you have something in mind.

Thanks!

@jf7t2gd1n
Copy link
Author

Thanks for asking. I am not an expert to propose the best way to do it.

For me, I think it would suffice something like a global variable that could be set to desactivate quit/exit when launching clingon:run . Or perhaps an optional or a key argument could be added to clingon:run to address that ??

@vindarel
Copy link

Hi, you could probably cheat and add the :swank symbol to the features list (even if swank is not loaded):

(defun main ()
  (let ((*features* (push :swank *features*)))
    (clingon:run my-app)))

or simply

(setf *features* (push :swank *features*))

@jf7t2gd1n
Copy link
Author

Yes, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants