emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Windows installation with msysGit


From: Matthew Leifer
Subject: [Orgmode] Windows installation with msysGit
Date: Mon, 27 Sep 2010 18:57:22 +0100

I have seen discussions about the difficulties of installing the latest version org-mode on Windows on this list, so I would like to report a way of doing this that I found that allows you to compile org-mode to bytecode with very little hassle.  Apologies if this has been posted before, but I think it would be useful to put some instructions like this into worg and/or the manual.  This solution is based on a relatively recent project that aims to port git to Windows called msysGit (see http://code.google.com/p/msysgit/).  Here are the basic steps:

1. Download the msysGit-netinstall executable (.exe file) from http://code.google.com/p/msysgit/  Currently, the file you want is http://code.google.com/p/msysgit/downloads/detail?name=msysGit-netinstall-1.7.2.3-preview20100911.exe but this will change so it is best to look for the latest version in the "featured downloads" panel on the right.

2. Run the program you have just downloaded (you need to be connected to the internet when you do this).  You'll be prompted for a few configuration options.  In most cases, the defaults will be fine.

3. After the installation has finished, which might be 10 minutes or so, you will have a window with a command prompt open.  This is a pseudo-bash shell (yes, msysGit installs its own version of the bash shell, a bit like cygwin, the main difference being that the msysGit shell comes with everything you are going to need to install and update org-mode).  You will probably want to be able to open this shell easily at a later date for updating git, org-mode and so forth.  To make this possible, enter " /share/msysGit/add-shortcut.tcl" in the bash shell and it will give instructions on how to add shortcuts to your desktop, start menu, etc.  If you accidentally closed the shell before typing this then find the file "C:\msysgit\msys" in Windows explorer and double click to open it again (this assumes you used the default install location).

4. Next you want to use git, which you have just installed, to download the latest version of org-mode.  You do this just as in the usual installation instructions.  Specifically, if you enter "cd ~" into the bash shell then it will take you to your home directory.  Make a directory called "elisp" by entering "mkdir elisp" and then change to that directory by entering "cd elisp".  Then enter "git clone git://repo.or.cz/org-mode.git" which will make a local copy of the org-mode git repository.

5. The next step is to byte-compile org-mode.  It is not strictly essential to do this, but it should make org mode run faster so you might as well.  In order to do this you need to add the path to the emacs binary to your PATH environment variable.  To do this you have to find the emacs binary, which is a file called "emacs" that Windows Explorer will identify as an Application.  In my case, I installed emacs in my user directory, so the path is just "C:\Users\Matt\emacs-22.3\bin", but generally it will be in a subdirectory called "bin" of wherever you put the emacs folder when you installed it.  To add this to the PATH variable, enter "set PATH=/path/to/emacs/binary:$PATH" into the bash shell, where path/to/emacs/binary should be replaced by the path that you found translated into UNIX syntax.  Essentially, to do this you just make the drive letter lower-case, put a / in front of it, get rid of the : and convert all the remaining backslashes (\) into forwardslashes (/).  For example, in my case, it is just /c/Users/Matt/emacs-22.3/bin and I would enter "set PATH=/c/Users/Matt/emacs-22.3/bin:$PATH" into the bash shell.  Note:  You'll have to do this every time you update org-mode unless you put it in the .bashrc file for the bash shell.  However, I was unable to determine where the bash shell that mysysGit installs expects this file to be.

6. Next, enter "cd org-mode" to change to the directory that org-mode was installed in and then enter "make".  You can also enter "make doc" to get a local copy of the documentation, but this will only work if you have LaTeX installed.  You should install LaTeX if you are planning to use the pdf export function of org-mode, but that it a separate story.  In any case, UNDER NO CIRCUMSTANCES SHOULD YOU ENTER "make install" as described in the standard installation instructions because it won't do the right thing on Windows.

7. Finally, you need to put a few lines into your .emacs file.  This is described in the org-mode documentation here: http://orgmode.org/guide/Installation.html#Installation and here: http://orgmode.org/guide/Activation.html#Activation (you need to follow the steps on both pages).  The harder problem is going to be finding out where you should put these customizations, since Windows emacs stores its customization files in funny places and they are not always called .emacs.  Section 3.5 of the emacs for Windows installation instructions (http://www.gnu.org/software/emacs/windows/Installing-Emacs.html) explain where these should go.

8. The update instructions are just the same as described in the org-mode FAQ http://orgmode.org/worg/org-faq.php except you should make sure not to run "make install".  You should update mysysGit periodically too and that is a similar procedure described on the git wiki https://git.wiki.kernel.org/index.php/MSysGit:UpdatingMSysGit

reply via email to

[Prev in Thread] Current Thread [Next in Thread]