From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Leifer Subject: Windows installation with msysGit Date: Mon, 27 Sep 2010 18:57:22 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0239680840==" Return-path: Received: from [140.186.70.92] (port=39251 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0Hx8-0005eC-Py for emacs-orgmode@gnu.org; Mon, 27 Sep 2010 13:57:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0Hx6-0007mS-Uo for emacs-orgmode@gnu.org; Mon, 27 Sep 2010 13:57:26 -0400 Received: from mail-gw0-f41.google.com ([74.125.83.41]:55539) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0Hx6-0007mJ-Ol for emacs-orgmode@gnu.org; Mon, 27 Sep 2010 13:57:24 -0400 Received: by gwj16 with SMTP id 16so2431149gwj.0 for ; Mon, 27 Sep 2010 10:57:23 -0700 (PDT) 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 --===============0239680840== Content-Type: multipart/alternative; boundary=0015174bed5ad995d804914175df --0015174bed5ad995d804914175df Content-Type: text/plain; charset=ISO-8859-1 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.exebut 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 --0015174bed5ad995d804914175df Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have seen discussions about the difficulties of installing the latest ver= sion org-mode on Windows on this list, so I would like to report a way of d= oing this that I found that allows you to compile org-mode to bytecode with= very little hassle. =A0Apologies if this has been posted before, but I thi= nk it would be useful to put some instructions like this into worg and/or t= he manual. =A0This solution is based on a relatively recent project that ai= ms to port git to Windows called msysGit (see http://code.google.com/p/msysgit/). =A0Here are the ba= sic steps:

1. Download the msysGit-netinstall executable (.exe file) fr= om=A0http://code.google.com/p= /msysgit/ =A0Currently, the file you want is=A0http://code.google.com/p/msysgit/downloads/detail?name=3Dm= sysGit-netinstall-1.7.2.3-preview20100911.exe but this will change so i= t is best to look for the latest version in the "featured downloads&qu= ot; panel on the right.

2. Run the program you have just downloaded (you need t= o be connected to the internet when you do this). =A0You'll be prompted= for a few configuration options. =A0In most cases, the defaults will be fi= ne.

3. After the installation has finished, which might be = 10 minutes or so, you will have a window with a command prompt open. =A0Thi= s 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= ). =A0You will probably want to be able to open this shell easily at a late= r date for updating git, org-mode and so forth. =A0To make this possible, e= nter "=A0/share/msysGit/add-shortcut.tcl= " in the bash shell and it will give instructions on how to add shortc= uts to your desktop, start menu, etc. =A0If you accidentally closed the she= ll 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. =A0You do this just as in the usua= l installation instructions. =A0Specifically, if you enter "cd ~"= into the bash shell then it will take you to your home directory. =A0Make = a directory called "elisp" by entering "mkdir elisp" an= d then change to that directory by entering "cd elisp". =A0Then e= nter "g= it clone git://repo.or.cz/org-mo= de.git" which will make a loc= al copy of the org-mode git repository.

5. The next step is to byte-compile org-mode. =A0It is not stri= ctly essential to do this, but it should make org mode run faster so you mi= ght as well. =A0In order to do this you need to add the path to the emacs b= inary to your PATH environment variable. =A0To do this you have to find the= emacs binary, which is a file called "emacs" that Windows Explor= er will identify as an Application. =A0In 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 whe= rever you put the emacs folder when you installed it. =A0To add this to the= PATH variable, enter "set PATH=3D/path/to/emacs/binary:$PATH" in= to the bash shell, where path/to/emacs/binary should be replaced by the pat= h that you found translated into UNIX syntax. =A0Essentially, to do this yo= u 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 (/= ). =A0For example, in my case, it is just /c/Users/Matt/emacs-22.3/bin and = I would enter=A0"set PATH=3D/c/Users/Matt/emacs-22.3/bin:$PATH" into the bash shell. =A0Note: =A0You'= ;ll have to do this every time you update org-mode unless you put it in the= .bashrc file for the bash shell. =A0However, I was unable to determine whe= re the bash shell that mysysGit installs expects this file to be.

6. Next, enter "cd org-mode" to change to the directo= ry that org-mode was installed in and then enter "make". =A0You c= an also enter "make doc" to get a local copy of the documentation= , but this will only work if you have LaTeX installed. =A0You should instal= l LaTeX if you are planning to use the pdf export function of org-mode, but= that it a separate story. =A0In any case, UNDER NO CIRCUMSTANCES SHOULD YO= U 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. = =A0This is described in the org-mode documentation here:=A0http://orgmode.org/guid= e/Installation.html#Installation and here:=A0http://orgmode.org/guide/Activation.h= tml#Activation (you need to follow the steps on both pages). =A0The har= der problem is going to be finding out where you should put these customiza= tions, since Windows emacs stores its customization files in funny places a= nd they are not always called .emacs. =A0Section 3.5 of the emacs for Windo= ws installation instructions (http://www.gnu.org/software/emacs/windows/In= stalling-Emacs.html) explain where these should go.

8. The update instructions are just the same as described in th= e org-mode FAQ http://orgmo= de.org/worg/org-faq.php except you should make sure not to run "ma= ke install". =A0You should update mysysGit periodically too and that i= s a similar procedure described on the git wiki=A0https://git.wiki.kernel.or= g/index.php/MSysGit:UpdatingMSysGit
--0015174bed5ad995d804914175df-- --===============0239680840== 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 --===============0239680840==--