emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Installing on windows
@ 2009-02-04 17:19 Bill Raynor
  2009-02-04 17:47 ` Saurabh Agrawal
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Bill Raynor @ 2009-02-04 17:19 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 712 bytes --]

I and many others would be grateful for a detailed step-by-step tutorial on
installing org-mode on windows. The basic instructions work just fine on,
say, OS X (edit makefile, make and make install) but don't work on windows.
Using emacs on windows is quite simple (download and install) but updating
Org doesn't work so well.

In the past I've used dired to attempt to compile the directory directly,
which gets lots of error messages, but sort of works. I read a recent post
on installing cygwin, but that doesn't quite work, as the post neglected to
mention that you have to install cygwin + some unspecified packages (to get
make, for instance). I trying that now.  I am also using the W32 version of
emacs.

[-- Attachment #1.2: Type: text/html, Size: 753 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: Installing on windows
@ 2009-02-06 23:19 Tim O'Callaghan
  2009-02-07  9:09 ` Manish
  0 siblings, 1 reply; 25+ messages in thread
From: Tim O'Callaghan @ 2009-02-06 23:19 UTC (permalink / raw)
  To: emacs-orgmode

>  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.
2) make sure the HOME environmental variable is set correctly.
3) use the (expand-filename) function, and relative filenames. It
makes everything work cross platform.

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)
 --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---

I'm sure its not pretty (or optimised) but, what can i say but that so
far it works for me (almost) everywhere.

hope that helps.

Tim.

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2009-02-07  9:09 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-04 17:19 Installing on windows Bill Raynor
2009-02-04 17:47 ` Saurabh Agrawal
2009-02-04 17:48 ` Manish
2009-02-04 18:07   ` Saurabh Agrawal
2009-02-05  2:01     ` Manish
2009-02-05  5:02       ` Saurabh Agrawal
2009-02-05  5:14         ` Manish
2009-02-05  5:18           ` Cameron Horsburgh
2009-02-05  5:30             ` Manish
2009-02-05  6:11               ` Cameron Horsburgh
2009-02-05  7:53                 ` Manish
2009-02-05  8:25                   ` Cameron Horsburgh
2009-02-06  7:15           ` Saurabh Agrawal
2009-02-06  8:05             ` Manish
2009-02-06 11:26               ` Saurabh Agrawal
     [not found]                 ` <e7cdbe30902060434y5a5011eep1a2567f5facce184@mail.gmail.com>
2009-02-06 13:07                   ` Saurabh Agrawal
2009-02-06 19:52                     ` Manish
2009-02-06 21:24                       ` Chris McMahan
2009-02-06 23:30                         ` Sebastian Rose
2009-02-07  8:20                           ` Manish
2009-02-04 18:16   ` Bill Raynor
2009-02-04 19:52 ` Charles Sebold
2009-02-05  9:38 ` Tony Mc
2009-02-06 23:19 Tim O'Callaghan
2009-02-07  9:09 ` Manish

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).