[olug] getting to emacs

Mark A. Martin mmartin at amath.washington.edu
Tue Aug 22 12:22:08 UTC 2000

What I have written below shows you ways to analyze packages on your
system and where to find the missing emacs packages for your system. 
The bottom line is that you need to install the emacs-X11 package from
your Red Hat 6.0 CD or from a mirror of the Red Hat FTP site.  If you
mount the CD at /mnt/cdrom, the files will be in /mnt/cdrom/RedHat/RPMS
on your CD or try the directory (assuming that your system is an x86)


on the University of Wisconsin FTP site.

Read on for much more detail.


Okay, here is a little more information using my system as an example. 
I have 6 emacs packages on my (Mandrake 7.0) system (and, yes, I know
that my emacs needs to be updated)


A quick bash loop lists all of the files from these packages that live
in directories likely to contain the emacs binary

for package in `rpm -qa | grep -i emacs`; do
    echo -e "\n$package:\n"
    rpm -ql $package | egrep '/usr/bin|/usr/X11R6/bin|/usr/local/bin'
done | less

You can add other directories to the list grepped for and you can remove
or replace the pipe to less at the end if you'd like the output to
remain in your window after you're done looking at it or if you'd like
to redirect the output to a file.

On my system, this command yields














This output suggests that I will be executing /usr/bin/emacs, which is
part of the emacs-X11-20.5-3mdk package, if I type "emacs" at the
command line.  Typing "which emacs", verifies this.  Typing "ls -l
/usr/bin/emacs" shows that this is truly the binary rather than a link
to a binary somewhere else.

At this point, I suspect that you need to install the emacs-X11
package.  Notice in the above output that I also have the
emacs-20.5-3mdk package installed, but this package does not contain the
emacs binary.

I recommend looking for the other emacs packages on your Red Hat 6.0 CD
or on a mirror of the Red Hat FTP site.  The packages should be in the


On my system, this directory is /mnt/cdrom/RedHat/RPMS

I have a Red Hat 6.2 CD, which contains the emacs packages



rpm -qi package_name

will print out information describing an installed package, and typing

rpm -qip package_file

will print out information describing the package contained in a package
file.  The information available for the emacs-X11 package on my Red Hat
6.2 CD is


Name        : emacs-X11                    Relocations: (not
Version     : 20.5                              Vendor: Red Hat, Inc.
Release     : 7                             Build Date: Mon 21 Feb 2000
Install date: (not installed)               Build Host:
Group       : Applications/Editors          Source RPM:
Size        : 5848886                          License: GPL
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : The Emacs text editor for the X Window System.
Description :
Emacs-X11 includes the Emacs text editor program for use with the X
Window System (it provides support for the mouse and other GUI
elements). Emacs-X11 will also run Emacs outside of X, but it has a
larger memory footprint than the 'non-X' Emacs package (emacs-nox).

Install emacs-X11 if you're going to use Emacs with the X Window
System.  You should also install emacs-X11 if you're going to run
Emacs both with and without X (it will work fine both ways). You'll
also need to install the emacs package in order to run Emacs.


This information also suggests that you need to install the emacs-X11

The following bash loop, which is a slight modification of the previous
loop, searches the packages on the CD for files that will be installed
in /usr/bin, /usr/X11R6/bin, or /usr/local/bin:

cd /mnt/cdrom/RedHat/RPMS
for package in `ls *emacs*`; do
    echo -e "\n$package:\n"
    rpm -qlp $package | egrep '/usr/bin|/usr/X11R6/bin|/usr/local/bin'
done | less

The output for my Red Hat 6.2 CD is











As before, the emacs binary /usr/bin/emacs is located in the emacs-X11

If you need to use an FTP site, try


at the University of Wisconsin.  This URL will take you directly to the
directory containing the Red Hat 6.0 rpm files.

Good luck,

Mark A. Martin					Dept of Applied Mathematics
http://www.amath.washington.edu/~mmartin	University of Washington

To unsubscribe, e-mail: olug-unsubscribe at bstc.net
For additional commands, e-mail: olug-help at bstc.net

More information about the OLUG mailing list