From mboxrd@z Thu Jan 1 00:00:00 1970 From: suvayu ali Subject: Re: [BUG] cannot open menu when in an org buffer Date: Tue, 7 Feb 2012 14:26:41 +0100 Message-ID: References: <5727.1328377568@alphaville> <3889.1328581910@alphaville> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rul4e-0006bj-VX for emacs-orgmode@gnu.org; Tue, 07 Feb 2012 08:27:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rul4Z-00054c-0z for emacs-orgmode@gnu.org; Tue, 07 Feb 2012 08:27:08 -0500 Received: from mail-bk0-f41.google.com ([209.85.214.41]:44288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rul4Y-000543-6A for emacs-orgmode@gnu.org; Tue, 07 Feb 2012 08:27:02 -0500 Received: by bkbzs2 with SMTP id zs2so6660432bkb.0 for ; Tue, 07 Feb 2012 05:27:01 -0800 (PST) In-Reply-To: <3889.1328581910@alphaville> 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: nicholas.dokos@hp.com Cc: org-mode mailing list Hi Nick, On Tue, Feb 7, 2012 at 03:31, Nick Dokos wrote: > 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 depend= enc=3D >> 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 :-) > True, actually this is one of my only gripes (if you could call it that) about org. Loading my org customisation is a fair part of my emacs start time. If I could improve this, it would be perfect. :) >> 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. > Thanks for clearing that up. I was always hazy about the emacs interface libraries. I think I'll look into them someday when I have some time. >> 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? > Ah, sorry my mistake. I did not word it correctly. I didn't mean bringing up the menu with a mouse a second time. I meant once the menu was up (lets say the "File" menu), going to a different one by hovering over the menu (say "Edit" or "Options") with a mouse doesn't trigger the backtrace. Clearly it is obvious now why it would be so from your explanation above. :) > [fn:1] Approximately: "Forgive the length of this letter: I did not have > =C2=A0 =C2=A0 =C2=A0 time to make it shorter." This is a very interesting and true remark. I was not familiar with it before. :) --=20 Suvayu Open source is the future. It sets us free.