Difference between revisions of "Installing Emacs on BSD"

From WikEmacs
Jump to navigation Jump to search
(Deleted a word accidentally left in in the last revision.)
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Emacs is available among BSD variants including FreeBSD, NetBSD, OpenBSD and PC-BSD
+
Emacs is available on the BSD variants either through precompiled binary packages or user-compiled ports.  Installation instructions vary according to exact OS.
  
 
== FreeBSD ==
 
== FreeBSD ==
  
=== Install ===
+
To install the most recent prebuilt binary package of the (at the time) most recent stable version:
 
 
==== Emacs 23 ====
 
 
 
To install the latest stable version of Emacs, with all the latest features, there are two approaches: using a pre built package or building from the ports.
 
 
 
To fetch and install the package run:
 
  
 
<source lang="text">
 
<source lang="text">
Line 17: Line 11:
 
</source>
 
</source>
  
Or use the ports:
+
Or use the ports to build from source:
  
 
<source lang="text">
 
<source lang="text">
  
# cd /usr/ports/editors/emacs
+
# cd /usr/ports/editors/emacs && make install
 
 
# make install
 
  
 
</source>
 
</source>
  
==== Emacs 24 ====
+
Developers may find "[http://www.freebsd.org/doc/en/books/developers-handbook/emacs.html Using Emacs as a Development Environment]," from the official FreeBSD project documentation, a good starting point. Some of the config tweaks are a bit dated and might need updating. But overall it's a reference
  
To install the latest development version of Emacs, with all the latest features, there are two approaches: using a pre built package or building from the ports.
+
== OpenBSD ==
 
+
[http://www.openbsd.org/faq/faq15.html#Easy Set <tt>PKG_PATH</tt>] to an appropriate mirror.
To fetch and install the package run:
 
  
 
<source lang="text">
 
<source lang="text">
 +
# pkg_add -i emacs</source>
  
# pkg_add -r emacs-devel
+
<tt>pkg_add</tt> will prompt you for which version you want&mdash;currently, versions 21, 22, and 23 are available.
  
</source>
+
You can also install from the ports tree; however, "The [OpenBSD] ports tree is meant for advanced users. Everyone is encouraged to use the pre-compiled binary packages."(OpenBSD FAQ, [http://www.openbsd.org/faq/faq15.html#Ports section 15.3]) 
  
Or use the ports:
+
No premade port or package for Emacs 24 seems to be publicly available currently.
 
 
<source lang="text">
 
  
# cd /usr/ports/editors/emacs-devel
+
== NetBSD, DragonFlyBSD, other pkgsrc systems ==
  
# make install
+
On systems using [http://www.pkgsrc.org pkgsrc], something like
  
</source>
+
<source lang="text">
  
=== Related documentation ===
+
# cd /usr/pkgsrc/editors/emacs && make install
[http://www.freebsd.org/doc/en/books/developers-handbook/emacs.html Using Emacs as a Development Environment] from the official FreeBSD project documentation. Some of the config tweaks are a bit dated and might need updating. But overall it's a good starting point.
 
  
 
 
== NetBSD ==
 
 
== OpenBSD ==
 
After setting <tt>PKG_PATH</tt> to something appropriate (generally <tt>protocol://[http://www.openbsd.org/ftp.html mirrorsite]/pub/OpenBSD/`uname -r`/packages/`uname -m`/</tt>), execute as root or with sudo
 
 
<source lang="text">
 
# pkg_add -i emacs
 
 
</source>
 
</source>
  
Using the <tt>-i</tt> (interactive) option tells <tt>pkg_add</tt> to prompt you for which version to install. Emacs 21, 22, and 23 are available in packages. 
+
should work.
 
 
You can also install from the ports tree, in <tt>editors/emacs21</tt>, <tt>editors/emacs22</tt>, or <tt>editors/emacs23</tt>; however, "The [OpenBSD] ports tree is meant for advanced users. Everyone is encouraged to use the pre-compiled binary packages."<ref>OpenBSD FAQ, [http://www.openbsd.org/faq/faq15.html#Ports section 15.3]</ref> 
 
 
 
No premade port or package for Emacs 24 seems to be publicly available currently.
 
 
 
== PC-BSD ==
 
 
 
  
[[Category:FreeBSD]][[Category:Emacs-24]][[Category:Beginner]][[Category:Install Or Upgrade]]
+
[[Category:Emacs-24]][[Category:Beginner]][[Category:Install Or Upgrade]]

Revision as of 01:32, 24 December 2012

Emacs is available on the BSD variants either through precompiled binary packages or user-compiled ports. Installation instructions vary according to exact OS.

FreeBSD

To install the most recent prebuilt binary package of the (at the time) most recent stable version:

# pkg_add -r emacs

Or use the ports to build from source:

# cd /usr/ports/editors/emacs && make install

Developers may find "Using Emacs as a Development Environment," from the official FreeBSD project documentation, a good starting point. Some of the config tweaks are a bit dated and might need updating. But overall it's a reference

OpenBSD

Set PKG_PATH to an appropriate mirror.

# pkg_add -i emacs

pkg_add will prompt you for which version you want—currently, versions 21, 22, and 23 are available.

You can also install from the ports tree; however, "The [OpenBSD] ports tree is meant for advanced users. Everyone is encouraged to use the pre-compiled binary packages."(OpenBSD FAQ, section 15.3)

No premade port or package for Emacs 24 seems to be publicly available currently.

NetBSD, DragonFlyBSD, other pkgsrc systems

On systems using pkgsrc, something like

# cd /usr/pkgsrc/editors/emacs && make install

should work.