From: Santanu
Subject: Is this a bug in elisp
Date: 
Message-ID: <ff2d8752-dc42-4f6c-ad72-c2316d366007@b40g2000prf.googlegroups.com>
Hello Everybody,

I am using GNU Emacs-22.1.50.1 (Ubuntu 7.10). I was having some
problems with the verilog-mode in this version of Emacs (although
it worked perfectly in Emacs-21.x). It seems that I found the location
of the problem. But since I don't know elisp, I am unable to
understand
the cause of the problem. So I am just inserting below what I think
is the relevant portion of the code:

-----------------------------------------------
(define-skeleton verilog-sk-prompt-msb
  "Prompt for least significant bit specification."
  "msb:" str & ?: & (verilog-sk-prompt-lsb) | -1 )

(define-skeleton verilog-sk-prompt-lsb
  "Prompt for least significant bit specification."
  "lsb:" str )
-----------------------------------------------

I just defined those functions above in the *scratch*
buffer. Then tried to evaluate (verilog-sk-prompt-msb).
Instead of the expected result, I am placed in a debug
buffer with the following content I cannot figure out:
(Doing the same in emacs-21.x does not cause any
problem)
--------------------------------------------------
Debugger entered--Lisp error: (error "Lisp nesting exceeds `max-lisp-
eval-depth'")
  skeleton-internal-1(t t nil)
  skeleton-internal-1(t t nil)
  skeleton-internal-1(t t nil)
  ....
  ....
  skeleton-internal-1(t t nil)
  skeleton-internal-1(t t nil)
  skeleton-internal-1((verilog-sk-prompt-lsb) nil nil)
  byte-code(··@Ã       #‡" [skeleton recursive skeleton-internal-1
nil] 4)
  skeleton-internal-list(("msb:" str & 58 & (verilog-sk-prompt-lsb) |
-1) nil)
  (let nil (skeleton-internal-list skeleton str))
  eval((let nil (skeleton-internal-list skeleton str)))
  skeleton-insert(("msb:" str & 58 & (verilog-sk-prompt-lsb) | -1) nil
nil)
  skeleton-proxy-new(("msb:" str & 58 & (verilog-sk-prompt-lsb) | -1)
nil nil)
  verilog-sk-prompt-msb()
  eval((verilog-sk-prompt-msb))
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp)
--------------------------------------------------------

I feel like I am getting into an endless recursion here. Dunno how.
It would be very helpful if anyone could suggest/provide a fix.

Thanks in advance for your help.

Regards,
Santanu Chatterjee

From: Tim X
Subject: Re: Is this a bug in elisp
Date: 
Message-ID: <87y7c0qm6l.fsf@lion.rapttech.com.au>
Santanu <·············@gmail.com> writes:

> Hello Everybody,
>
> I am using GNU Emacs-22.1.50.1 (Ubuntu 7.10). I was having some
> problems with the verilog-mode in this version of Emacs (although
> it worked perfectly in Emacs-21.x). It seems that I found the location
> of the problem. But since I don't know elisp, I am unable to
> understand
> the cause of the problem. So I am just inserting below what I think
> is the relevant portion of the code:
>
> -----------------------------------------------
> (define-skeleton verilog-sk-prompt-msb
>   "Prompt for least significant bit specification."
>   "msb:" str & ?: & (verilog-sk-prompt-lsb) | -1 )
>
> (define-skeleton verilog-sk-prompt-lsb
>   "Prompt for least significant bit specification."
>   "lsb:" str )
> -----------------------------------------------
>
> I just defined those functions above in the *scratch*
> buffer. Then tried to evaluate (verilog-sk-prompt-msb).
> Instead of the expected result, I am placed in a debug
> buffer with the following content I cannot figure out:
> (Doing the same in emacs-21.x does not cause any
> problem)
> --------------------------------------------------
> Debugger entered--Lisp error: (error "Lisp nesting exceeds `max-lisp-
> eval-depth'")

Firstly, this question would be better sent to the gnu.emacs.help group as
it is emacs lisp specific and not a general lisp question. 

There are many possible causes for the error you see. However, the most
common one I've seen for this error is when you are running elisp 
which has been byte compiled for a different version of emacs to the one
you are running.  In your current situation, I would suspect that you have
byte compiled the code using emacs 21 and are trying to run it in emacs
22. 

Another possible explination is that changes in elisp between versions is
the problem. Check the NEWS and PROBLEMS file for emacs 22. There are often
changes/improvements/extensions in newer versions that can break some
code. In the NEWS file, there is usually sections on visible (interface)
changes and function/code changes in emacs lisp. remember that emacs lisp
is not CL and doesn't have a well defined and stable spec (though its
usually pretty good). 

