suvayu ali <fatkasuvayu+li...@gmail.com> wrote:

> On Sat, Feb 4, 2012 at 18:46, Nick Dokos <nicholas.do...@hp.com> wrote:
> >
> > Confirmed. If I add
> >
> > (require 'org-clock)
> >
> > to my minimal .emacs, it goes away. So it seems to be a missing dependenc=
> y.
> >
> 
> It seems an odd dependency to have.

True - org-in-clocktable-p does not have anything to do with clocks, but
it ended up in org-clock.el. All of these "where am I" functions should
probably be in org.el. In fact, they all are except for
org-in-clocktable-p and org-at-item-p. The latter is in org-list.el and
it is not giving an error a) because org-in-clocktable-p errors out
first and b) because org.el contains a (require 'org-list). So having a
(require 'org-clock) in org.el does have a precedent, but of course this
way you end up defeating autoloads: the moment org.el is loaded, all of
these things are too. There might be a better arrangement but it's like
Pascal's letter[fn:1] : it would require time to find it :-) 

> Anyway, I noticed something;
> pressing F10 does bring up the menu as expected without any backtrace.
> After that I can select anything on the menu with a mouse without
> problems.

That's true: org-context is only called from mouse code, so if you drop
the menu without the mouse, there is no problem: selecting a menu item
with the mouse, once the menu has dropped, is all widget code and does
not invoke org code at all.

> The error occurs only when bringing up the menu for the
> first time with a mouse.
> 

That I find surprising though: I would expect that if you try to
click on the menu again, you'd get the error again: nothing is done
to define the function, so why should anything be different the
second time?

Nick

PS. In fact, I tried it out: I get the same error the second time.

Footnotes:

[fn:1] Approximately: "Forgive the length of this letter: I did not have
       time to make it shorter."

Reply via email to