From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: accessing org-lowest-priority in .emacs Date: Thu, 16 Jun 2011 19:00:56 +0530 Message-ID: <811uyt9a3z.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXCfN-0004aQ-E2 for emacs-orgmode@gnu.org; Thu, 16 Jun 2011 09:31:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXCfH-000504-Rf for emacs-orgmode@gnu.org; Thu, 16 Jun 2011 09:31:24 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:46382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXCfH-0004zS-0v for emacs-orgmode@gnu.org; Thu, 16 Jun 2011 09:31:19 -0400 Received: by pzk4 with SMTP id 4so1346393pzk.0 for ; Thu, 16 Jun 2011 06:31:17 -0700 (PDT) In-Reply-To: (Filippo A. Salustri's message of "Thu, 16 Jun 2011 07:35:36 -0400") 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: "Filippo A. Salustri" Cc: emacs-orgmode mailing list "Filippo A. Salustri" writes: > I'm having a senior moment here. > > I've got code of this form in my Preferences.el (aquamacs-speak for .emacs): > > (defvar fas/org-some-variable > (/ 10 (* 1000 (- org-lowest-priority org-highest-priority)))) > > But org-lowest-priority & org-highest-priority aren't defined at that > point in Preferences.el. I need to defer the calculation till org is > running. Do this #+begin_src emacs-lisp (require 'org) ;; note this (defvar fas/org-some-variable (/ 10 (* 1000 (- org-lowest-priority org-highest-priority)))) #+end_src or this #+begin_src emacs-lisp (eval-after-load 'org (defvar fas/org-some-variable ;; replace defvar with setq, maybe? (/ 10 (* 1000 (- org-lowest-priority org-highest-priority))))) #+end_src Just re-check whether you have got your math right. It looks suspicious to me. > > It's embarrassing, but it's not coming to me. > > Can someone help me out? > Cheers. > Fil Jambunathan K. --