There are 3 posts tagged with emacs.

There is an Atom feed for posts tagged with emacs.

Snippets

2009-03-27 Tags: ,

Blogging live from PyCon. One thing that I found really interesting during the tutorial sessions was to see what kind of development environment other Python hackers were using. At first, I found it quite unusual to see Joe Gregorio using gedit, an editor that I found very limited compared to the very rich traditional Unix editors like Emacs and Vim. Then Joe started giving us and overview of what appengine can do and I was blown away.

I mean, I was blown away by appengine but I was also really impressed by how efficient Joe was with his editor. One feature that was pushing him quickly from one from-scratch example to the next was the snippets plug-in for gedit.

Snippets are templates for typical programming constructs. There are things that we code over and over, boiler plate, repetitive code, almost always the same but not quite. You know what I mean, classes, for-loops, method definitions, test-cases. Python do well without most of the boiler plate code that is mandatory in other languages but you still have some of it and when you code all day long, it adds up to a lot of boiler plate at the end of the week.

I'm not ready yet to move to gedit so I looked for the snippet modes available for emacs; there's a lot of them. I know ELisp but as some people commented on the emacs wiki, a template language that is Lisp based tends to become too syntax heavy and hard to read for the kind of small pieces of code that you use snippets for. After looking at the non-sexp options, I decided to go with YASnippet. It has a very engaging demo screencast and unlike most of the contenders it's both actively maintained and easy to setup. I haven't used it much yet but I really like it so far.

update: the former link to the screen cast was obviously wrong. Sorry about that.

Emacs 22 on Debian Etch

2007-08-06 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.

Email Clients

2005-08-21 Tags: , ,

If someone typed something like date +"%Y" at his terminal, assuming that he used the Gregorian calendar, he would probably see something like 2005. If the same person was to read RFC196, he would probably see July 20, 1971 near the beginning. Only 13 years after the discovery of the Bessemer process we had the first transcontinental railroad, after more that 30 years of email, all email clients suck.

Anyone who uses email for something else than remote backups knows what I'm talking about. If you need to read your emails from more than one location you can probably forget all the nice "native" clients. But webmails requires heavy usage of the mouse, lacks many important features like a usable spell-checker and incremental search. All the webmail service provider have EULA that requires your first born and a pint of fresh blood a month. Namespace pollution is another problem, I don't want my email to be y._kk_gingras234252_asd@example.com, I want ygingras@ygingras.net. So called native clients have pretty UI but when some important feature is needed we feel that they don't want to mess too much with that UI so the feature get postponed. Spam is a plague but a great thinker found a solution a few years ago already.