Emacs 22 on Debian Etch

2007-08-06 (permalink tags: , )

Emacs is quite a text editor. When a major version of Emacs is released, it's major news for many developers.

There are many good reasons to upgrade to 22 before your distribution has fully integrated packages available. Mine is nxhtml-mode. Building Emacs 22 from source is not too painful, but it's still nice to have it integrated in the packaging system. Among other thing, it makes it easier to add Emacs modes with apt. Emacs 22 is already in Debian Sid but it didn't make it to Etch backports yet. For people running i386, there is an alternate backports repository with Emacs 22. Those running some other architecture, like me, will need to rebuild the source deb. Fortunately this is a painless procedure.

To install a .deb of Emacs 22 on Debian Etch, amd64, for example, add the alternate backports source to /etc/apt/sources.list:

    deb-src http://hype.sourceforge.jp/f etch backports
  
As root, run:
    apt-get update
    apt-get install build-essential fakeroot
    apt-get build-dep emacs22
  
This will give you all the dev environment that you need to rebuild the .debs from source. As a normal user, run:
    mkdir /tmp/build
    cd /tmp/build
    fakeroot apt-get source -b emacs22-common
  
You should now have all the .debs for Emacs 22. Install them as root like this:
    dpkg -i "emacs22-gtk_22.1+1-1~edh.0_amd64.deb" \ 
            "emacs22-bin-common_22.1+1-1~edh.0_amd64.deb" \ 
            "emacs22-common_22.1+1-1~edh.0_all.deb"
  

That's it, you now have Emacs 22. No need to install Sid or to mess with tarballs.

update: I simplified the dependencies installation instructions. Thanks to Richard.

Comments

2007-08-26 12:25:42 by fx (direct link | reply)

Simply thanks from south of Iberian Peninsula,

let's go to compile!

2007-09-12 07:51:32 by Richard (direct link | reply)

The fakeroot fails for me with various unment dependencies. If the same happens to you dont worry, just read the unmet requirements and install them manually. Possibly the "how to" could list a full set of dependencies to install so that the process works on a new install of Etch.

2007-09-13 10:27:53 by Yannick (direct link | reply)

Sure, can you specify what dependencies you had to add manually? I don't have a fresh install handy or even a free partition at the moment.

2007-09-13 14:30:32 by Richard (direct link | reply)

No, sorry.

But better yet is to simply

"apt-get build-dep emacs22"

after the update.

2007-09-14 07:03:45 by Yannick (direct link | reply)

This is a really nice apt command that I didn't know. I updated the instructions. Thanks!

2007-09-16 13:03:20 by Richard Riley (direct link | reply)

Glad you liked it. One thing that confuses me little though is why go to this effort? Are there not already backports that we could use? I am not very familiar with Debian and backports/pinning but it seems that there should be a way just to pull in an existing version of Emacs 22 for Debian (testing) which "just works" without the need to install a build environment. I would like to hear your thoughts on that.

2007-09-16 13:51:14 by Yannick (direct link | reply)

Quite often, the stuff in testing is compiled against a newer libc. Installing such a .deb requires that you get the new libc and then you need up upgrade half your distribution. Backports are the packages from testing recompiled with most on the libs already in Etch. Note that there is a backported binary package for 32 bits x86; it's just AMD-64 that requires you to recompile the backported package.

2007-09-17 12:56:15 by Richard (direct link | reply)

BTW, what about the emacs help files? After this I have no emacs node in my info :(

2007-09-18 04:00:30 by Yannick (direct link | reply)

The online help works in here: apropos, tutorial, describe-mode, and the others. I also have an emacs node in my info; it leads to efaq, the Emacs FAQ, and it contains information regarding Emacs 22. What was in the Emacs info node before your upgrade?

2007-09-18 06:14:26 by Richard (direct link | reply)

I have those too.

But the emacs manual is missing ( I mean this when I said emacs node).

Also missing are the Gnus manual and the ELisp manual.

2007-09-19 01:30:12 by Yannick (direct link | reply)

Have a look at:

/usr/share/doc/emacs22-common/README.Debian.gz

The documentation files are probably released under the GFDL so they must have been moved to another package that no one seems to have backported yet.

2008-02-09 13:03:41 by jkc (direct link | reply)

For what it's worth, the first time I ran the build it appeared that a bunch of .el files weren't being copied to the directory /usr/share/emacs/22.1/etc because it didn't exist. So I killed the build and created the directory manually then reran it and the build went much more smoothly. I don't know if it was necessary or not.

mkdir -p /usr/share/emacs/22.1/etc fakeroot apt-get source -b emacs22-common

jkc

2008-02-09 13:09:49 by jkc (direct link | reply)

In case it isn't obvious, my post lost a linefeed along the way. It should be:

  • mkdir -p /usr/share/emacs/22.1/etc
  • fakeroot apt-get source -b emacs22-common

Leave a comment