From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: list-directory's current directory different than that it displays Date: Wed, 19 Jun 2002 11:30:42 -0600 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <3D10BFC2.3060608@ihs.com> References: <878z5cjcle.fsf@jidanni.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1024508063 5993 127.0.0.1 (19 Jun 2002 17:34:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 19 Jun 2002 17:34:23 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17KjLb-0001YX-00 for ; Wed, 19 Jun 2002 19:34:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17KjLg-00030X-00; Wed, 19 Jun 2002 13:34:28 -0400 Original-Received: from chx400.switch.ch ([130.59.10.2]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17KjHz-0002bu-00 for ; Wed, 19 Jun 2002 13:30:39 -0400 Original-Received: from mail.fu-berlin.de ([160.45.11.165]) by chx400.switch.ch with esmtp (Exim 3.20 #1) id 17KjHy-00039I-00 for gnu-emacs-bug@moderators.isc.org; Wed, 19 Jun 2002 19:30:38 +0200 Original-Received: by mail.fu-berlin.de (Smail3.2.0.98) from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp id ; Wed, 19 Jun 2002 19:30:37 +0200 (MEST) Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.fu-berlin.de with bsmtp id ; Wed, 19 Jun 2002 19:30:36 +0200 (MEST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: 170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 36 X-Orig-NNTP-Posting-Host: 170.207.51.80 X-Orig-X-Trace: fu-berlin.de 1024507835 9386324 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:2153 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:2153 Dan Jacobson wrote: > I still don't get why the (little used, by me at least) list-directory > command doesn't change the current directory of its buffer to the > directory that it is displaying. I mean what more relevant current > directory do you want for that buffer? This has been in list-directory since at least 19.34: (with-output-to-temp-buffer "*Directory*" (buffer-disable-undo standard-output) (princ "Directory ") (princ dirname) (terpri) (save-excursion (set-buffer "*Directory*") (setq default-directory (if (file-directory-p dirname) (file-name-as-directory dirname) (file-name-directory dirname))) (let ((wildcard (not (file-directory-p dirname)))) (insert-directory dirname switches wildcard (not wildcard))))) > At least then C-x C-d / t m p C-x o C-x d > would get us where we wanted when we realize we typed C-x C-d instead > of C-x d. Works for me. -- Kevin Rodgers