Difference between revisions of "Installing Emacs"

From WikEmacs
Jump to: navigation, search
(Initial version of a simple installation guide)
 
(Better style)
Line 1: Line 1:
 
== Getting Emacs 24 ==
 
== Getting Emacs 24 ==
  
Obviously to use the Emacs Prelude you have to install Emacs 24 first. Here’s a few tips on doing so:
+
Emacs 24 still hasn't been released, but it's probably the best version of Emacs you can get.  
  
 
=== OS X ===
 
=== OS X ===
  
Obtaining Emacs 24 on OS X is really simple. There are two popular ways to do it. The first is to simply download a pretest (or a nightly build) from [http://emacsformacosx.com Emacs for OSX]. My personal recommendation would be to get the latest pretest from [http://emacsformacosx.com/builds here].
+
Obtaining Emacs 24 on OS X is really simple. There are two popular ways to do it. The first is to simply download a pretest (or a nightly build) from [http://emacsformacosx.com Emacs for OSX]. Probably the best option would be to get the latest pretest from [http://emacsformacosx.com/builds here].
 
+
That was really easy, right?
+
  
 
The second easy way to obtain Emacs 24 is via [http://mxcl.github.com/homebrew/ homebrew]. Just type the following incantation in your shell and you’re done:
 
The second easy way to obtain Emacs 24 is via [http://mxcl.github.com/homebrew/ homebrew]. Just type the following incantation in your shell and you’re done:
  
<source lang="bash">$ brew install emacs --cocoa --use-git-head --HEAD
+
<source lang="bash">
$ cp -r /usr/local/Cellar/emacs/HEAD/Emacs.app /Applications/</source>
+
$ brew install emacs --cocoa --use-git-head --HEAD
The second step is optional, but it’s recommended if you like to start Emacs from the launchpad or from Spotlight. Personally I prefer to start Emacs in daemon mode (<tt>emacs --daemon</tt>), so that I could share a single Emacs instance between several Emacs clients (<tt>emacsclient -c/t</tt>).
+
$ cp -r /usr/local/Cellar/emacs/HEAD/Emacs.app /Applications/
 +
</source>
 +
The second step is optional, but it’s recommended if you like to start Emacs from the launchpad or from Spotlight.
  
Chances are good you have an older version of Emacs installed by default with OS X. I suggest you to remove that older Emacs version to avoid conflicts with the new one. Do this:
+
Chances are good you have an older version of Emacs installed by default with OS X. It's suggested you to remove that older Emacs version to avoid conflicts with the new one. Do this:
  
<source lang="bash">$ sudo rm /usr/bin/emacs
+
<source lang="bash">
$ sudo rm -rf /usr/share/emacs</source>
+
$ sudo rm /usr/bin/emacs
 +
$ sudo rm -rf /usr/share/emacs
 +
</source>
 
That’s all folk! You may now proceed to the configuration section.
 
That’s all folk! You may now proceed to the configuration section.
  
 
=== Linux ===
 
=== Linux ===
  
Given that Linux is more or less the home os of Emacs it presents us with the most installation options. Of course, we can build Emacs from [https://github.com/emacsmirror/emacs source] on every distribution out there, but I rarely bother to do so. Using the distribution’s package manager is a better idea for many reasons - you don’t need to install a build chain and lots of dev libraries, you get updated versions when they are released and you get automated dependency manager, just to name a few.
+
Given that Linux is more or less the home os of Emacs it presents us with the most installation options. Of course, you can build Emacs from [https://github.com/emacsmirror/emacs source] on every distribution out there, but why bother to do so? Using the distribution’s package manager is a better idea for many reasons - you don’t need to install a build chain and lots of dev libraries, you get updated versions when they are released and you get automated dependency manager, just to name a few.
  
  
Line 30: Line 32:
 
Debian users should look no further than the amazing [http://emacs.naquadah.org/ emacs-snapshot APT repo]. You’ll find installation instructions there for all the relevant Debian versions out there. High quality, highly recommended builds! After you’ve added the repo you can install Emacs 24 with the following command:
 
Debian users should look no further than the amazing [http://emacs.naquadah.org/ emacs-snapshot APT repo]. You’ll find installation instructions there for all the relevant Debian versions out there. High quality, highly recommended builds! After you’ve added the repo you can install Emacs 24 with the following command:
  
<source lang="bash">$ sudo apt-get install emacs-snapshot</source>
+
<source lang="bash">
 +
$ sudo apt-get install emacs-snapshot
 +
</source>
 
Ubuntu users have easy access to Emacs 24 as well:
 
Ubuntu users have easy access to Emacs 24 as well:
  
<source lang="bash">$ sudo apt-add-repository ppa:cassou/emacs
+
<source lang="bash">
$ sudo apt-get install emacs-snapshot</source>
+
$ sudo apt-add-repository ppa:cassou/emacs
 +
$ sudo apt-get install emacs-snapshot
 +
</source>
 
Gentoo users have even less to do, since Emacs 24 can be obtained via the emacs-vcs package in portage, as noted in the official [http://www.gentoo.org/proj/en/lisp/emacs/emacs.xml Emacs on Gentoo page].
 
Gentoo users have even less to do, since Emacs 24 can be obtained via the emacs-vcs package in portage, as noted in the official [http://www.gentoo.org/proj/en/lisp/emacs/emacs.xml Emacs on Gentoo page].
  
Unfortunately I wasn’t able to find prebuilt Emacs 24 packages for any of the RPM distros (Fedora, SUSE, Mandriva, etc). Since, I’m Debian user I have to admit that I didn’t look that far, but the source installation is not particularly hard and is always an option.
+
Unfortunately they don't seem to be any prebuilt Emacs 24 packages for any of the RPM distros (Fedora, SUSE, Mandriva, etc). Since, I’m Debian user I have to admit that I didn’t look that far, but the source installation is not particularly hard and is always an option.
  
 
=== Windows ===
 
=== Windows ===
  
 
There are several ways to obtain precompiled Emacs 24 binaries if you’re a Windows users. The most popular are [http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl EmacsW32], [http://code.google.com/p/emacs-for-windows/ Emacs for Windows] and of course the official [http://alpha.gnu.org/gnu/emacs/windows/ Emacs Windows builds].
 
There are several ways to obtain precompiled Emacs 24 binaries if you’re a Windows users. The most popular are [http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl EmacsW32], [http://code.google.com/p/emacs-for-windows/ Emacs for Windows] and of course the official [http://alpha.gnu.org/gnu/emacs/windows/ Emacs Windows builds].

Revision as of 01:50, 23 March 2012

Getting Emacs 24

Emacs 24 still hasn't been released, but it's probably the best version of Emacs you can get.

OS X

Obtaining Emacs 24 on OS X is really simple. There are two popular ways to do it. The first is to simply download a pretest (or a nightly build) from Emacs for OSX. Probably the best option would be to get the latest pretest from here.

The second easy way to obtain Emacs 24 is via homebrew. Just type the following incantation in your shell and you’re done:

$ brew install emacs --cocoa --use-git-head --HEAD
$ cp -r /usr/local/Cellar/emacs/HEAD/Emacs.app /Applications/

The second step is optional, but it’s recommended if you like to start Emacs from the launchpad or from Spotlight.

Chances are good you have an older version of Emacs installed by default with OS X. It's suggested you to remove that older Emacs version to avoid conflicts with the new one. Do this:

$ sudo rm /usr/bin/emacs
$ sudo rm -rf /usr/share/emacs

That’s all folk! You may now proceed to the configuration section.

Linux

Given that Linux is more or less the home os of Emacs it presents us with the most installation options. Of course, you can build Emacs from source on every distribution out there, but why bother to do so? Using the distribution’s package manager is a better idea for many reasons - you don’t need to install a build chain and lots of dev libraries, you get updated versions when they are released and you get automated dependency manager, just to name a few.


That said, few distributions include in their primary repositories builds of Emacs 24. Luckily there are some unofficial repos that come to the rescue.

Debian users should look no further than the amazing emacs-snapshot APT repo. You’ll find installation instructions there for all the relevant Debian versions out there. High quality, highly recommended builds! After you’ve added the repo you can install Emacs 24 with the following command:

$ sudo apt-get install emacs-snapshot

Ubuntu users have easy access to Emacs 24 as well:

$ sudo apt-add-repository ppa:cassou/emacs
$ sudo apt-get install emacs-snapshot

Gentoo users have even less to do, since Emacs 24 can be obtained via the emacs-vcs package in portage, as noted in the official Emacs on Gentoo page.

Unfortunately they don't seem to be any prebuilt Emacs 24 packages for any of the RPM distros (Fedora, SUSE, Mandriva, etc). Since, I’m Debian user I have to admit that I didn’t look that far, but the source installation is not particularly hard and is always an option.

Windows

There are several ways to obtain precompiled Emacs 24 binaries if you’re a Windows users. The most popular are EmacsW32, Emacs for Windows and of course the official Emacs Windows builds.