Pretty Emacs Reloaded

Update: If you are using Ubuntu 8.04 LTS “Hardy Heron” or Ubuntu 8.10 “Intrepid Ibex”, use the packages in the PPA of the Ubuntu Emacs Lisp team, instead of the packages referenced here. For Ubuntu 9.04 “Jaunty Jackalope” and newer, use the packages in Ubuntu repositories.

My popular1 Pretty Emacs package just got a tad better. I transferred the package to the brand new PPA service provided by Launchpad. So, what’s new about the package? First, I glad to announce the long-awaited amd64 support. Also, I am adding Gutsy Gibbon to the list of supported distributions.

To use the updated package on Ubuntu 6.10 “Edgy Eft”, add the

following lines to your /etc/apt/sources.list file:

deb http://ppa.launchpad.net/avassalotti/ubuntu edgy main
deb-src http://ppa.launchpad.net/avassalotti/ubuntu edgy main

To use the package on Ubuntu 7.04 “Feisty Fawn”, add the following lines to your /etc/apt/sources.list file:

deb http://ppa.launchpad.net/avassalotti/ubuntu feisty main
deb-src http://ppa.launchpad.net/avassalotti/ubuntu feisty main

To use the package on the development version of Ubuntu “Gutsy Gibbon”, add the following lines to your /etc/apt/sources.list file:

deb http://ppa.launchpad.net/avassalotti/ubuntu gutsy main
deb-src http://ppa.launchpad.net/avassalotti/ubuntu gutsy main

Unfortunately, if you still use Ubuntu 6.06 "Dapper Drake", you will have to keep using the older package release from my orignal repository. I still support Ubuntu 6.06, but I won't update the package with newer snapshots.

After adding the repository to your software source list, upgrade your version of the package with:

sudo aptitude upgrade

If you do not have a previous version of the package already installed and you desire to install it, do this instead:

sudo aptitude install emacs-snapshot emacs-snapshot-el

When upgrading the package you might get the following warning message:

WARNING: untrusted versions of the following packages will be installed!

Untrusted packages could compromise your system's security. You should only proceed with the installation if you are certain that this is what you want to do.

This is due to a bug in the PPA system. I believe that it will be resolved quickly. So, you can safely ignore the warning message for the moment.

Final note, thank you everyone for trusting me and giving me some great feedback about the package. I like to give special thanks to Romain Francoise and Michael Olson for their work respectively on emacs-snapshot and emacs22, during this summer.


  1. A rough estimate tell me there is over 30 000 people using my package, where 88% of them are Feisty Fawn users and 11% are Edgy Eft users. 

· RSS feed for comments on this post

