emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matthew Leifer <msleifer@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Windows installation with msysGit
Date: Mon, 27 Sep 2010 18:57:22 +0100	[thread overview]
Message-ID: <AANLkTimoPGPivfOtyc+cbkVLRkSd6sZidYMU_hxv4YfH@mail.gmail.com> (raw)


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

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

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

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

_______________________________________________
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

             reply	other threads:[~2010-09-27 17:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-27 17:57 Matthew Leifer [this message]
2010-09-27 19:11 ` Windows installation with msysGit Achim Gratz
2010-09-28 15:55 ` Giovanni Ridolfi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimoPGPivfOtyc+cbkVLRkSd6sZidYMU_hxv4YfH@mail.gmail.com \
    --to=msleifer@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).