From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Roger Mason Newsgroups: gmane.emacs.help Subject: Re: calc-embedded-activate Date: Wed, 14 Jan 2004 07:50:01 -0330 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <87smij32wn.fsf@truman.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074079308 16834 80.91.224.253 (14 Jan 2004 11:21:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Jan 2004 11:21:48 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 14 12:21:44 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Agj5j-0004f7-00 for ; Wed, 14 Jan 2004 12:21:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Agj5Q-0006Vo-Gq for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jan 2004 06:21:24 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Agj4f-0006SA-2m for help-gnu-emacs@gnu.org; Wed, 14 Jan 2004 06:20:37 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Agj48-0006C4-Gn for help-gnu-emacs@gnu.org; Wed, 14 Jan 2004 06:20:35 -0500 Original-Received: from [134.153.37.4] (helo=minnie.esd.mun.ca) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Agj48-0006By-12 for help-gnu-emacs@gnu.org; Wed, 14 Jan 2004 06:20:04 -0500 Original-Received: from minnie.esd.mun.ca (minnie.esd.mun.ca [134.153.37.4]) by minnie.esd.mun.ca (8.8.7/8.8.7) with ESMTP id HAA23150 for ; Wed, 14 Jan 2004 07:50:02 -0330 Original-To: help-gnu-emacs@gnu.org In-Reply-To: <87smij32wn.fsf@truman.edu> (Jay Belanger's message of "Tue, 13 Jan 2004 16:22:00 -0600") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.1 (gnu/linux) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16022 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16022 Hello, Jay Belanger writes: > Roger Mason writes: > > ... >> %Embed >> % $f := 2$ >> % $g := 2$ >> % $foo := 5$ >> % $f + g => $ > ... >> The key combination `C-u 1 M-# a' leads to the following >> backtrace: >> >> Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) > > It looks like a bug with calc-embed, which perhaps can be fixed by > commenting out the lines > (if (looking-at calc-embedded-open-formula) > (goto-char (match-end 1))) > from the definition of calc-do-embed-activate in calc-embed.el. > (It works for me.) > ( lines snipped ) Thanks for your response. I discovered later that terminating the %Embed % $...$ group with another %Embed cures the problem. I'm not sure if this is consistent with your analysis or not. The terminating %Embed is not part of the regex in calc-do-embedded-activate, indeed that regex pertains only to the announcement of a group of formulae, so the `correct' behaviour could be fortuitous. Commenting out the ofending lines is cleaner, I'll try it here and report back. Having got `M-# a' to work, albeit by trial and error, I have been trying to update all the fomulae in the buffer using `C-u 1 M-# u'. This command fails silently: nothing happens and there is no error signalled. `M-u' works as described in the manual, so I assume the bug (if it is a bug and not my stupidity) is in the code that steps through the buffer finding active formulae. I presume the best way to proceed is to improve my aquaintance with the lisp debugger, but if anyone has any suggestions I'd be grateful to receive them. Thanks, Roger Mason