From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Problems with (defvar foo) and Emacs 23 Date: Mon, 02 Apr 2012 08:12:49 +0200 Message-ID: <87bona64ri.fsf@gnu.org> References: <87sjgngtzk.fsf@norang.ca> <87aa2vp5ri.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEaUK-0005wv-N4 for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 02:11:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEaUI-00049k-WF for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 02:11:36 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:50752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEaUI-00049U-NW for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 02:11:34 -0400 Received: by werj55 with SMTP id j55so1934992wer.0 for ; Sun, 01 Apr 2012 23:11:32 -0700 (PDT) In-Reply-To: <87aa2vp5ri.fsf@Rainer.invalid> (Achim Gratz's message of "Sun, 01 Apr 2012 22:16:17 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Achim Gratz Cc: emacs-orgmode@gnu.org Achim Gratz writes: > Bernt Hansen writes: >> I can see the variable in the source defined as >> >> lisp/org-clock.el:(defvar org-clock-state) ;; dynamically scoped into this function >> >> but I don't get a variable definition with this code in emacs 23.2.1. > > You aren't supposed to get one, as this should have been pulling in a > local variable defined elsewhere (from within another function). > >> If I change the definition to >> >> (defvar org-clock-state nil) >> >> then it works for me. > > Yes, but the bug introduced by renaming the variable is still there. > You do get a variable, but not the one you're supposed to be scoping. I fixed the problem with `org-clock-state'. This should be `org-state'. `state' is a local variable in many org.el functions, I renamed it to `org-state' in org-clock.el and in "caller" sexp from org.el. > Again, the missing value is not the problem. The problem arises when > the variable name in the caller and the callee becomes different. I'll > let Bastien and Martyn sort that one out... :-) Let's sort this out by slowly fixing problems that we can spot. -- Bastien