Tim



-- 
tcross (at) rapttech dot com dot au
From: Santanu
Subject: Re: Is this a bug in elisp
Date: 
Message-ID: <1d44505a-8782-488f-b6e1-6e6e74d934c1@b40g2000prf.googlegroups.com>
On Dec 12, 2:47 pm, Tim X <····@nospam.dev.null> wrote:
> Santanu <·············@gmail.com> writes:
...
> Firstly, this question would be better sent to the gnu.emacs.help group as
> it is emacs lisp specific and not a general lisp question.

First of all, thanks for your response.
I will post this in gnu.emacs.help shortly (actually I was searching
for an elisp
group but could not find one).

> ...
> In your current situation, I would suspect that you have
> byte compiled the code using emacs 21 and are trying to run it in emacs
> 22.

I don't know for sure how to verify this. All I can say is that I
installed both versions using
apt-get in "ubuntu 7.10" for which the default emacs version is 22.
However, after
getting your reply, I tried the same thing on a separate Ubuntu-7.10
machine without
any emacs installed previously (so only the default emacs 22 was
installed) but I got
the same result.

> Another possible explanation is that changes in elisp between versions is
> the problem. Check the NEWS and PROBLEMS file for emacs 22. There are often
> changes/improvements/extensions in newer versions that can break some
> code. In the NEWS file, there is usually sections on visible (interface)
> changes and function/code changes in emacs lisp. remember that emacs lisp
> is not CL and doesn't have a well defined and stable spec (though its
> usually pretty good).

Will check this out.

Thanks again.

Regards,
Santanu Chatterjee
From: Barry Margolin
Subject: Re: Is this a bug in elisp
Date: 
Message-ID: <barmar-EB6D63.00531313122007@comcast.dca.giganews.com>
In article 
<····································@b40g2000prf.googlegroups.com>,
 Santanu <·············@gmail.com> wrote:

> On Dec 12, 2:47 pm, Tim X <····@nospam.dev.null> wrote:
> > Santanu <·············@gmail.com> writes:
> ...
> > Firstly, this question would be better sent to the gnu.emacs.help group as
> > it is emacs lisp specific and not a general lisp question.
> 
> First of all, thanks for your response.
> I will post this in gnu.emacs.help shortly (actually I was searching
> for an elisp
> group but could not find one).

Didn't you already do that?  I remember seeing this same question posted 
in an emacs group yesterday.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: santanu
Subject: Re: Is this a bug in elisp
Date: 
Message-ID: <21169f7c-f829-4bf3-83bd-9ea645f252b2@i29g2000prf.googlegroups.com>
On Dec 13, 10:53 am, Barry Margolin <······@alum.mit.edu> wrote:
> > I will post this in gnu.emacs.help shortly (actually I was searching
> > for an elisp
> > group but could not find one).
>
> Didn't you already do that?  I remember seeing this same question posted
> in an emacs group yesterday.

:-) Well, I posted in comp.lang.lisp, gnu.emacs simultaneously. Then
I
posted the same thing in gnu.emacs.help as suggested. Now I am
getting some identical responses from multiple groups. :-)

-Santanu
From: John Thingstad
Subject: Re: Is this a bug in elisp
Date: 
Message-ID: <op.t2708sxsut4oq5@pandora.alfanett.no>
P� Wed, 12 Dec 2007 10:47:30 +0100, skrev Tim X <····@nospam.dev.null>:

> Santanu <·············@gmail.com> writes:
>
> Firstly, this question would be better sent to the gnu.emacs.help group  
> as
> it is emacs lisp specific and not a general lisp question.
>

You might want to try comp.emacs which is more elisp oriented.

--------------
John Thingstad