Trouble running Emacs-EPL (to run perl in emacs).

A

Adam Funk

I'm trying to use Emacs-EPL to run perl commands in emacs. (My
installation procedure is listed below.) When I run emacs and do

M-x load-library perl

I get the message

Loading perl (source)...done

Then

M-x perl-eval-expression

and at the "Eval Perl: " prompt I type

2+2<CR>

and it hangs until I press C-g. `ps ux` in another xterm shows the
following processes running (after I used C-g twice and tried a third time):

emacs
/usr/bin/perl -MEmacs::EPL=0.007,:server -MEmacs -MEmacs::Lisp -eEmacs::EPL::loop
/usr/bin/perl -MEmacs::EPL=0.007,:server -MEmacs -MEmacs::Lisp -eEmacs::EPL::loop
/usr/bin/perl -MEmacs::EPL=0.007,:server -MEmacs -MEmacs::Lisp -eEmacs::EPL::loop

Any idea what I'm doing wrong?

Thanks,
Adam



~~~~~ my installation ~~~~~

I downloaded

http://john-edwin-tobey.org/perlmacs/src/Emacs-EPL-0.7.tar.gz

and followed the instructions with this result:

/usr/local/share/perl/5.8.8/
|-- Emacs
| |-- EPL
| | `-- Debug.pm
| |-- EPL.pm
| |-- Forward.pm
| `-- Lisp.pm
`-- Emacs.pm

(I've checked that /usr/local/share/perl/5.8.8/ is in my perl library
path.)

Then I copied the files

epl-compat.el epl.el epl-server.el perl-core.el perl.el

into ~/.local/site-lisp/ , which is in my load-path in emacs.
 
S

Stefan Monnier

I'm trying to use Emacs-EPL to run perl commands in emacs. (My
installation procedure is listed below.) When I run emacs and do
M-x load-library perl
I get the message
Loading perl (source)...done
Then
M-x perl-eval-expression
and at the "Eval Perl: " prompt I type
2+2<CR>
and it hangs until I press C-g. `ps ux` in another xterm shows the
following processes running (after I used C-g twice and tried a third time):
emacs
/usr/bin/perl -MEmacs::EPL=0.007,:server -MEmacs -MEmacs::Lisp -eEmacs::EPL::loop
/usr/bin/perl -MEmacs::EPL=0.007,:server -MEmacs -MEmacs::Lisp -eEmacs::EPL::loop
/usr/bin/perl -MEmacs::EPL=0.007,:server -MEmacs -MEmacs::Lisp -eEmacs::EPL::loop
Any idea what I'm doing wrong?

O know nothing about Emacs-EPL, but if you turn on the
"Enter Debugger on Quit/C-g" in the Options menu, then you should get
a backtrace when you hit C-g. So reproduce the above hang and then press
C-g to interrupt it and then show us the backtrace.


Stefan
 
A

Adam Funk

know nothing about Emacs-EPL, but if you turn on the
"Enter Debugger on Quit/C-g" in the Options menu, then you should get
a backtrace when you hit C-g. So reproduce the above hang and then press
C-g to interrupt it and then show us the backtrace.

OK, here it is. I hope someone can read it!


Debugger entered--Lisp error: (quit)
accept-process-output(#<process perl>)
(progn (accept-process-output out) (if (eobp) (error "No output from Perl")))
(if (eobp) (progn (accept-process-output out) (if ... ...)))
(when (eobp) (accept-process-output out) (if (eobp) (error "No output from Perl")))
(if ch (progn (unless ... ...) (backward-char)) (when (eobp) (accept-process-output out) (if ... ...)) (forward-char) (char-before))
(save-current-buffer (set-buffer (epl-interp-buffer)) (if ch (progn ... ...) (when ... ... ...) (forward-char) (char-before)))
(with-current-buffer (epl-interp-buffer) (if ch (progn ... ...) (when ... ... ...) (forward-char) (char-before)))
(let* ((out ...)) (with-current-buffer (epl-interp-buffer) (if ch ... ... ... ...)))
epl-read-char()
read(epl-read-char)
(let ((form ...) reply done msg) (epl-debug (format "Emacs(%d)<<< " ...) form "\n") (unwind-protect (setq reply ... done t) (when ... ... ...)) (epl-debug "Reply: " reply " (" (epl-interp-depth) ")\n") (setq msg (car reply) reply (cdr reply)) (cond (... ...) (... ... ... ...) (... nil) (... ... ... ...) (... ...) (... ...) (... ...) (t ...)))
(while t (let (... reply done msg) (epl-debug ... form "\n") (unwind-protect ... ...) (epl-debug "Reply: " reply " (" ... ")\n") (setq msg ... reply ...) (cond ... ... ... ... ... ... ... ...)) (or epl-debugging (with-current-buffer ... ...)))
(catch (quote return) (epl-debug "+++ " depth "\n") (epl-interp-set-depth (1+ depth)) (while t (let ... ... ... ... ... ...) (or epl-debugging ...)))
(unwind-protect (catch (quote return) (epl-debug "+++ " depth "\n") (epl-interp-set-depth ...) (while t ... ...)) (epl-debug "--- " depth "\n") (epl-interp-set-depth depth))
(let ((depth ...)) (unwind-protect (catch ... ... ... ...) (epl-debug "--- " depth "\n") (epl-interp-set-depth depth)))
epl-loop()
(condition-case err (epl-loop) (error (epl-destroy) (signal ... ...)))
(let* ((process-connection-type nil) (out ...) (epl-interp ...)) (condition-case err (epl-loop) (error ... ...)) (epl-interp-set-status (quote ready)) epl-interp)
perl-interpreter-new()
(setq perl-interpreter (perl-interpreter-new))
(if perl-interpreter (epl-check) (setq perl-interpreter (perl-interpreter-new)))
epl-init()
(epl-eval (epl-init) nil context "do { package main; " string " }")
perl-eval("2+2" scalar-context)
(prin1-to-string (perl-eval expression (if prefix ... ...)))
(message (prin1-to-string (perl-eval expression ...)))
perl-eval-expression("2+2" nil)
* call-interactively(perl-eval-expression)
execute-extended-command(nil)
* call-interactively(execute-extended-command)
 
S

Stefan Monnier

know nothing about Emacs-EPL, but if you turn on the
OK, here it is. I hope someone can read it!

Debugger entered--Lisp error: (quit)
accept-process-output(#<process perl>)

Hmm... so it's waiting for Perl output. Presumably, the output has already
arrived but for some reason Emacs-EPL did not recognize it.

You'll have to ask the Emacs-EPL people to debug this.


Stefan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,235
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top