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

Re: org-drill and Preparing code for inclusion in emacspeak Mar 2015 11:45:06 +1100")



Hi Raman,

the issue is not with the function emacspeak-wizards-toggle-yyyymmdd-date-prouncer, but rather with the variable used to store the setting emacspeak-wizards-toggle-yyyymmdd-date-pronounce. 

I have the autoload for the function and that shows up with the grep. However, running package-list-packages still generates the void symbol error for the variable. 

What I think is going on is that the code in emacspeak-packages uses the variable, but if none of the autoloaded functions from the emacspeak-wizards file have been run prior to executing the package-list-packages function, the emacspeak advice in emacspeak-packages.el fails because the defvar for emacspeak-wizards-toggle-yyymmdd-pronounce has not been evaluated. As soon as you run one of the emacspeak-wizards autoloaded functions, the file is loaded and the defvar is evaluated and all is well. . 

This would explain why Bart was able to solve the issue by explicitly loading emacspeak-wizards and I was able to resolve it by ensuring an autoloaded function from emacspeak-wizards is run during my startup hook. 

To reproduce this issue, do

make clean, make config and make emacspeak

Modify your emacspeak init to ensure none of the autoloaded functions from emacspeak wizards are run during startup.

Run M-x package-list-packages as the first command you execute after startup initialisation has finished.

It looks like emacspeak-package.el is the only file other than emacspeak-wizards.el which has a reference to the variable emacspeak-wizards-yyyymmdd-date-pronounce, so an easy fix would be to put a require for emacspeak-wizards into emacspeak-package, but that feels a bit kludgy and would not stop a similar error should the variable be used in another file later on. I don't know if you can have autoloads for variables - I've only used them for functions and macros.

Tim




--
Tim Cross
IT Security Manager
Information Technology Directorate
University of New England
Armidale NSW 2351

Phone: +61 2 6773 3210
Mobile: +61 428 212 217
Email: tcross@une.edu.au

________________________________________
From: T.V Raman <raman@google.com>
Sent: Wednesday, 18 March 2015 3:30 AM
To: Tim Cross
Cc: bart@bunting.net.au; tv.raman.tv@gmail.com; raman@google.com; emacspeak@cs.vassar.edu
Subject: Re: org-drill and Preparing code for inclusion in emacspeak    Mar 2015 11:45:06 +1100")

This definitely should be handled by the autoload cookie which is
present.

make config at my end does result in this line showing up in
emacspeak-loaddefs.el -- do   do this grep  on your end after make
config:

grep emacspeak-wizards-toggle-yyyymmdd-date-pronouncer emacspeak-loaddefs.el
(autoload 'emacspeak-wizards-toggle-yyyymmdd-date-pronouncer "emacspeak-wizards" "\


Tim Cross writes:
 >
 > I confirm the same as observed by Bart.
 >
 > I must have missed Raman's response to my original report. However, I did find that doing a make clean does not resolve the issue.
 >
 > It would seem you need something in your emacspeak configuration to trigger the loading of the emacspeak-wizards file. My solution was to put
 >
 > (emacspeak-wizards-toggle-yyyymmdd-date-pronouncer)
 >
 > into my emacspeak load hook. However, provided one of the autoloaded wizard commands is executed prior to trying M-x package-list-packages, all works well. This makes me think that something in emacspeak-packages.el is relying on the variable in emacspeak-wizards.el, but there is no check that the file has been loaded, ensuring that the required binding has been defined. This would also mean that the chances of encountering this issue depends on how long emacspeak has been loaded and what commands have been executed prior to running package-list-packages. As my workflow is to check for updated packages right after starting emacs and before doing much else, I normally would not have run anything from emacspeak-wizards which would have loaded that file.
 >
 > HTH
 >
 > Tim
 >
 >
 >
 > --
 > Tim Cross
 > IT Security Manager
 > Information Technology Directorate
 > University of New England
 > Armidale NSW 2351
 >
 > Phone: +61 2 6773 3210
 > Mobile: +61 428 212 217
 > Email: tcross@une.edu.au
 >
 > ________________________________________
 > From: Bart Bunting <bart.bunting@ursys.com.au> on behalf of Bart Bunting <bart@bunting.net.au>
 > Sent: Tuesday, 17 March 2015 12:44 PM
 > To: tv.raman.tv@gmail.com
 > Cc: raman@google.com; emacspeak@cs.vassar.edu
 > Subject: Re: org-drill and Preparing code for inclusion in emacspeak    Mar 2015 11:45:06 +1100")
 >
 > Raman,
 >
 > It appears to be a bit different to that.
 >
 > a make clean; make config; make emacspeak does not resolve the issue.
 > Nor does a clean build from a fresh checkout of git.
 >
 > However a "load-library emacspeak-wizards" does.
 >
 > This makes me suspect that there is an autoload missing somewhere or
 > something?
 >
 >
 >
 > Kind regards
 >
 > Bart
 >
 > "T. V. Raman" <tv.raman.tv@gmail.com> writes:
 >
 > > Make sure you do a make config -- Tim reported the same a week or
 > > more ago -- and I sent the same answer:-)
 > >>>>>> "Bart" == Bart Bunting <bart@bunting.net.au> writes:
 > >     Bart> Raman, Not sure about Melpa. For some reason
 > >     Bart> package-list is currently broken with the error
 > >     Bart> "Symbol's value as variable is void:
 > >     Bart> emacspeak-wizards-yyyymmdd-date-pronounce". Haven't had
 > >     Bart> a chance to chace that up, just noticed it.
 > >     Bart>
 > >     Bart> Org-drill is distributed as a contrib package with
 > >     Bart> org-mode itself (I run org from source) so I didn't
 > >     Bart> notice it not being shipped with emacs.
 > >     Bart>
 > >     Bart> You can obtain the source at:
 > >     Bart> http://bitbucket.org/eeeickythump/org-drill.
 > >     Bart>
 > >     Bart> I've updated the comments in emacspeak-org-drill to
 > >     Bart> explain how to get org-drill.
 > >     Bart>
 > >     Bart> application/emacs-lisp [Press RETURN to save to a file]
 > >     Bart>
 > >     Bart>
 > >     Bart>
 > >     Bart> Kind regards raman <raman@google.com> writes:
 > >     Bart>
 > >     >> I've updated the checked in files. Note that the comments
 > >     >> at the top of emacspeak-org-drill dont tell you how/where
 > >     >> to get org-drill --- after reading it I had assumed it was
 > >     >> part of org. At least in Emacs built from head (emacs 25)
 > >     >> org-drill.el is not part of org, nor is it on GNU Elpa --
 > >     >> I suspect it's on melpa or marmalade ---
 > >     >>
 > >     >> -----------------------------------------------------------------------------
 > >     >> To unsubscribe from the emacspeak list or change your
 > >     >> address on the emacspeak list send mail to
 > >     >> "emacspeak-request@cs.vassar.edu" with a subject of
 > >     >> "unsubscribe" or "help".
 > >     >>
 > >     Bart> Bart --
 > >     Bart>
 > >     Bart> Bart Bunting
 > Bart
 > --
 >
 > Bart Bunting
 >
 > -----------------------------------------------------------------------------
 > To unsubscribe from the emacspeak list or change your address on the
 > emacspeak list send mail to "emacspeak-request@cs.vassar.edu" with a
 > subject of "unsubscribe" or "help".

--

--
-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@cs.vassar.edu" with a
subject of "unsubscribe" or "help".



If you have questions about this archive or had problems using it, please send mail to:

priestdo@cs.vassar.edu No Soliciting!

Emacspeak List Archive | 2010 | 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog | Search the archive