all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* General Approach to Troubleshooting Inferior Process
@ 2008-08-19 17:20 formido
  2008-08-20  0:01 ` formido
  2008-08-20  3:50 ` Pascal J. Bourguignon
  0 siblings, 2 replies; 5+ messages in thread
From: formido @ 2008-08-19 17:20 UTC (permalink / raw)
  To: help-gnu-emacs

So, I installed the elisp packages for inferior ruby and and ruby
mode. Using the repl in the interpreter works correctly. However,
sending the ruby process a function definition, or evaluating a region
if it's a function definition, fails. It errors with, 'cannot make nil
into string' or some such.

In general, what sorts of things could I do to troubleshoot this? The
first thing I thought of was 'well, what's emacs *actually* sending to
the process?' It uses a function 'process-send-region' which
apparently takes a starting point and ending point in the target
buffer. What function can I use to display the text between those two
points?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: General Approach to Troubleshooting Inferior Process
  2008-08-19 17:20 General Approach to Troubleshooting Inferior Process formido
@ 2008-08-20  0:01 ` formido
  2008-08-20  3:50 ` Pascal J. Bourguignon
  1 sibling, 0 replies; 5+ messages in thread
From: formido @ 2008-08-20  0:01 UTC (permalink / raw)
  To: help-gnu-emacs

On Aug 19, 10:20 am, formido <form...@gmail.com> wrote:
> So, I installed the elisp packages for inferior ruby and and ruby
> mode. Using the repl in the interpreter works correctly. However,
> sending the ruby process a function definition, or evaluating a region
> if it's a function definition, fails. It errors with, 'cannot make nil
> into string' or some such.
>
> In general, what sorts of things could I do to troubleshoot this? The
> first thing I thought of was 'well, what's emacs *actually* sending to
> the process?' It uses a function 'process-send-region' which
> apparently takes a starting point and ending point in the target
> buffer. What function can I use to display the text between those two
> points?

Previous experience was on X11 Emacs on a Mac. Tried on NTEmacs now,
and same problem. I don't know if ruby-mode just doesn't work the same
as, say, python-mode or erlang-mode, but this is getting pretty
annoying.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: General Approach to Troubleshooting Inferior Process
  2008-08-19 17:20 General Approach to Troubleshooting Inferior Process formido
  2008-08-20  0:01 ` formido
@ 2008-08-20  3:50 ` Pascal J. Bourguignon
  2008-08-20 16:33   ` formido
  2008-08-20 17:56   ` formido
  1 sibling, 2 replies; 5+ messages in thread
From: Pascal J. Bourguignon @ 2008-08-20  3:50 UTC (permalink / raw)
  To: help-gnu-emacs

formido <formido@gmail.com> writes:

> So, I installed the elisp packages for inferior ruby and and ruby
> mode. Using the repl in the interpreter works correctly. However,
> sending the ruby process a function definition, or evaluating a region
> if it's a function definition, fails. It errors with, 'cannot make nil
> into string' or some such.


Well you would have to debug emacs lisp code.  Are you ready to do that?
The first step would be to enable the debugger:
M-x set-variable RET debug-on-error RET t RET


But in my experience, when there is this kind of errors on executing
some basic emacs command,  it's because the el package installed
doesn't match the version of emacs used.

Perhaps you have or had a different version of emacs installed in
/usr/local and some .el from /usr/local/share/emacs are used by
/usr/bin/emacs?  


> In general, what sorts of things could I do to troubleshoot this? The
> first thing I thought of was 'well, what's emacs *actually* sending to
> the process?' It uses a function 'process-send-region' which
> apparently takes a starting point and ending point in the target
> buffer. What function can I use to display the text between those two
> points?

