From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: How to debug modification to a variable value? Date: Tue, 26 Jan 2010 09:00:16 +0100 Message-ID: <87d40x5m9b.fsf@thinkpad.tsdh.de> References: <87636pvrdj.fsf@thinkpad.tsdh.de> <9131EBDDBDBF4BC384201871CA79A2BE@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264492839 9768 80.91.229.12 (26 Jan 2010 08:00:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jan 2010 08:00:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 26 09:00:32 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NZgLd-0006ba-O6 for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2010 09:00:30 +0100 Original-Received: from localhost ([127.0.0.1]:41739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZgLe-0003m0-SD for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2010 03:00:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZgLZ-0003lG-OY for emacs-devel@gnu.org; Tue, 26 Jan 2010 03:00:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZgLV-0003hu-ML for emacs-devel@gnu.org; Tue, 26 Jan 2010 03:00:25 -0500 Original-Received: from [199.232.76.173] (port=44631 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZgLV-0003hr-JB for emacs-devel@gnu.org; Tue, 26 Jan 2010 03:00:21 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:41056) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NZgLU-0003ac-Sx for emacs-devel@gnu.org; Tue, 26 Jan 2010 03:00:21 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZgLU-0001Ns-4X for emacs-devel@gnu.org; Tue, 26 Jan 2010 03:00:20 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id E555E78A23C3; Tue, 26 Jan 2010 09:00:18 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18702-01; Tue, 26 Jan 2010 09:00:16 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad.tsdh.de (wlan-150.uni-koblenz.de [141.26.93.150]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 713D6789B93D; Tue, 26 Jan 2010 09:00:16 +0100 (CET) Mail-Followup-To: "Drew Adams" , In-Reply-To: <9131EBDDBDBF4BC384201871CA79A2BE@us.oracle.com> (Drew Adams's message of "Mon, 25 Jan 2010 13:08:54 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:120420 Archived-At: "Drew Adams" writes: >> I also removed all destructive function calls in there, although it >> operates only on a list created by `mapcar', and that's a copy >> anyway, right? > > It's a top-level copy only. That is, each element in the original list > is processed by the function arg, and the results are consed up to > produce a new list. I see. But the only destructive functions I used are `nconc' and `delq' (to filter nil values), and those operate on a list produced with `cons' and `list' only on basic values. And when the problem appeared, I changed those calls to `append' and `remove' and re-evaled the function definition (*), but the problem persisted. And another thing which is a bit puzzling: I used that mode for month, and till yesterday it never occured. If it was a problem with destructive functions, shouldn't it occur every time? The main question still stands: is it possible to debug the modification of a variable's value? That would also find the place in the code where a destructive function causes harm. Bye, Tassilo (*) Maybe I forgot the re-evaluation? Well, I'll see if it occurs again...