emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Problems with (defvar foo) and Emacs 23


From: Bastien
Subject: Re: [O] Problems with (defvar foo) and Emacs 23
Date: Mon, 02 Apr 2012 08:12:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

Achim Gratz <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]