From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "A. Soare" Newsgroups: gmane.emacs.devel Subject: Re: Watchpoints for emacs lisp. Date: Tue, 11 May 2010 15:54:12 +0200 (CEST) Message-ID: <8371144.1993831273586052309.JavaMail.www@wwinf4619> Reply-To: alinsoar@voila.fr NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1273586088 29547 80.91.229.12 (11 May 2010 13:54:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 May 2010 13:54:48 +0000 (UTC) Cc: "Emacs Dev \[emacs-devel\]" To: Ken Raeburn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 11 15:54:45 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OBpuu-0005iW-Ol for ged-emacs-devel@m.gmane.org; Tue, 11 May 2010 15:54:37 +0200 Original-Received: from localhost ([127.0.0.1]:54697 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBput-0004A1-N4 for ged-emacs-devel@m.gmane.org; Tue, 11 May 2010 09:54:35 -0400 Original-Received: from [140.186.70.92] (port=45570 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBpua-00045F-Uh for emacs-devel@gnu.org; Tue, 11 May 2010 09:54:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBpuZ-0000D9-2m for emacs-devel@gnu.org; Tue, 11 May 2010 09:54:16 -0400 Original-Received: from smtp3.voila.fr ([193.252.22.173]:23988 helo=smtp1.voila.fr) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBpuY-0000Cu-Rl for emacs-devel@gnu.org; Tue, 11 May 2010 09:54:15 -0400 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf4912.voila.fr (SMTP Server) with ESMTP id 6A0E3700008B; Tue, 11 May 2010 15:54:12 +0200 (CEST) Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf4912.voila.fr (SMTP Server) with ESMTP id 5D4D670000A9; Tue, 11 May 2010 15:54:12 +0200 (CEST) Original-Received: from wwinf4619 (wwinf4619 [10.232.13.63]) by mwinf4912.voila.fr (SMTP Server) with ESMTP id 4D554700008B; Tue, 11 May 2010 15:54:12 +0200 (CEST) X-ME-UUID: 20100511135412316.4D554700008B@mwinf4912.voila.fr X-Originating-IP: [93.112.68.217] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:124703 Archived-At: > > I insert to the struct Lisp_Symbol a field :watched: . >=20 > So, no support for watching for an element of an array or pair to be chan= ged, or part of a string? Hm... I thought only to symbols, true. Not to arrays, not to numbers. Can you use the change of an array if a symbol does not point to it? Probab= ly yes. There exist lambda function (functions without name), but probably = one can debug also the change of an array without name. ..... > > Afterwards, in ALL functions that are able to change the value of a sym= bol, > > I insert a checkpoint, which looks like that: > >=20 > > > corresponding procedure of the debugger> > >=20 > > Is it ok the algorithm ? In how many obarrays should I look for the giv= en > > symbol ? >=20 > If you do it this way, I think having a Lisp function take a symbol in wh= ich to set the flag, and having a user-callable function which uses (intera= ctive "S") (which asks the user for a symbol name in the main obarray), is = probably a good start. Anything that isn't in the main obarray can be prov= ided directly in lisp by the developer. >=20 > What about changes to the property list, or function value, of a symbol? >=20 Can you figure an algorithm for checking very fast (O (0)) whether a symbol= has a given property ? Yes, surely yes, if property lists would have been implemented with fast se= arch algo, which is not the case of emacs. =20 Alin ____________________________________________________ =C2=A0Les scandales de cannes, les palmes d'or, l'actualit=C3=A9 du festiva= l sur voila.fr http://evenementiel.voila.fr/festival-de-cannes2010/