Archive for the ‘Emacs’ Category.

Playing with multi-tty Emacs

GNU logo I’ve installed a new version of [GNU][] [Emacs][] on my [Debian][] system. The cool thing about this version is that is has supprot for multi-tty which means that it can show frames om multiple different kinds of TTYs.

Normally you can start your Emacs in X and use emacsclient to quickly bring up a new frame. This works fine — but in fact it’s a little too much, for you always get a new frame (in the X environment) when using emacsclient. If you are logged in using something like SSH, then what you really want is to have emacsclient show a frame on your terminal.

This is exactly what the Emacs multi-tty support project gives you! Starting emacsclient with the $DISPLAY variable set gives you a new frame in X, as you would expect. But if this variable is unset (as it is in a SSH session without X forwarding) then you get your new frame in the console. You then of course have access to Emacs just as you left it, including all the buffers.

So I can now just leave my Emacs running at my computer, and to check mail I just SSH to my box and connect to the running Emacs process. There I just switch to my [Gnus][] buffer instead of having to kill it first. Very sweet!

Oh, and by the way: the author says that emacsclient starts up faster than vi… In fact, I think I’ll make vi a symlink to emacsclient from now on… ;-)

Emacs 21

GNU head

I installed Emacs 21 today — when using Debian it’s particularly easy, you just do apt-get install emacs21 :-) I was pleased to find out that Emacs 21 can coexist with Emacs 20. All my setting worked in the new version, and I could even read my mail and news without any problems.

The new Emacs looks different from earlier version — quite different in my opinion. The new version has a toolbar with little images you can click on, it has tooltips all over the place, and it supports inline images and proportional-width fonts. The menus have changed and they are now organized logically that before.

I don’t like the toolbar that much, and I’m tempted to turn off those tooltips. I saw that there is an option, that makes them appear in the minibuffer window instead. I have only used it for a day or so, but I haven’t found any bugs or missing features. Instead I’ve found a lot of new functionality and a lot of new exciting packages.

Working on a new news-system

I’m currently working on a new and improved version of my news-system. The current system is based entirely on text-files. Why did I choose to use text-files, instead of entering the news into something like phpMyAdmin, you might ask. The answer is simple: I can use Emacs to write the text-files, but would have to use a browser (like Netscape) to enter the information into phpMyAdmin. And the current system works beautifully. I now have about 85 text-files in the include directory, and the page is still rendered pretty fast.

But using text-files isn’t the smartest way to store data. If I had stored the news in a database, I could search them easily or group them into different topics.

So, I had to find a way to bridge the gap between Emacs and the database. The solution, what I’m working on right now, is to write a text-file, parse the file with PHP and put the results into the database. That way I can still use Emacs to write the news, but I also get the fancy features of the database.

I’ll let you know when it’s finished, so you can take a look at my code.