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

Discussion in 'Perl Misc' started by Adam Funk, Jan 24, 2007.

  1. Adam Funk

    Adam Funk Guest

    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.
    Adam Funk, Jan 24, 2007
    #1
    1. Advertising

  2. > 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
    Stefan Monnier, Jan 24, 2007
    #2
    1. Advertising

  3. Adam Funk

    Adam Funk Guest

    On 2007-01-24, Stefan Monnier wrote:

    > 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)
    Adam Funk, Jan 24, 2007
    #3
  4. >> 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>)


    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
    Stefan Monnier, Jan 26, 2007
    #4
  5. Adam Funk

    Adam Funk Guest

    On 2007-01-26, Stefan Monnier wrote:

    >>> 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>)

    >
    > 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.


    Thanks. I've taken this to the CPAN forum:

    http://www.cpanforum.com/posts/4183
    Adam Funk, Jan 29, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pedro Werneck
    Replies:
    0
    Views:
    444
    Pedro Werneck
    Aug 18, 2003
  2. Yaroslav Bulatov
    Replies:
    1
    Views:
    478
    Fernando Perez
    Aug 3, 2004
  3. jmDesktop
    Replies:
    15
    Views:
    481
  4. Francesco Malvezzi

    iconv emacs trouble

    Francesco Malvezzi, Jul 15, 2009, in forum: Ruby
    Replies:
    1
    Views:
    136
    Everton J. Carpes
    Jul 16, 2009
  5. Replies:
    4
    Views:
    292
    ccc31807
    Jul 29, 2011
Loading...

Share This Page