XEmacs SXEmacs gnu head Joke about Emacs and vi.


 

This is an attempt to collect all my S?X?Emacs stuff into one place.
From now on, XEmacs refers to either XEmacs or SXEmacs (sorry Steve).
Emacs refers to GNU Emacs and emacs is generic.

Note that some of this code is work in progress and may not even run.
If you have problems/questions email me at xemacs at seanm.ca.

Lost your shifted function keys?

Gnuserver grief?

What Happened?

Those of you used to the old page, especially the Emacs users, will notice a change. I have merged the XEmacs and Emacs sites. This was done to make things easier for me pure and simple ;) I now only have to keep one set of pages up to date.

Since the XEmacs site was more up to date, it won out. I hope to clean things up more in the future.

Git Repository

I am trying out github as the repository for my .xemacs files. You can browse all the files. You can also get the entire git repository:

git clone git://github.com/smaclennan/dot-xemacs.git

XEmacs + Slackware

XEmacs is not part of the official Slackware release. But I have submitted some XEmacs packages to Linux Packages.

Configuration Files

I have switched to the new XEmacs 21.2 style where all the XEmacs configuration files are in the .xemacs or .sxemacs directory and the init file is ~/.xemacs/init.el.

For Emacs 22 and up, the directory is .emacs.d and the init file is ~/.emacs.d/init.el.

For older Emacs, you can try creating a .emacs file with just: (load "~/.emacs.d/init")

I am currently using the same init.el for all three versions, let's see how that goes.

In my init.el there is a function called excuse that requires the file excuses.lines. This needs to be in one of the directories in your data-directory. I put it in $HOME/.xemacs/site-packages/etc. Warning, this is a binary file. It is in the same format as the Zippy quotations in yow.lines.

Here is the portion of my .Xdefaults file that applies to XEmacs.

Minimal Init File

I made an attempt at work to create a minimal init.el that makes XEmacs (or Emacs) usable. Put it in $HOME/.xemacs/init.el for XEmacs and $HOME/.emacs for GNU Emacs.

Source Files

Lisp files that I have created or that I cannot live without. None of these files are part of XEmacs proper and only find-file.el (unmodified) is part of Emacs.

All files should work in both XEmacs and GNU Emacs unless otherwise noted.

If there is an author link, it is a link to an off-site version of the file. It is not necessarily a link to the authors home page. The file link is always the local version that I am currently using.

FileAuthorDescription
backup.el Me Put all backup files in one directory. GNU Emacs does not have `auto-save-directory', so this will not work.
browse-kill-ring.el Colin Walters Allows you to browse the kill ring interactively.
my-calc.el Me A very simple calculator and one of the first real lisp programs I ever wrote. This is not to be confused with the official calc package.
ddk-setenv.el Me Windows: Mimics DDK setenv. Untested under GNU Emacs but should work.
dir-diff.el Me Obsolete. An initial attempt at diffing directories for changes. See smerge.el.
dired-extras.el Me This adds some extra functionality to dired.
  • du on the current directory or file
  • toggle showing dot-files
  • read pdf files automagically
Does not work under GNU Emacs.
filter.el Me Simple resister/capacitor filter calculator.
find-file.el Henry Guillaume The Emacs version with Ada removed.
font-lock-extras.el Me Obsolete. See init.el.
git-diff.el Me Git diff the current file using ediff.
gopher.el Scott Snyder This is a gopher mode for XEmacs. I have modified it to support html files.
greedy-delete.el Barry A. Warsaw I use this package to get the C-mode hungry delete functionality in elisp mode.
h2t.el Me Very simple html to text converter. Currently used to convert the output from lxr to text.
http.el Me Some generic http routines. Now supports HTTP/1.1. Will use wget if available (highly recommended). Now supports port numbers in url (e.g. http://host:81/page.html).
intellimouse.el Me Support for a wheel mouse.
libc-mode.el Ralph Schleicher Lookup libc information in the libc info file.
lxr.el Me An an lxr interface for emacs. More info...
mpg.el Me Given distance in kms and gas in litres, calculate mpg, US mpg, and l/100km.
slashdot.el Me Reads RSS feeds and places the headers in a browsable buffer. Requires http.el. Also needs these xpm files: slash.xpm, no-slash.xpm, and bad-slash.xpm. Put these in your .xemacs/site-packages/etc directory or set `slashdot-icons-dir'.

