Skip to content
This repository has been archived by the owner on Jan 23, 2018. It is now read-only.

[Severe] Windows: Swank freezes on any GUI-related user input. #10

Open
rbennekop opened this issue Mar 6, 2010 · 2 comments
Open

[Severe] Windows: Swank freezes on any GUI-related user input. #10

rbennekop opened this issue Mar 6, 2010 · 2 comments
Labels

Comments

@rbennekop
Copy link

On my system (Windows XP SP3, 32 Bit, JRE 1.6.0_18, JDK 1.6.0_12) this can be reproduced as follows:

  1. Install Clojure Box 1.1.0 (January 5, 2010)

  2. Start the Slime REPL and enter this line:
    (. javax.swing.JOptionPane (showMessageDialog nil "snafu"))

    Result: The Slime REPL stalls and doesn't return a result.

  3. Visit the inferior-lisp REPL buffer and place your cursor at the
    command line. Press 'return'.

    Result: The Slime thread continues and displays the messagebox.
    The Slime REPL returns.

Other failing examples:
(clojure.contrib.javadoc.browse/browse-url "http://clojure.org")

    ; Incanter
    (require '(incanter charts))

When the above lines are entered directly into the inferior-lisp
buffer they get executed promptly and without errors.

There are two related threads (1, 2) on the mailing list.

I haven't noticed any such problems on my Mac and Linux boxes.
On Windows, I keep some Elisp around to swiftly revive a stuck Slime
session:

    (defun slime-poke-clojure ()
     (interactive)
     (slime-send-to-process "\n"))

    (defun slime-send-to-process (command)
     (interactive)
     (let ((slime (slime-inferior-process)))
       (if slime (comint-redirect-send-command-to-process
                  command (process-buffer slime) slime nil t)
         (message "No Slime process running."))))
@kaysarraute
Copy link

Same bug here, too.

While playing around with Labrepl I've just noticed that the problem disappears when the Clojure process is started traditionally from the Windows command prompt and subsequently connected to by slime-connect.

Ergo: Emacs' comint mechanism seems to be flawed.

@nonsequitur
Copy link

I had to spend some time on Windows lately and came up with the following hack: http://gist.github.com/360973
It re-routes the shell command created by swank-clojure-cmd to start Clojure/Swank inside a Windows terminal instead of an Emacs comint buffer. Requires Ruby.

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

No branches or pull requests

3 participants