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?

Git Repository

I am using 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 it is at SlackBuilds.org!

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 create a .emacs file with just: (load "~/.emacs.d/init")

I am currently using the same init.el for all three versions.

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.

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.

In the git repository I have split the files into two directories. The sam directory contains files that I have created. The misc directory contains files that others have created.

site-packages/lisp/sam
FileDescription
arm.el Some code to support ARM assembler.
backup.el Put all backup files in one directory. GNU Emacs does not have `auto-save-directory', so this will not work.
cpuinfo.el Some CPU info. Some functions work with Linux and Windows, some info is Linux only.
ddk-setenv.el Windows: Mimics DDK setenv. Untested under GNU Emacs but should work.
dired-extras.el 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 Simple resister/capacitor filter calculator.
git-diff.el Git diff the current file using ediff.
gpl.el Handy functions to add GPL copylefts to the starts of files.
h2t.el Very simple html to text converter. Currently used to convert the output from lxr to text.
http.el 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 Support for a wheel mouse.
lxr.el An an lxr interface for emacs. More info...
mpg.el Given distance in kms and gas in litres, calculate mpg, US mpg, and l/100km.
my-calc.el 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.
my-compile.el Very handy function for people who work with large code bases. More info...
my-sparse.el Interface to Linus' sparse program.
slashdot.el 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 SAM's merge. It is basically a layer on top of `ediff'. More info...
svn.el Some svn helpers. Mainly svn-diff.
trim.el This file provides functions which "trim" things (mainly whitespace) from lines.
vc-ediff.el A replacement for vc-diff that uses ediff to diff the versions.
xcomp.el This is a set of functions to handle switching between a cross-compiled platform and native compiling. This package was originally geared to the PIKA Warp, it should now handle most cross-compile environments.

site-packages/lisp/misc
FileAuthorDescription
browse-kill-ring.el Colin Walters Allows you to browse the kill ring interactively.
find-file.el Henry Guillaume The Emacs version with Ada removed.
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.
ksh-mode.el Gary Ellison ksh-mode with some patches to handle indentation properly.
libc-mode.el Ralph Schleicher Lookup libc information in the libc info file.
sure-tags.el Bob Glickstein This file surrounds various tag-searching functions with code that
  1. First makes sure you've selected a tags file
  2. Makes sure that tags file exists (and builds it if it doesn't)
  3. Performs the requested search
  4. Retries the search if it fails, allowing you to first rebuild the tags file or specify a new one
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! The rest of the files in this directory not listed below are standard XEmacs files that are not provided in Emacs.
FileDescription
build-loaddefs.el I couldn't find a way to automagically build the loaddefs files. So here is a simple version.
extent.el Some simple XEmacs extent compatibility for Emacs
itimer.el 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.

Links

And a couple of vi links for balance:


Contact the webmaster
Last modified: Sun Dec 4 18:33:02 EST 2011