55 Comments

  1. Matiyam said,

    September 17, 2007 @ 3:25 am

    Hi!

    I would love to keep using the “original” emacs-snapshot packaged in Feisty (just in case), and rename you package as emacs-pretty :) , or something like that.

    Which would be the easiest way of getting that?

    apt-get source emacs-snapshot (yours) and rename some files?

    Can you give me a hint about how to do it?

    Thanks!!

  2. Damien Cassou said,

    September 17, 2007 @ 4:46 am

    Thank you very much for your comments.

  3. Damien Cassou said,

    September 17, 2007 @ 4:52 am

    I don’t know why I said that :-). I wanted to say thank you for your great package. I’ve updated https://doc.ubuntu-fr.org/emacs.

  4. Peng said,

    September 17, 2007 @ 7:02 am

    I’m just about to ask when will the gusty version be available, then here it is!

    Thanks a lot! :)

  5. Peng said,

    September 17, 2007 @ 7:20 am

    Well, when I was installing it, I got some errors as following:

    Setting up emacs-snapshot (20070916-2~feisty) ...
    Byte-compiling add-on packages, please wait... failed.
    
    !! Byte-compilation for emacs-snapshot failed!
    !! This indicates a bug in one of the add-on packages
    !! installed on your system, or a bug in Emacs itself.
    !! Please file a bug report against emacs-snapshot
    !! and attach the file /tmp/emacs-snapshot.t11504
    dpkg: error processing emacs-snapshot (--configure):
     subprocess post-installation script returned error exit status 1
    Errors were encountered while processing:
     emacs-snapshot
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

    Even after I removed the old packages and re-installed it, the problem still exists.

  6. Alexandre said,

    September 17, 2007 @ 8:28 am

    Peng, that is on Feisty or on Gutsy? If that is on Gutsy, I think you installed the wrong version of the package. Otherwise, please send me the file /tmp/emacs-snapshot.XXXXXX mentioned in the error message.

  7. Alexandre said,

    September 17, 2007 @ 8:44 am

    Matiyam, I don’t think it can be done easily. I encountered two problems when I tried to rename the package name to emacs-xft:

    1. The emacs-snapshot package in Feisty conflicts with mine — i.e., it tries to overwrite some of the files owned by my package.
    2. Many add-ons for Emacs, such as AUCTeX, have a direct dependency on either emacs21 or emacs-snapshot. Changing the name of the package would prevent you from installing these add-ons.
  8. Aanjhan said,

    September 17, 2007 @ 12:12 pm

    Alex, Thanks for the wonderful package. I get this warning after upgrading to the latest snapshot. Could you please help me out remove this or comment on why this happens? I run Ubuntu feisty fawn, with latest updates. Warning (:warning): The version of `semantic’ loaded does not work in Emacs 22. It can cause constant high CPU load. Upgrade to at least 2.0pre4.

  9. Mark A. Hershberger said,

    September 17, 2007 @ 3:13 pm

    I have a repository of the XFT built emacs at http://mah.everybody.org/debian/ named “emacs23″ that installs with emacs-snapshot without a problem.

    Perhaps I could help you with packaging so that you could get a proper emacs-xft? And then I wouldn’t have to maintain my emacs23 packages.

  10. Alexandre said,

    September 17, 2007 @ 10:05 pm

    If anyone has the same problem as Peng, please do this to fix it:

    sudo update-alternatives --set emacs-snapshot /usr/bin/emacs-snapshot-gtk
    sudo aptitude reinstall emacs-snapshot
    

    I will include a fix for this bug in my next release.

  11. Alexandre said,

    September 17, 2007 @ 10:15 pm

    Aanjhan, that is weird. The latest version of semantic is 1.0pre4, not 2.0pre4. That most certainly is just a simple typo.

    As the warning message said, the semantic package has a bug that makes Emacs to cause a constant high CPU load. I got three options for you:

    1. Remove the semantic package from your system.
    2. Get and install the latest version of package from Gutsy repository.
    3. Ask me politely to backport the latest package to Feisty.

    You obviously want the option 3, don’t you? :) Alright, I will backport it when I will get some free time this week and put it in my repository for Feisty.

  12. Alexandre said,

    September 17, 2007 @ 10:43 pm

    Mark, thanks for your help offer.

    I was wrong when I said my package conflicted with the emacs-snapshot package from Feisty. It doesn’t. It is the emacs-snapshot package by Romain Francoise that conflicts with mine. I will try to look again to see it is worthwhile to change the name of the package at that time. Personally, I don’t think it is. However, if more people want the package’s name to be changed, I might change my opinion about this.

  13. Damien Cassou said,

    September 19, 2007 @ 5:21 am

    Hi Alexandre,

    what is the difference between the multi-tty support and the emacsclient that seems to be included in your package?

    And why don’t you work with Romain Francoise to provide a package with both features?

    Thank you very much for your wonderful package.

  14. Alexandre said,

    September 19, 2007 @ 10:41 pm

    what is the difference between the multi-tty support and the emacsclient that seems to be included in your package?

    Damien, have you read the description on the multi-tty project website? If not, read it. It will answer your question.

    And why don’t you work with Romain Francoise to provide a package with both features?

    Well, it is not a packaging issue. The code multi-tty support is currently in the trunk (that’s where the main development of Emacs is done), while the code for XFT support is in the emacs-unicode-2 branch (a branch can be understood as a temporary fork of a project). As a packager, merging the two branches is not my job; it is the job of the developers who knows how Emacs’s code is organized. The emacs-unicode-2 branch is expected to be merged into the trunk later this year.

  15. Devin Ben-Hur said,

    September 20, 2007 @ 12:51 am

    Why no Dapper support? Edgy users are expected to upgrady to Fiesty, then Gutsy. Dapper has been blessed as an LTS (Long Term Support) release and those needing stable environments will be using it for years.

  16. Damien Cassou said,

    September 20, 2007 @ 2:42 am

    Thank you very much for your answers. I still do not really understand the difference between emacsclient and multi-tty however.

  17. francois said,

    September 20, 2007 @ 3:41 am

    hey,

    maybe I am wrong but there are no packages on the repository http://ppa.launchpad.net/avassalotti/ubuntu/dists/feisty/main/binary-i386/

    consequently, when i update my repository list, it is just ignored.

    thanks

  18. Alexandre said,

    September 20, 2007 @ 10:12 am

    Devin, I still provide the package for Dapper and still support it. However as I already said, I won’t update it with newer snapshot. Now you may wonder why I didn’t migrate the package for Dapper to my new PPA. The reason is simple: I would blow up the 1GiB disk space limit of the PPA service if I would upload the package for Dapper. In fact, I am already over the limit: https://launchpad.net/~avassalotti/+archive

  19. Alexandre said,

    September 20, 2007 @ 10:46 am

    Damien, emacsclient tells a running Emacs to open a file. For example, when I want to edit a configuration file, I do:

     % emacsclient debian/rules
     Waiting for Emacs...
    

    The only problem, which the multi-tty feature solves, is it is annoying to have to change between your terminal window and your Emacs window for quick editing jobs. The multi-tty feature is an extension to emacsclient. It allows you to have multiple views of the same Emacs from your terminal. So, the above example with the multi-tty feature would become:

    % emacsclient -t debian/rules
    

    This would open the file in a new view (similar to emacs -nw) of your running Emacs.

  20. Alexandre said,

    September 20, 2007 @ 10:52 am

    Francois, you are looking at the wrong place. The package are located in http://ppa.launchpad.net/avassalotti/ubuntu/pool/main/e/emacs-snapshot/. Ideally, you shouldn’t have to worry how my repository is organized.

    when i update my repository list, it is just ignored.

    What “it” refers to? Is it my package that is ignored or my repository that is ignored?

  21. Carl said,

    September 20, 2007 @ 1:41 pm

    I have two issues:

    1) When I try to log into a remote host I get the following error:

    $ No fonts match `Monospace-10'
    [2]-  Done                    emacs

    I need to do this often in cases where I cannot install you package.

    2) I also have the same issue as Ping, but I’m using KDE not Gnome so emacs-snapshot.gtk is not on my box. The emacs symlink is completely missing and even after a complete reinstall of all my emacs components, minus yours, it still will not work.

    I know you are trying to do a good thing here, because there has been little GUI work done to emacs in recent years.

    Carl

  22. Carl said,

    September 20, 2007 @ 2:47 pm

    This is Carl again and I fixed the emacs not working issue, my 2nd isuues from the above post.

    This is what I did as root:

    cd /etc/alternatives
    ln -s /usr/bin/emacs21-x emacs
    cd /usr/bin
    ln -s /etc/alternatives/emacs emacs

    Then from any account that you did this in:

    $ echo "Emacs.font: Monospace-10" >> ~/.Xresources
    $ xrdb -merge ~/.Xresources

    Do this:

    $ xrdb -remove Emacs.font

    Then either delete the .Xresources file if this is the only line in it or delete the line you added before.

    Although this fixes the broken emacs it still will not let me use emacs from a remote machine.

    Carl

  23. Alexandre said,

    September 20, 2007 @ 6:57 pm

    Carl, the alternative bug will be fixed in my next release.

    You are trying to launch a remote Emacs with ssh -X, right? Then, you will need to remove Emacs’s font configuration line from your .Xresources file and use a slightly different method to set the font you want to use, which is adding this to your local .emacs:

    (if (>= emacs-major-version 23)
        (set-default-font "Monospace-10"))
    
  24. Carl said,

    September 21, 2007 @ 5:02 am

    I removed the Emacs.font line from the .Xresources and removed it with xrdb and added the lines you said to add, but now the font is microscopically small. Matter-of-fact I got the same results weather or not I put the lines in my .emacs file. I do have a very heavily modified .emacs file though.

    However, removing the above does let me run emacs through ssh on a remote host.

  25. Carl said,

    September 21, 2007 @ 5:16 am

    Opps, I just needed to log out and into my account again, sorry. It’s all working now, thanks.

  26. Bo Lu said,

    October 11, 2007 @ 4:49 pm

    Hi Alex,

    I’d like to point out a change in emacs that I am having problem with. The most recent version of emacs 23 opens up a splash screen and does not open a file directly when I give it a command line argument, do you know how to fix this?

    Thanks a lot!

  27. Alexandre said,

    October 11, 2007 @ 5:50 pm

    You can disable the splash screen by setting the variable inhibit-splash-screen to nil (false). You can do that by either adding the following to your .emacs:

    (setq inhibit-splash-screen t)
    

    Or, by using the “customize” system:

    M-x customize-variable inhibit-splash-screen
    

    There is a long thread on the emacs-devel mailing list about how annoying the new splash screen behavior is. Personally, how the trivial issue degenerated into a bikeshed argument makes me sick. However, you may, or not, find some useful information in the thread about how to fix the new splash screen annoyance.

    If you have any other question, just ask me. I will be glad to help you.

  28. Bo Lu said,

    October 13, 2007 @ 3:06 am

    Thank you Alex, that solves my problem.

    I just can’t change the habit of passing the filename as an argument to start emacs, and I have to C -x, C-f again every time annoys the hell out of me :(

  29. tuxmaniac’s blog » Blog Archive » Its that time of the year… said,

    October 14, 2007 @ 8:11 am

    [...] from upstream. The upgrade from Feisty went very smooth except for some trouble because of my emacs-snapshot installation which I later did a fresh install; otherwise it was a “All is well that Ends [...]

  30. Panos said,

    October 16, 2007 @ 2:17 pm

    Hi Alex!

    Pretty Emacs is great job! Thank you indeed!

    However, there is a problem for me (and – as I found googling around – for other greeks too), with greek faces. They look really ugly. Much more than without xft! I tried different fonts (Bitstream Vera, Monospace, Lucida Console and others), but the result is always the same. Obviously they are not antialiased.

    Any ideas?

    Thanks in advance

  31. Alexandre said,

    October 17, 2007 @ 10:24 am

    I can confirm that the Greek font in Emacs look awful. Unfortunately, I don’t know how to fix it. I try to find a solution or write a bug report to Emacs developers about it.

  32. Hans van Dok said,

    October 21, 2007 @ 10:25 am

    Hey Alexandre,

    I’ve been using your emacs before, and it worked great. However due to the upgrade to gutsy things got screwed up and I had to reinstall my entire box, and now I can’t get your package to work correctly. :(

    When I try to apt-get it (after removing all emacs stuff from the system), I get the following message:

    !! Byte-compilation for emacs-snapshot failed!
    !! This indicates a bug in one of the add-on packages
    !! installed on your system, or a bug in Emacs itself.
    !! Please file a bug report against emacs-snapshot
    !! and attach the file /tmp/emacs-snapshot.sv7547
    dpkg: error processing emacs-snapshot (--configure):
     subprocess post-installation script returned error exit status 1
    Setting up emacs-snapshot-el (1:20070928-1~gutsy) ...
    Errors were encountered while processing:
     emacs-snapshot
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    A package failed to install.  Trying to recover:
    Setting up emacs-snapshot (1:20070928-1~gutsy) ...
    Byte-compiling add-on packages, please wait... failed.
    
    !! Byte-compilation for emacs-snapshot failed!
    !! This indicates a bug in one of the add-on packages
    !! installed on your system, or a bug in Emacs itself.
    !! Please file a bug report against emacs-snapshot
    !! and attach the file /tmp/emacs-snapshot.il7573
    dpkg: error processing emacs-snapshot (--configure):
     subprocess post-installation script returned error exit status 1
    Errors were encountered while processing:
     emacs-snapshot
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Reading extended state information
    Initializing package states... Done
    Writing extended state information... Done
    Building tag database... Done

    Now after this, I can start emacs, by typing emacs-snapshot-gtk, but no fancy fonts, and apt-get keeps complaining…

    It would be awesome if you could help me…

  33. Hans van Dok said,

    October 21, 2007 @ 5:37 pm

    Sorry…

    I see the fix was already there. Everything works.

    Thanks again for the great work!

  34. Alexandre said,

    October 21, 2007 @ 9:30 pm

    That’s weird. I thought I had fixed this problem. I guess I didn’t — so, back to the debugging stage. Thanks for the notice.

  35. Felipe Leme said,

    October 26, 2007 @ 2:54 am

    Hi there,

    Your package is great, I don’t understand why Ubuntu does not include it by default.

    Anyway, I have an issue using it though: I cannot open a file using the command line. For instance, if I type emacs /etc/passwd (or whatever file name), instead of starting a buffer with that file opened, emacs always starts in the welcome screen.

    Is that a bug or a ‘feature’? Is there an workaround for this problem?

    Thanks,

    – Felipe

  36. Alexandre said,

    October 26, 2007 @ 9:09 am

    Felipe, see my answer to Bo Lu, who asked me the same thing.

  37. Felipe Leme said,

    October 26, 2007 @ 9:49 am

    Thanks for the quick answer. Just a comment, though: you have to set that variable to another value, other then nil. I set it to true:

    (setq inhibit-splash-screen t)

  38. Alexandre said,

    October 26, 2007 @ 3:03 pm

    Thanks for the correction!

  39. dirk husemann said,

    October 29, 2007 @ 6:12 am

    excellent package! thx for providing it.

    i’m getting the following funny effect: every so often the font size i’ve configured via customize-face: default is either rendered large or rather tiny. i end up having to change the font size back and forth. any idea?

  40. Emacs 23 with XFont « Ubuntu Tips said,

    December 17, 2007 @ 8:36 pm

    [...] The step by step instructions are available here: Pretty Emacs Reloaded. [...]

  41. Ramble : Links for 2008-01-08 [del.icio.us] said,

    January 8, 2008 @ 7:50 pm

    [...] Pretty Emacs ReloadedA nice Emacs package for Ubuntu that provides support for antialiased fonts.(tags: emacs ubuntu font weblog ) Posted by Stephen Tolton on Tuesday, January 8, 2008, at 7:47 pm. Filed under Links. Follow any responses to this post with its comments RSS feed. You can post a comment or trackback from your blog. [...]

  42. tecosystems » The Sunday Grab Bag: Firefox 3.0, LASIK, Mac Apps and More said,

    February 10, 2008 @ 6:24 pm

    [...] are beyond horrified by the non-antialiased monstrosity that is the default package, I recommend Alexandre Vassalotti’s Pretty Emacs package, which is GTK enabled, pipes in the Xfont backend and so on. It also [...]

  43. luis gutierrez said,

    May 14, 2008 @ 8:08 am

    And for those 8.04 users:

    deb     http://ppa.launchpad.net/avassalotti/ubuntu hardy main
    deb-src http://ppa.launchpad.net/avassalotti/ubuntu hardy main
  44. Timothy said,

    May 27, 2008 @ 7:42 pm

    Hello,

    Its probably not a big concern for most people as the title screen is easily disabled in one’s .emacs.el or elsewhere, but I noticed that your packaged version seems more reluctant to leave the title screen than the emacs-snapshot-gtk in the Gutsy repos. Eg., on my previous emacs, typing “emacs myfile” at the commmand line would open emacs with the title screen showing, but a click or a C-n and it would disappear. With your package, I have to manually change the buffer to the opened file. Is this a behaviour change of newer emacs versions or a bug?

  45. Alexandre said,

    May 28, 2008 @ 2:16 pm

    Timothy, see my answer to Bo Lu and Felipe, who asked me the same thing.

  46. Guillaume said,

    June 2, 2008 @ 2:18 am

    Hello,

    I encountered a problem when opening new frames (C-x 5 2) : the font felt back to the non antialiased one. I fixed it with the following lines in my .emacs:

    (if (>= emacs-major-version 23) (progn (set-frame-font "DejaVu Sans Mono-9") (add-to-list 'default-frame-alist '(font ."DejaVu Sans Mono-9"))))

    I’m not an expert, I compiled informations found on the net, so it may not apply to your needs ^^. BTW, thanks a lot for your package.

  47. Mike said,

    June 4, 2008 @ 6:48 pm

    It seems that I get an “!! Byte-compilation for emacs-snapshot failed!” error when installing in Ubuntu 8.04 unless I first disable the Universe repo so as to prevent a conflict with the emacs-snapshot packages there, just as a heads up.

  48. Alexandre said,

    June 7, 2008 @ 12:18 pm

    Guillaume, try to use:

    (if (>= emacs-major-version 23)
      (set-default-font "DejaVu Sans Mono-9"))
  49. Alexandre said,

    June 7, 2008 @ 12:23 pm

    Mike, you probably have an “alternatives” conflict. The fix is:

    sudo update-alternatives --set emacs-snapshot /usr/bin/emacs-snapshot-gtk
    sudo aptitude reinstall emacs-snapshot

    Note that Ubuntu 8.04 has the "Pretty Emacs" package in the Universe component. So, you can install the Ubuntu one instead of mine.

  50. Guillaume said,

    June 10, 2008 @ 3:38 am

    Alexandre, I used those lines but new frames didn’t show antialiased fonts. The workaround I mentioned works just fine.

    Is it enough for you to specify the set-default-font variable, and then C-x 5-2 displays a new antialiased frame ? In this case I have a major config pb on my box (may be the case).

  51. Darren said,

    June 10, 2008 @ 2:27 pm

    I wonder if you have code completion working for c/c++, python, etc?

    I’ve tried to find packages for this and most of it seems to be broken in one way or another. I’m trying to get http://ecb.sourceforge.net/ working, without much luck. Any tips on how to build this for emacs-snapshot-gtk?

  52. tecosystems » My Arsenal said,

    June 12, 2008 @ 8:28 am

    [...] Emacs (writing) – I use the “pretty” build [...]

  53. Peng said,

    September 25, 2008 @ 8:12 am

    Hi Alex, when will the build for 8.10 Intrepid be available?

  54. jwickers said,

    October 5, 2008 @ 11:34 am

    I have the same issue as you Guillaume on today CVS version on Gentoo, so the problem is probably not in you configuration, but your workaround works for me too, so thanks.

  55. Thomas said,

    October 12, 2008 @ 1:51 pm

    Due to your package I’ve justed “converted” from vim to emacs, and I have to say it’s much better. Thanks a lot!