skeeto / skewer-mode

Live web development in Emacs
The Unlicense
1.1k stars 57 forks source link

Fixed an error if no hexl program can be found. #11

Closed ScottyB closed 11 years ago

ScottyB commented 11 years ago

When I run skewer-repl I got an error saying no hexl program could be found. Not sure why this started happening but this patch fixed the issue.

skeeto commented 11 years ago

What's going on here was me copying IELM, because it's also a comint REPL with no associated process. Unfortunately comint assumes a process is associated with the buffer, so a dummy process has to be created. IELM does this by running hexl, a program distributed with Emacs. This comment is from ielm.el,

;; Was cat, but on non-Unix platforms that might not exist, so
;; use hexl instead, which is part of the Emacs distribution.

If skewer-repl wasn't working for you then IELM shouldn't work for you either. Can you test that assumption for me?

Instead of falling back to cat there's an even better solution: create a PTY process rather than relying on the existence of a particular program in the $PATH. I just made this change in 62f24e4. Does that work for you?

ScottyB commented 11 years ago

That is the strange thing, IELM is working for me. I guess all that means was Emacs can find cat but not hexl. Your patch fixes the problem for me though.