From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Sebold Subject: Re: Installing on windows Date: Wed, 04 Feb 2009 13:52:04 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUnn9-0006p1-22 for emacs-orgmode@gnu.org; Wed, 04 Feb 2009 14:52:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUnn8-0006oM-5L for emacs-orgmode@gnu.org; Wed, 04 Feb 2009 14:52:10 -0500 Received: from [199.232.76.173] (port=57305 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUnn7-0006oD-Uw for emacs-orgmode@gnu.org; Wed, 04 Feb 2009 14:52:09 -0500 Received: from rv-out-0708.google.com ([209.85.198.245]:62551) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LUnn7-0008Tc-DR for emacs-orgmode@gnu.org; Wed, 04 Feb 2009 14:52:09 -0500 Received: by rv-out-0708.google.com with SMTP id k29so3132908rvb.6 for ; Wed, 04 Feb 2009 11:52:08 -0800 (PST) In-Reply-To: (Bill Raynor's message of "Wed\, 4 Feb 2009 11\:19\:50 -0600") 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 On 4 Feb 2009, Bill Raynor wrote: > 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. Here's what I do (I'm running Emacs 22.3 provided by the FSF). Using this code, I don't ever run make, but I do need a version of makeinfo in the path somewhere. The "generate org-install" bit is lifted from the Makefile, so it might have to change if the Makefile changes: ------------------------------------------------------------------------ (setq crs-org-path "/source/org") ; this is where I keep my git version ; of org (setq org-actual-info-path "~/.emacs.d/info/org") ; this is where my ; local info files ; are (defun crs-add-to-load-path (path-string &rest more-paths) (when path-string (message (format "Passed %S..." path-string)) (when (file-exists-p path-string) (setq path-string (expand-file-name path-string)) (message (format "Adding %S to load-path..." path-string)) (add-to-list 'load-path path-string)) (when more-paths (mapcar 'crs-add-to-load-path more-paths))) t) (defun crs-newer-file-p (filename1 filename2) "Is FILENAME1 newer than FILENAME2?" (and (file-exists-p filename1) (file-exists-p filename2) (let ((first-time-mod (nth 5 (file-attributes filename1))) (second-time-mod (nth 5 (file-attributes filename2)))) (or (> (car first-time-mod) (car second-time-mod)) (and (= (car first-time-mod) (car second-time-mod)) (> (cadr first-time-mod) (cadr second-time-mod))))))) ; Add in GIT repository if it exists (let ((org-lisp-path (concat crs-org-path "/lisp")) (org-docfile-path (concat crs-org-path "/doc/org"))) (when (file-exists-p org-lisp-path) (crs-add-to-load-path org-lisp-path) ; recompile everything in this directory (byte-recompile-directory org-lisp-path 0 nil) ; generate and copy documentation (if (and (file-exists-p org-actual-info-path) (file-exists-p org-docfile-path) (crs-newer-file-p org-docfile-path org-actual-info-path)) (copy-file org-docfile-path org-actual-info-path t) (when (and (or (not (file-exists-p org-docfile-path)) (crs-newer-file-p (concat org-docfile-path ".texi") org-docfile-path)) (file-exists-p (concat org-docfile-path ".texi"))) (shell-command-to-string (concat "makeinfo --no-split " (shell-quote-argument (concat org-docfile-path ".texi")) " -o " (shell-quote-argument org-docfile-path))) (if (file-exists-p org-docfile-path) (copy-file org-docfile-path org-actual-info-path t) (message "Problem compiling org texinfo file?")))) ; generate org-install.el (when (or (not (file-exists-p (concat org-lisp-path "/org-install.el"))) (crs-newer-file-p (concat org-lisp-path "/Changelog") (concat org-lisp-path "/org-install.el"))) (let ((lispfiles0 (directory-files org-lisp-path nil "\\.el$" nil))) (find-file (concat org-lisp-path "/org-install.el")) (require 'autoload) (erase-buffer) (mapc (lambda (x) (generate-file-autoloads x)) lispfiles0) (insert "\n(provide (quote org-install))\n") (save-buffer) (kill-buffer nil))))) ; org-mode (current) (require 'org-install) ------------------------------------------------------------------------ When I log in, most mornings, I run a batch file that "git pulls" the latest from Carsten's repository, and then fires up Emacs for me to handle the rest. One nice thing about this is, if nothing has changed in my git repository, then I don't notice any significant slowdown in booting, but if it has, then I get the updated version. If this seems convoluted, be aware at least that this is only about 2-3% of a very long chain of things that my .emacs.d/init.el runs when I start it up, and the functions I defined above get used in lots of other places. -- Charles Sebold 4th of February, 2009 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.21trans