(buffer-substring start end) will return a string containing the text
between start and end in the current buffer.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Debugging?  Klingons do not debug! Our software does not coddle the
weak."


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: General Approach to Troubleshooting Inferior Process
  2008-08-20  3:50 ` Pascal J. Bourguignon
@ 2008-08-20 16:33   ` formido
  2008-08-20 17:56   ` formido
  1 sibling, 0 replies; 5+ messages in thread
From: formido @ 2008-08-20 16:33 UTC (permalink / raw)
  To: help-gnu-emacs

On Aug 19, 8:50 pm, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> formido <form...@gmail.com> writes:
> > So, I installed the elisp packages for inferior ruby and and ruby
> > mode. Using the repl in the interpreter works correctly. However,
> > sending the ruby process a function definition, or evaluating a region
> > if it's a function definition, fails. It errors with, 'cannot make nil
> > into string' or some such.
>
> Well you would have to debug emacs lisp code.  Are you ready to do that?
> The first step would be to enable the debugger:
> M-x set-variable RET debug-on-error RET t RET

Indeed I am. :) I'm not new to the world of debugging. I expect me and
Emacs to have many long fruitful nights of it going forward.

> But in my experience, when there is this kind of errors on executing
> some basic emacs command,  it's because the el package installed
> doesn't match the version of emacs used.
>
> Perhaps you have or had a different version of emacs installed in
> /usr/local and some .el from /usr/local/share/emacs are used by
> /usr/bin/emacs?  

It's the latest version of the ruby packages from the repository, but
there don't seem to have been changes to it in the last couple years.
I've tried it now on 3 different Emacs on 2 different platforms.
What's weird is, there's an Emacs Rails package out on the web, and it
requires Emacs 22, so I don't know if those guys just don't use ruby-
mode this way or what. Even though I'm an elisp newbie, the code for
comint-send-region looks pretty straightforward--why would a new Emacs
version have broken it? I don't know, but it's not working.

> > In general, what sorts of things could I do to troubleshoot this? The
> > first thing I thought of was 'well, what's emacs *actually* sending to
> > the process?' It uses a function 'process-send-region' which
> > apparently takes a starting point and ending point in the target
> > buffer. What function can I use to display the text between those two
> > points?
>
> (buffer-substring start end) will return a string containing the text
> between start and end in the current buffer.

Ah, awesome.

> --
> __Pascal Bourguignon__                    http://www.informatimago.com/
>
> "Debugging?  Klingons do not debug! Our software does not coddle the
> weak."

Cute. ;)

Michael



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: General Approach to Troubleshooting Inferior Process
  2008-08-20  3:50 ` Pascal J. Bourguignon
  2008-08-20 16:33   ` formido
@ 2008-08-20 17:56   ` formido
  1 sibling, 0 replies; 5+ messages in thread
From: formido @ 2008-08-20 17:56 UTC (permalink / raw)
  To: help-gnu-emacs

On Aug 19, 8:50 pm, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> formido <form...@gmail.com> writes:
> > So, I installed the elisp packages for inferior ruby and and ruby
> > mode. Using the repl in the interpreter works correctly. However,
> > sending the ruby process a function definition, or evaluating a region
> > if it's a function definition, fails. It errors with, 'cannot make nil
> > into string' or some such.
>
> Well you would have to debug emacs lisp code.  Are you ready to do that?
> The first step would be to enable the debugger:
> M-x set-variable RET debug-on-error RET t RET

Indeed I am. :) I'm not new to the world of debugging. I expect me and
Emacs to have many long fruitful nights of it going forward.

> But in my experience, when there is this kind of errors on executing
> some basic emacs command,  it's because the el package installed
> doesn't match the version of emacs used.
>
> Perhaps you have or had a different version of emacs installed in
> /usr/local and some .el from /usr/local/share/emacs are used by
> /usr/bin/emacs?  

It's the latest version of the ruby packages from the repository, but
there don't seem to have been changes to it in the last couple years.
I've tried it now on 3 different Emacs on 2 different platforms.
What's weird is, there's an Emacs Rails package out on the web, and it
requires Emacs 22, so I don't know if those guys just don't use ruby-
mode this way or what. Even though I'm an elisp newbie, the code for
comint-send-region looks pretty straightforward--why would a new Emacs
version have broken it? I don't know, but it's not working.

> > In general, what sorts of things could I do to troubleshoot this? The
> > first thing I thought of was 'well, what's emacs *actually* sending to
> > the process?' It uses a function 'process-send-region' which
> > apparently takes a starting point and ending point in the target
> > buffer. What function can I use to display the text between those two
> > points?
>
> (buffer-substring start end) will return a string containing the text
> between start and end in the current buffer.

Ah, awesome.

> --
> __Pascal Bourguignon__                    http://www.informatimago.com/
>
> "Debugging?  Klingons do not debug! Our software does not coddle the
> weak."

Cute. ;)

Michael



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-20 17:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-19 17:20 General Approach to Troubleshooting Inferior Process formido
2008-08-20  0:01 ` formido
2008-08-20  3:50 ` Pascal J. Bourguignon
2008-08-20 16:33   ` formido
2008-08-20 17:56   ` formido

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.