From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Subject: Re: Installing on windows Date: Sat, 7 Feb 2009 14:39:44 +0530 Message-ID: References: <3d6808890902061519p510bafa9t1992e24132a00ef8@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LVjC8-0007yK-7y for emacs-orgmode@gnu.org; Sat, 07 Feb 2009 04:09:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LVjC7-0007y7-1X for emacs-orgmode@gnu.org; Sat, 07 Feb 2009 04:09:47 -0500 Received: from [199.232.76.173] (port=48890 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LVjC6-0007y4-Ty for emacs-orgmode@gnu.org; Sat, 07 Feb 2009 04:09:46 -0500 Received: from wa-out-1112.google.com ([209.85.146.178]:60541) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LVjC6-0007Ow-Dr for emacs-orgmode@gnu.org; Sat, 07 Feb 2009 04:09:46 -0500 Received: by wa-out-1112.google.com with SMTP id k17so568732waf.26 for ; Sat, 07 Feb 2009 01:09:45 -0800 (PST) In-Reply-To: <3d6808890902061519p510bafa9t1992e24132a00ef8@mail.gmail.com> 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: Tim O'Callaghan Cc: emacs-orgmode@gnu.org On Sat, Feb 7, 2009 at 4:49 AM, Tim O'Callaghan wrote: >> Obviously, I do not fully understand the initialization sequence for >> EmacsW32. Could someone using EmacsW32 throw some more light on a >> better procedure/technique to install Org-mode on it? >> > > Hi, > > I run the same installation of org in Xemacs & Emacs on Windows+Cygwin > & Linux/Unix. > > Currently i have these native versions installed: > * GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-06-30 on > LENNART-69DE564 (patched) > * XEmacs 21.4 (patch 21) "Educational Television" [Lucid] > (i586-pc-win32) of Sun Oct 07 2007 on VSHELTON-PC2 > > The basic technique is: > 1) do not compile any source to EL files. I drop all random .el files in a single directory and compile only Org stuff. > > 2) make sure the HOME environmental variable is set correctly. Yep. > 3) use the (expand-filename) function, and relative filenames. It > makes everything work cross platform. Yes, I also use relative paths but I do not use any functions to expand file paths/names. GNU Emacs 22.3 ships with org 5.23 and I have always been loading org like so: (add-to-list 'load-path "~/elisp/org-mode.git/lisp") So my org path must be coming after system without any issues. So how come I always get git version loaded (never 5.23), although emacs-22.3/lisp/textmodes has both org.el and org.elc? Ah.. I see GNU Emacs doesn't have site-start.el like EmacsW32 does. > > > Here is an quick walk through my (X)Emacs setup. > > My .emacs: > --8<---------------cut here---------------start------------->8--- > (defconst toc:zemacsen-dir "~/.zemacsen_d/" > "Path to xemacsen root directory and the init.el file") > (defconst toc:zemacsen-site-lisp-dir (concat toc:zemacsen-dir "site-lisp/") > "Path to (x)emacs lisp includes") > > (load (expand-file-name (concat toc:zemacsen-dir "init"))) > --8<---------------cut here---------------end--------------->8--- > > Notice the ~/ unix style relative paths? expand-filename converts that > into the value of your HOME environmental variable. This must be set > for Cygwin, but is also useful for other unixlike tools. > > so if "HOME=C:\home\", this code loads the file > "C:\home\.zemacsen\init.el" which is my "real" (x)emacs configuration > file. > > I then have a function that does something like: > --8<---------------cut here---------------start------------->8--- > (add-to-list 'load-path (expand-file-name (concat > toc:zemacsen-site-lisp-dir "org-mode/lisp"))) > --8<---------------cut here---------------end--------------->8--- > > Which places "c:/home/.zemacsen_d/site-lisp/org-mode" at the > beginning of the load-path list, trumping any other installation. You > can check with "alt-x describe-variable load-path " to make sure it's > at the start of the load-path list. > > Here is the function and its org usage: > --8<---------------cut here---------------start------------->8--- > (defun toc:add-to-load-path (dirlist) > (dolist (dir dirlist load-path) > (setq dir (expand-file-name (concat toc:zemacsen-site-lisp-dir dir))) > (if (file-directory-p dir) > (add-to-list 'load-path dir)))) > > (toc:add-to-load-path '("org-mode/lisp/" > "org-mode/contrib/lisp/" > "org-mode/xemacs/" > "remember/")) > > ;; Initialize org > (cond ((featurep 'xemacs) > (require 'noutline) > (require 'ps-print-invisible))) > > (require 'org) Shouldn't this be (require 'org-install)? > > --8<---------------cut here---------------end--------------->8--- > > I have a similar setup for exec-path, to make sure my preferred > windows binaries are found before the windows system ones. > > --8<---------------cut here---------------start------------->8--- > (defun toc:add-to-exec-path (dirlist &optional front) > (dolist (dir dirlist exec-path) > (setq edir (expand-file-name dir)) > (setq qdir (shell-quote-argument (expand-file-name dir))) > (message "Testing PATH:= %s" dir) > (cond ((file-directory-p dir) > (add-to-list 'exec-path dir front) > (message "Searching PATH:= %s <--> %s" (regexp-quote dir) > (getenv "PATH")) > (unless (string-match (regexp-quote dir) (getenv "PATH")) > (message "Adding PATH:= %s\n" dir) > (if front > (setenv "PATH" (concat dir path-separator (getenv "PATH"))) > (setenv "PATH" (concat (getenv "PATH") path-separator dir)))))))) > --8<---------------cut here---------------end--------------->8--- This looks quite useful. I will try this out. Thank you -- Manish