From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [BUG] cannot open menu when in an org buffer Date: Mon, 06 Feb 2012 21:31:50 -0500 Message-ID: <3889.1328581910@alphaville> References: <5727.1328377568@alphaville> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ruaqm-0001j1-Kh for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 21:32:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ruaqj-0004XA-Qa for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 21:32:08 -0500 Received: from g5t0006.atlanta.hp.com ([15.192.0.43]:27176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ruaqj-0004Wq-Bd for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 21:32:05 -0500 In-Reply-To: Message from suvayu ali of "Tue, 07 Feb 2012 01:01:32 +0100." 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: suvayu ali Cc: nicholas.dokos@hp.com, org-mode mailing list suvayu ali wrote: > On Sat, Feb 4, 2012 at 18:46, Nick Dokos 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."