Article View: gnu.emacs.bug
Article #1024list-directory bug
From: Wolfgang Rupprecht
Date: Thu, 29 Sep 1988 03:31
Date: Thu, 29 Sep 1988 03:31
46 lines
2105 bytes
2105 bytes
In GNU Emacs 18.52.6 of Tue Sep 20 1988 on mgm.mit.edu (berkeley-unix)
seen under 4.3 BSD.
There is a small bug in list-directory that will lead to an incorrect
*Directory* buffer. If the requested directory doesn't exist, then
the contents of the CURRENT directory will be listed, along with a
legend that claims that the contents are from the requested directory.
To demonstrate run:
(list-directory "/foo/") ; where dir /foo doesn't exist.
This patch will fix the problem.
cd /u/src/gnuemacs-18.52/lisp/
diff -c files.el.~1~ files.el
*** files.el.~1~ Mon Aug 8 08:16:09 1988
--- files.el Wed Sep 28 23:23:42 1988
***************
*** 967,976 ****
(call-process "ls" nil standard-output nil
switches dirname)
(let ((default-directory (file-name-directory dirname)))
! (call-process shell-file-name nil standard-output nil
! "-c" (concat "exec ls "
! switches " "
! (file-name-nondirectory dirname))))))))
(defun save-buffers-kill-emacs (&optional arg)
"Offer to save each buffer, then kill this Emacs fork.
--- 967,979 ----
(call-process "ls" nil standard-output nil
switches dirname)
(let ((default-directory (file-name-directory dirname)))
! (if (file-exists-p default-directory)
! (call-process shell-file-name nil standard-output nil
! "-c" (concat "exec ls "
! switches " "
! (file-name-nondirectory dirname)))
! (princ "No such file or directory")
! (terpri)))))))
(defun save-buffers-kill-emacs (&optional arg)
"Offer to save each buffer, then kill this Emacs fork.
diff exited abnormally with code 1 at Wed Sep 28 23:24:05
Technical Details
Message-ID:
<8809290331.AA25367@MGM.MIT.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!labrea!rutgers!tut.cis.ohio-state.edu!MGM.MIT.EDU!wolfgangShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!labrea!rutgers!tut.cis.ohio-state.edu!MGM.MIT.EDU!wolfgang From: wolfgang@MGM.MIT.EDU (Wolfgang Rupprecht) Newsgroups: gnu.emacs.bug Subject: list-directory bug Message-ID: <8809290331.AA25367@MGM.MIT.EDU> Date: 29 Sep 88 03:31:03 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: Freelance Software Consultant, Boston, Ma. Lines: 46