From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Watchpoints for emacs lisp. Date: Tue, 11 May 2010 09:43:21 -0400 Message-ID: References: <28512483.post@talk.nabble.com> <28523705.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1273585428 26908 80.91.229.12 (11 May 2010 13:43:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 May 2010 13:43:48 +0000 (UTC) Cc: Emacs-devel@gnu.org To: "alin.s" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 11 15:43:44 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 1OBpkM-000861-IR for ged-emacs-devel@m.gmane.org; Tue, 11 May 2010 15:43:42 +0200 Original-Received: from localhost ([127.0.0.1]:58299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBpkJ-0000w1-33 for ged-emacs-devel@m.gmane.org; Tue, 11 May 2010 09:43:39 -0400 Original-Received: from [140.186.70.92] (port=51243 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBpkD-0000vu-Im for Emacs-devel@gnu.org; Tue, 11 May 2010 09:43:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBpkB-00078Q-LG for Emacs-devel@gnu.org; Tue, 11 May 2010 09:43:33 -0400 Original-Received: from splat.raeburn.org ([69.25.196.39]:61530 helo=raeburn.org) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBpk3-00077D-Ux for Emacs-devel@gnu.org; Tue, 11 May 2010 09:43:31 -0400 Original-Received: from squish.raeburn.org (squish.raeburn.org [10.0.0.172]) by raeburn.org (8.14.3/8.14.1) with ESMTP id o4BDhLed016839; Tue, 11 May 2010 09:43:21 -0400 (EDT) In-Reply-To: <28523705.post@talk.nabble.com> X-Mailer: Apple Mail (2.1078) 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:124701 Archived-At: On May 11, 2010, at 08:54, alin.s wrote: > I think to do it so: >=20 > I insert to the struct Lisp_Symbol a field :watched: . So, no support for watching for an element of an array or pair to be = changed, or part of a string? > I write a function whose input it a string S. This function looks for = the > given symbol in the corresponding obarray (global and local = environment). > When it finds the symbol whose name is S , it sets the flag :watched: = to > true. >=20 > Afterwards, in ALL functions that are able to change the value of a = symbol, > 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 = given > symbol ? If you do it this way, I think having a Lisp function take a symbol in = which to set the flag, and having a user-callable function which uses = (interactive "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 provided directly in lisp by the developer. What about changes to the property list, or function value, of a symbol? Ken=