home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / gnu / emacs / bug / 1583 < prev    next >
Encoding:
Text File  |  1992-12-20  |  1.9 KB  |  54 lines

  1. Newsgroups: gnu.emacs.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!blackbird.mitre.org!dsg
  3. From: dsg@blackbird.mitre.org (David S. Goldberg)
  4. Subject: Re: dired not following symbolic links in 18.58
  5. Message-ID: <DSG.92Dec17103956@blackbird.mitre.org>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: The Mitre Corp., Bedford, MA.
  8. References: dsg@blackbird.mitre.org (David S. Goldberg)
  9. Distribution: gnu
  10. Date: Thu, 17 Dec 1992 15:39:56 GMT
  11. Approved: bug-gnu-emacs@prep.ai.mit.edu
  12. Lines: 40
  13.  
  14. >>>>> In article <1992Dec17.001310.18461@parc.xerox.com>,
  15. >>>>> macdonal@xerox.com (Dale MacDonald) writes:
  16.  
  17. Dale> Emacs version: 18.58.10 OS: SunOS 4.1.{1,2,3}
  18.  
  19. Dale> Since moving to 18.58 dired no longer follows symbolic links.
  20. Dale> All attempts to follow one, either by C-xC-v and giving a name
  21. Dale> which happens to be a link, or by trying to open or view a link
  22. Dale> already being displayed in dired.  (This is particularly
  23. Dale> annoying around here since ~/ happens to be a symlink.)
  24.  
  25. Dale> Anyone else see this?
  26.  
  27. Yes, and I still see the same thing in 18.59 on an SGI running IRIX
  28. 4.0.5.  I seem to remember this is far back as 18.57, but I'm not
  29. positive.  Here's what I ended up doing to work around it.  Make sure
  30. this stuff is loaded after dired.  I've found that I also need this
  31. with tree dired.
  32.  
  33. (defun dired-is-symlink ()
  34.   (let ((realfile (file-symlink-p (dired-get-filename))))
  35.     (if realfile realfile (dired-get-filename))))
  36.  
  37. (defun dired-find-file ()
  38.   "In dired, visit the file or directory named on this line."
  39.   (interactive)
  40.   (find-file (dired-is-symlink)))
  41.  
  42. (defun dired-find-file-other-window ()
  43.   "In dired, visit this file or directory in another window."
  44.   (interactive)
  45.   (find-file-other-window (dired-is-symlink)))
  46.  
  47. --
  48. Dave Goldberg                      UNIX Systems Programmer/Administrator
  49. Post: The Mitre Corporation MS B020 202 Burlington Rd. Bedford, MA 01730
  50. Phone: 617-271-2460
  51. Domain: dsg@mbunix.mitre.org  UUCP: {your neighborhood}!linus!mbunix!dsg 
  52.  
  53.  
  54.