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

Sometimes we can't cancel (C-c C-c) the IUP loop #53

Open
vindarel opened this issue Nov 29, 2019 · 2 comments
Open

Sometimes we can't cancel (C-c C-c) the IUP loop #53

vindarel opened this issue Nov 29, 2019 · 2 comments

Comments

@vindarel
Copy link

vindarel commented Nov 29, 2019

I am exploring these bindings, and as a beginner I'll make errors. One of them is to call the main-loop at the wrong place, which leaves me to a state where I loose control over Slime. I can't C-c C-c the running IUP process:

(defun bookslist ()
  (iup:with-iup ()
    (let* ((frame (iup:frame
                   (iup:vbox (loop for list in (list (iup:list :value 1 :tip "List 1" :multiple :yes)
                                                     (iup:list :value 2 :tip "list 2" :dropdown :yes)
                                                     (iup:list :value 3 :tip "List 3" :editbox :yes))
                                do (loop for i from 1 upto 3
                                      do (setf (iup:attribute list i)
                                               (format nil "Item ~A" i)))
                                collect list))
                   :title "IUP List"))
           (dialog (iup:dialog frame :menu "menu" :title "a title")))
      (iup:map dialog)
      (iup:show dialog)
      ;; (iup:main-loop)
      )))

(defun main ()
  #-sbcl (hello)
  #+sbcl
  (sb-int:with-float-traps-masked
      (:divide-by-zero :invalid)
    (bookslist)
    (iup:main-loop)))

Leaves me in:

IUP> (main)

[no C-c C-c here]

I only escape from there by restarting the lisp process :/

SBCL 1.4.5

@lispnik
Copy link
Owner

lispnik commented Dec 4, 2019

As a work around, try running (iup:exit-loop) in a another thread, e.g. the inferior lisp buffer in slime/sly.

@vindarel
Copy link
Author

Curious, but it works. When I enter this on the *inferior-lisp* buffer and press enter, I have no prompt, but it does give me control back to the Slime REPL.

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

2 participants