From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Dynamically modifying menu entries Date: Tue, 20 Jul 2010 13:18:25 +0200 Message-ID: References: <407470.62599.qm@web62502.mail.re1.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1279624746 23223 80.91.229.12 (20 Jul 2010 11:19:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 20 Jul 2010 11:19:06 +0000 (UTC) Cc: Emacs Devel To: Michael Mauger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 20 13:19:05 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ObAqi-0007gd-El for ged-emacs-devel@m.gmane.org; Tue, 20 Jul 2010 13:19:00 +0200 Original-Received: from localhost ([127.0.0.1]:46121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObAqh-0008CL-LN for ged-emacs-devel@m.gmane.org; Tue, 20 Jul 2010 07:18:59 -0400 Original-Received: from [140.186.70.92] (port=50482 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObAqQ-0008BL-UW for emacs-devel@gnu.org; Tue, 20 Jul 2010 07:18:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObAqI-0000av-0u for emacs-devel@gnu.org; Tue, 20 Jul 2010 07:18:42 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:35277) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObAqH-0000a9-SM for emacs-devel@gnu.org; Tue, 20 Jul 2010 07:18:33 -0400 Original-Received: from ceviche.home (vpn-132-204-232-36.acd.umontreal.ca [132.204.232.36]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o6KBIUFP031863; Tue, 20 Jul 2010 07:18:30 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 0B483660BB; Tue, 20 Jul 2010 13:18:25 +0200 (CEST) In-Reply-To: <407470.62599.qm@web62502.mail.re1.yahoo.com> (Michael Mauger's message of "Sun, 18 Jul 2010 22:15:50 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3581=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:127610 Archived-At: > I am building a menu using `easy-menu-define' with a submenu whose > entries are dependent on the entries in a list in the package. > The contents of the list may change and based on those changes the > contents of the submenu may change. This is not as simple as > enabling/disabling menu entries; it involves adding and removing > entries based on the contents of the separate list. If the set of possible entries is finite (and reasonably small), then you can use :visible, but otherwise :filter is most likely the way to go. > It also does appear that the submenu doesn't get refreshed as > frequently as I'd like. Ideally, I'd like to be able to populate the > submenu when it's selected rather than having to predefine the > menu contents. :filter should be run often enough (or even more often than that, in my experience), so if it's not often enough for you, please report the precise case where it fails to be (re)run. Stefan