Farmin' Links

Those of you who frequent this site may have noticed that since I started on the Hacker's Diary, the inter-page linking on the site has gotten way outta hand. I noticed this myself, and got fed up of checking what was linked to what and forgetting where I'd left a particular page and so forth. So I decided that my computer should do it for me, and thus was born the idea of the linkfarm.

linkfarm-mode.el and the companion Perl script are the current incarnation of said idea. You point at your website to generate the linkfarm database, then you hook linkfarm-mode.el into your HTML editing mode; then, when you come across a word or phrase you know you've linked before, you hit C-c C-? and it makes an attempt to dig up the correct link and repatch it if necessary (for relative URLs). It's rough-and-ready since this is your typical hackerware-that-escaped as opposed to something I sat down and designed, but I use it to help me maintain this entire site. Due to a recent update, the lookup is far faster - Emacs is, unsurprisingly, far faster at parsing alists than it is at parsing a randomly-delimited buffer full of text.

The Bits and linkfarm-mode.el are the bits you need. has several options: requires a small assload of modules to run. Cope. That's what CPAN is for.

BUGS: It should notice when you've deleted or updated a link and adjust accordingly, instead of having to rebuild the database from scratch to achieve this. There should be a program to crawl my website and change all occurrences of a link to the updated URL. There should be a way of selecting one of multiple URLs. The elisp and the script should agree on the cleaning up of text. There should be World Peace, and Ham Sandwiches for all (except where prohibited by religion, law, or personal taste).


You are in a maze of twisty pages,
all pointing at each other.