If anybody wants to make icons that look more like the mail icon, I would appreciate it.
smerge.el Me SAM's merge. It is basically a layer on top of `ediff'. More info...
source-safe.el Stan Lanning An interface to SourceSafe.
svn.el Me Some svn helpers. Mainly svn-diff.
trim.el Me This file provides functions which "trim" things (mainly whitespace) from lines.
vc-ediff.el Me A replacement for vc-diff that uses ediff to diff the versions.
ws-trim.el Martin Stjernholm This little gem removes whitespace from the ends of lines. It should be required by law that you use this!

GNU Emacs compatibility files. Do not load in XEmacs!
FileAuthorDescription
extent.el Me Some simple XEmacs extent compatibility for Emacs
itimer.el Me Simple XEmacs itimer compatibility for Emacs.

You can browse all these files at github.

anti-gnus

What is anti-gnus? I don't actually hate gnus, I just don't use it. And it is very large. I know, I know, disk space is cheap, but I still don't like wasting it.

Gnus used to be so all pervasive, that many packages did not work without it. This brings back a package I started years ago that became so large, I gave up. Well, I tried again and found I only needed some time routines. Nice!

So anti-gnus contains gnus files that are needed by other packages. The README explains which packages needed the files. Note that the list is probably incomplete since once I put the file there, I have it. So subsequent packages will "just work".

Lost your shifted function keys?

After installing Slackware 9.0, my shifted function keys would not work. It seems this is also a problem in RedHat 9 so it is probably an XFree86 4.3 issue. It looks like XFree86 4.3 is assigning functions to the shifted function keys by default. Since XEmacs does not understand the keys, you lose them.

The simple solution is to add the following lines to your .Xmodmap:

keycode 67 = F1
keycode 68 = F2
keycode 69 = F3
keycode 70 = F4
keycode 71 = F5
keycode 72 = F6
keycode 73 = F7
keycode 74 = F8
keycode 75 = F9
keycode 76 = F10
keycode 95 = F11
keycode 96 = F12
    

Robert B Mills pointed out that The problem with the xmodmap fix is that I can no longer change virtual terminals with CTRL+ALT+Fn commands.

Here is a patch that corrects the shifted function key problem without loosing the CTRL+ALT_Fn commands. With this patch you do not need the .Xmodmap fix.

Update: with the X.Org X11R6.9 supplied with Slackware 11.0 the above patch no longer works. However, you can fix it in your init file. For example, to map shifted F5 to query-replace-regexp:

(global-set-key [XF86_Switch_VT_5] 'query-replace-regexp)
In my init.el file I also left in the [(shift F5)] version for backward compatibility.

Gnuserv Grief?

Do you sometimes run XEmacs with sudo? Do you then find you cannot use gnuserv? Basically, the /tmp/gsrvdir<uid> directory ends up getting owned by root.

One solution is to make gnuserv +s. But this opens a potential security hole. A better solution is to not start gnuserv when you are root:

(unless (string= (user-login-name) "root") (gnuserv-start))

Remember, if you did run as root by mistake, you must remove the /tmp/gsrvdir<uid> directory and then run gnuserv-start.

Notes

Why SXEmacs beta?
I used the beta image for SXEmacs because the bleeding beta is so cool. That is the only reason.

Your S?X?Emacs regexp is wrong!
Yes, I know the regexp will incorrectly match SEmacs... I took a bit of artistic license. For the truly pedantic: <(S?X)?Emacs>

Links

And a couple of vi links for balance:


Contact the webmaster
Last modified: Sat Mar 27 15:28:29 EDT 2010