From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Filippo A. Salustri" Subject: Re: accessing org-lowest-priority in .emacs Date: Thu, 16 Jun 2011 10:26:13 -0400 Message-ID: References: <811uyt9a3z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001485f1ea22243b3104a5d50d92 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXDWb-0002c7-CI for emacs-orgmode@gnu.org; Thu, 16 Jun 2011 10:26:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXDWR-0002iM-MP for emacs-orgmode@gnu.org; Thu, 16 Jun 2011 10:26:25 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:53787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXDWR-0002iC-68 for emacs-orgmode@gnu.org; Thu, 16 Jun 2011 10:26:15 -0400 Received: by wwb39 with SMTP id 39so1327419wwb.30 for ; Thu, 16 Jun 2011 07:26:14 -0700 (PDT) In-Reply-To: <811uyt9a3z.fsf@gmail.com> 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: Jambunathan K Cc: emacs-orgmode mailing list --001485f1ea22243b3104a5d50d92 Content-Type: text/plain; charset=ISO-8859-1 Yes, the math is wrong; I knew that. Thanks for the hint. Cheers. Fil On 16 June 2011 09:30, Jambunathan K wrote: > > "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. > -- > -- \V/_ Filippo A. Salustri, Ph.D., P.Eng. Mechanical and Industrial Engineering Ryerson University 350 Victoria St, Toronto, ON M5B 2K3, Canada Tel: 416/979-5000 ext 7749 Fax: 416/979-5265 Email: salustri@ryerson.ca http://deseng.ryerson.ca/~fil/ --001485f1ea22243b3104a5d50d92 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yes, the math is wrong; I knew that.
Thanks for the hint.
Che= ers.
Fil

On 16 June 2011 09:30,= Jambunathan K <kjambunathan@gmail.com> wrote:

"Filippo A. Salustri" <= salustri@ryerson.ca> writes:

> I'm having a senior moment here.
>
> I've got code of this form in my Preferences.el (aquamacs-speak fo= r .emacs):
>
> (defvar fas/org-some-variable
> =A0 (/ 10 (* 1000 (- org-lowest-priority org-highest-priority))))
>
> But org-lowest-priority & org-highest-priority aren't defined = at that
> point in Preferences.el. =A0I need to defer the calculation till org i= s
> running.

Do this

#+begin_src emacs-lisp
(require 'org) ;; note this
(defvar fas/org-some-variable
=A0(/ 10 (* 1000 (- org-lowest-priority org-highest-priority))))
#+end_src

or

this

#+begin_src emacs-lisp
(eval-after-load 'org
=A0(defvar fas/org-some-variable ;; replace defvar with setq, maybe?
=A0 =A0(/ 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.
--



--
\V/_
Filippo= A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Rye= rson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: = 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salustri@ryerson.ca
http://deseng.ryerson.ca/~fil/

--001485f1ea22243b3104a5d50d92--