From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao LU Subject: How to use variable in org publish function Date: Thu, 18 Nov 2010 01:54:42 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1432201072==" Return-path: Received: from [140.186.70.92] (port=42368 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIyOf-0004dn-B4 for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 01:55:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIyOe-0002hN-A1 for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 01:55:05 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:53762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIyOe-0002hE-4o for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 01:55:04 -0500 Received: by fxm20 with SMTP id 20so1335217fxm.0 for ; Wed, 17 Nov 2010 22:55:02 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============1432201072== Content-Type: multipart/alternative; boundary=20cf30434514e43e2404954e445c --20cf30434514e43e2404954e445c Content-Type: text/plain; charset=ISO-8859-1 Dear all, I'm trying to define a variable, to let org-mode know different path to use when I'm under different system (Windows or Mac), but got trouble to get it work. Here is the Code: ---- (defconst lch-win32-p (eq system-type 'windows-nt) "Are we on Windows?") (defconst lch-mac-p (eq system-type 'darwin) "Are we on Mac") (if lch-mac-p (defvar org-source-dir "~/Dropbox/org/org" "org source dir")) ;For under windows, it should be My Dropbox... (setq org-publish-project-alist '( ("org-notes" *:base-directory org-source-dir*))) ---- Apparently, this doesn't work, since the variable org-source-dir will not be evaluated inside the quote, but I really didn't find out how to make it evaled... Does anyone has any hints? Thanks a lot. Chao --20cf30434514e43e2404954e445c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear all,

I'm trying to define a variable, to let org-mode know = different path to use when I'm under different system (Windows or Mac),= but got trouble to get it work. Here is the Code:

----
(defconst= lch-win32-p (eq system-type 'windows-nt) "Are we on Windows?"= ;)
(defconst lch-mac-p (eq system-type 'darwin) "Are we on Mac")=
(if lch-mac-p (defvar org-source-dir "~/Dropbox/org/org" &quo= t;org source dir"))=A0=A0=A0 ;For under windows, it should be My Dropb= ox...
(setq org-publish-project-alist
=A0=A0=A0=A0=A0 '(
=A0=A0=A0 (&qu= ot;org-notes"
=A0=A0=A0 =A0:base-directory org-source-dir)))=
----

Apparently, this doesn't work, since the variable org-s= ource-dir will not be evaluated inside the quote, but I really didn't f= ind out how to make it evaled... Does anyone has any hints?

Thanks a lot.

Chao

--20cf30434514e43e2404954e445c-- --===============1432201072== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1432201072==--