From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: formido Newsgroups: gmane.emacs.help Subject: Re: General Approach to Troubleshooting Inferior Process Date: Wed, 20 Aug 2008 09:33:15 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8fe29c22-8352-4427-8ba3-f07097aab5ee@j33g2000pri.googlegroups.com> References: <1cced856-27be-4653-8795-fb009514e1b1@v39g2000pro.googlegroups.com> <873al0fip6.fsf@hubble.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1219250458 18076 80.91.229.12 (20 Aug 2008 16:40:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Aug 2008 16:40:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 20 18:41:50 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KVqkb-00044w-1F for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Aug 2008 18:41:37 +0200 Original-Received: from localhost ([127.0.0.1]:52502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVqjd-00026x-K9 for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Aug 2008 12:40:37 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!j33g2000pri.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 57 Original-NNTP-Posting-Host: 66.125.32.93 Original-X-Trace: posting.google.com 1219249995 24440 127.0.0.1 (20 Aug 2008 16:33:15 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 20 Aug 2008 16:33:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j33g2000pri.googlegroups.com; posting-host=66.125.32.93; posting-account=ivEBWwoAAAAvVw947tp2U-HBcoAwWEMu User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:161484 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56826 Archived-At: On Aug 19, 8:50=A0pm, p...@informatimago.com (Pascal J. Bourguignon) wrote: > formido 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. =A0Are 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, =A0it'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? =A0 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__ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0http://www.= informatimago.com/ > > "Debugging? =A0Klingons do not debug! Our software does not coddle the > weak." Cute. ;) Michael