Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!elroy!mahendo!jplgodo!wlbr!scgvaxd!trwrb!wiley!rich From: rich@wiley.UUCP Newsgroups: comp.emacs Subject: monkey.el symbolic link bug (and fix) Message-ID: <1559@wiley.UUCP> Date: Thu, 12-Nov-87 15:57:40 EST Article-I.D.: wiley.1559 Posted: Thu Nov 12 15:57:40 1987 Date-Received: Sat, 14-Nov-87 16:38:02 EST Organization: TRW Inc., Redondo Beach, CA Lines: 40 Keywords: monkey.el Monkey.el does not correctly mark symbolic links with '@' under Sun UNIX version 4.3. Monkey uses the file-symlink-p standard function, but gives it a relative pathname instead of a full path name. Unfortunately, file-symlink-p calls readlink(2), which expects a full path name. This is probably a gunemacs documentation bug, since the documentation string for file-symlink-p does not make this distinction. Fix: stuff the path name onto the front of the file name before calling file-symlink-p. My fix also checks for symbolic links before directories -- this is a personal preference, making a symbolic link to a directory show up as '@' instead of '/'. Context diff follows: ---------------------------------------------------------------------- *** monkey.el Thu Nov 12 12:53:35 1987 --- monkey.el.fixed Thu Nov 12 12:47:20 1987 *************** *** 450,457 **** (insert " " (cond (monkey-be-fast ??) ((file-directory-p name) ?/) - ((file-symlink-p name) ?@) ((file-readable-p name) " ") (t ??))) (insert-char 32 indent-spaces) --- 450,457 ---- (insert " " (cond (monkey-be-fast ??) + ((file-symlink-p (concat default-directory name)) ?@) ((file-directory-p name) ?/) ((file-readable-p name) " ") (t ??))) (insert-char 32 indent-spaces) -- ... Rich Messenger {cit-vax,trwrb}!wiley!rich wiley!rich@csvax.caltech.edu