* "lein repl" malfunctions in Emacs (24.3.1) subprocess?
@ 2015-04-13 21:23 cohagan
2015-04-13 21:47 ` cohagan
2015-04-14 2:38 ` Eli Zaretskii
0 siblings, 2 replies; 4+ messages in thread
From: cohagan @ 2015-04-13 21:23 UTC (permalink / raw)
To: help-gnu-emacs
I'm trying to use Emacs as my dev environment for Clojure programming under Windows 8.1. When I open a subprocess (via M-x shell) I get a command prompt as expected. I can then run "lein test" and my unit tests are run as expected -- with output to the shell buffer as expected.
If, however, I enter "lein repl" then the REPL starts as expected, but is non responsive. For example, if I enter (+ 1 2) at the user=> prompt (followed by Enter) I get no response at all. The input isn't echoed (as expected) and no output at all appears.
Note that "lein repl" runs fine at a normal command prompt (or within a subprocess buffer in Epsilon (an Emacs clone.)) This problem occurs on 3 different machines.
This has worked for me in the past so obviously something has broken, but I haven't a clue what it might be or how to troubleshoot.
Any pointers/suggestions would be greatly appreciated.
Thanks in advance,
Bill
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "lein repl" malfunctions in Emacs (24.3.1) subprocess?
2015-04-13 21:23 "lein repl" malfunctions in Emacs (24.3.1) subprocess? cohagan
@ 2015-04-13 21:47 ` cohagan
2015-04-14 2:38 ` Eli Zaretskii
1 sibling, 0 replies; 4+ messages in thread
From: cohagan @ 2015-04-13 21:47 UTC (permalink / raw)
To: help-gnu-emacs
Well, I of course figured this out (sort of) shortly after posting. I should have been using cider-jack-in rather than "lein repl" to get a Clojure REPL going in a buffer. So, my immediate problem is solved; however I'm still curious as to why the lein repl won't work in Emacs?
Bill
On Monday, April 13, 2015 at 4:23:48 PM UTC-5, coh...@acm.org wrote:
> I'm trying to use Emacs as my dev environment for Clojure programming under Windows 8.1. When I open a subprocess (via M-x shell) I get a command prompt as expected. I can then run "lein test" and my unit tests are run as expected -- with output to the shell buffer as expected.
>
> If, however, I enter "lein repl" then the REPL starts as expected, but is non responsive. For example, if I enter (+ 1 2) at the user=> prompt (followed by Enter) I get no response at all. The input isn't echoed (as expected) and no output at all appears.
>
> Note that "lein repl" runs fine at a normal command prompt (or within a subprocess buffer in Epsilon (an Emacs clone.)) This problem occurs on 3 different machines.
>
> This has worked for me in the past so obviously something has broken, but I haven't a clue what it might be or how to troubleshoot.
>
> Any pointers/suggestions would be greatly appreciated.
>
> Thanks in advance,
> Bill
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "lein repl" malfunctions in Emacs (24.3.1) subprocess?
2015-04-13 21:23 "lein repl" malfunctions in Emacs (24.3.1) subprocess? cohagan
2015-04-13 21:47 ` cohagan
@ 2015-04-14 2:38 ` Eli Zaretskii
2015-04-15 21:55 ` Thien-Thi Nguyen
1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2015-04-14 2:38 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Mon, 13 Apr 2015 14:23:47 -0700 (PDT)
> From: cohagan@acm.org
>
> I'm trying to use Emacs as my dev environment for Clojure programming under Windows 8.1. When I open a subprocess (via M-x shell) I get a command prompt as expected. I can then run "lein test" and my unit tests are run as expected -- with output to the shell buffer as expected.
>
> If, however, I enter "lein repl" then the REPL starts as expected, but is non responsive. For example, if I enter (+ 1 2) at the user=> prompt (followed by Enter) I get no response at all. The input isn't echoed (as expected) and no output at all appears.
>
> Note that "lein repl" runs fine at a normal command prompt (or within a subprocess buffer in Epsilon (an Emacs clone.)) This problem occurs on 3 different machines.
>
> This has worked for me in the past so obviously something has broken, but I haven't a clue what it might be or how to troubleshoot.
Likely a buffering issue. Emacs on Windows runs subprocesses via a
pipe, and many programs then buffer their stdout fully, unlike line
buffering they use when run from a shell prompt.
If "lein repl", whatever that is, has an option to control buffering,
or there's a variable you can set or command you can issue to that
effect inside "lein repl", they will likely fix the problem.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "lein repl" malfunctions in Emacs (24.3.1) subprocess?
2015-04-14 2:38 ` Eli Zaretskii
@ 2015-04-15 21:55 ` Thien-Thi Nguyen
0 siblings, 0 replies; 4+ messages in thread
From: Thien-Thi Nguyen @ 2015-04-15 21:55 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]
() Eli Zaretskii <eliz@gnu.org>
() Tue, 14 Apr 2015 05:38:09 +0300
Likely a buffering issue. Emacs on Windows runs subprocesses
via a pipe, and many programs then buffer their stdout fully,
unlike line buffering they use when run from a shell prompt.
If "lein repl", whatever that is, has an option to control
buffering, or there's a variable you can set or command you
can issue to that effect inside "lein repl", they will likely
fix the problem.
Another possible weirdness is EOL convention. But anyway...
You found a solution in ‘cider-jack-in’. Why don't you examine
its source code, examine the ‘M-x shell’ source code and post
the conceptual diff? (If not you, then Someone ought to do it.)
source but no reading of it: we are blind.
reading of source but no understanding: we are dumb.
understanding of one but not of many: we are alone.
how funny the universe allows us to say "we" are "alone". :-D
--
Thien-Thi Nguyen -----------------------------------------------
(if you're human and you know it) read my lisp:
(defun responsep (type via)
(case type
(technical (eq 'mailing-list via))
...))
---------------------------------------------- GPG key: 4C807502
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-15 21:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-13 21:23 "lein repl" malfunctions in Emacs (24.3.1) subprocess? cohagan
2015-04-13 21:47 ` cohagan
2015-04-14 2:38 ` Eli Zaretskii
2015-04-15 21:55 ` Thien-Thi Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).