emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Windows installation with msysGit
@ 2010-09-27 17:57 Matthew Leifer
  2010-09-27 19:11 ` Achim Gratz
  2010-09-28 15:55 ` Giovanni Ridolfi
  0 siblings, 2 replies; 3+ messages in thread
From: Matthew Leifer @ 2010-09-27 17:57 UTC (permalink / raw)
  To: emacs-orgmode


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

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

* Re: Windows installation with msysGit
  2010-09-27 17:57 Windows installation with msysGit Matthew Leifer
@ 2010-09-27 19:11 ` Achim Gratz
  2010-09-28 15:55 ` Giovanni Ridolfi
  1 sibling, 0 replies; 3+ messages in thread
From: Achim Gratz @ 2010-09-27 19:11 UTC (permalink / raw)
  To: emacs-orgmode

Matthew Leifer <msleifer@gmail.com> writes:
[...]

Thank you, but let me add a few remarks.

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

If you can't connect to the internet, just use the full installer
instead.  If you're behind a proxy, setting the 'http_proxy' environment
variable in the shell will help (but likely not if the proxy requires
authentication).  Otherwise the netinstall is the better option in the
long run.

[...]
> 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.

It expects it in your home directory, which you enter with 'cd ~', just
do a 'vi .bashrc' there, the file will probably not exist.  But you
don't really need to do this if you edit the Makefile to reflect your
local installation:

>>>>>>
# Name of your emacs binary
EMACS = /c/Users/Matt/emacs-22.3/bin/emacs

# Where local software is found
prefix = /c/Users/Matt/emacs-22.3/

# Where local lisp files go.
lispdir = $(prefix)/site-lisp/org

# Where info files go.
infodir = $(prefix)/info
<<<<<<

The only thing between you and a proper 'make install' is now a working
install-info program and maybe one or two others IIRC that don't come
with MSysGit, but MSys has them.  MSysGit modified some DLL from MSys,
so you can't have both versions in the same path... but they're
compatible enough so that you can just copy all missing executables from
a temporary MSys installation over to the MSYSGit bin/ directory.  This
will also provide a few other programs that are really useful with
Emacs, so I'd do that even when Git wasn't needed.  You need to
customize the exec-path to include the bin/ directory from MSysGit at a
very early position for this to work, since some Windows programs with
the same name might exist.


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables

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

* Re: Windows installation with msysGit
  2010-09-27 17:57 Windows installation with msysGit Matthew Leifer
  2010-09-27 19:11 ` Achim Gratz
@ 2010-09-28 15:55 ` Giovanni Ridolfi
  1 sibling, 0 replies; 3+ messages in thread
From: Giovanni Ridolfi @ 2010-09-28 15:55 UTC (permalink / raw)
  To: Matthew Leifer; +Cc: emacs-orgmode

Matthew Leifer <msleifer@gmail.com> writes:

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

msysGit installation requires  1,30 GB of disk space to install.

Giovanni

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

end of thread, other threads:[~2010-09-28 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-27 17:57 Windows installation with msysGit Matthew Leifer
2010-09-27 19:11 ` Achim Gratz
2010-09-28 15:55 ` Giovanni Ridolfi

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