From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: whda@csua.berkeley.edu Newsgroups: gmane.emacs.devel Subject: Re: dired "dwim" mode seems to fail now Date: Mon, 20 Jun 2011 16:37:11 -0700 Message-ID: References: <010001cc29eb$fc806cb0$f5814610$@cs.ua.edu> <87vcw9ksdd.fsf@uwakimon.sk.tsukuba.ac.jp> <87hb7rlmjt.fsf@uwakimon.sk.tsukuba.ac.jp> <87boxxlpkf.fsf@uwakimon.sk.tsukuba.ac.jp> <87wrgl3cxx.fsf@fencepost.gnu.org> <861uyp4n1v.fsf_-_@red.stonehenge.com> <4DFF0C23.6040809@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1308613053 7941 80.91.229.12 (20 Jun 2011 23:37:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2011 23:37:33 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 21 01:37:30 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QYo25-0005dd-T5 for ged-emacs-devel@m.gmane.org; Tue, 21 Jun 2011 01:37:30 +0200 Original-Received: from localhost ([::1]:54953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYo24-0002Ew-SR for ged-emacs-devel@m.gmane.org; Mon, 20 Jun 2011 19:37:28 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYo1o-0002Ek-J3 for emacs-devel@gnu.org; Mon, 20 Jun 2011 19:37:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYo1n-0007P4-3l for emacs-devel@gnu.org; Mon, 20 Jun 2011 19:37:12 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:51876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYo1m-0007Om-Qt for emacs-devel@gnu.org; Mon, 20 Jun 2011 19:37:11 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QYo1l-0005VR-Nj for emacs-devel@gnu.org; Tue, 21 Jun 2011 01:37:09 +0200 Original-Received: from natasha.mozilla.net ([72.44.210.220]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Jun 2011 01:37:09 +0200 Original-Received: from whda by natasha.mozilla.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Jun 2011 01:37:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: natasha.mozilla.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:eIT8zGprNIMyhVzBTRCZdk680K0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:140747 Archived-At: >>> Some time in the past few weeks, dired-dwim-target mode seems to have >>> forgotten how to work (it's not offering the directory of the other >>> buffer in the same window as a prefix). I haven't had a chance to >>> narrow the commit down, but if that rings a bell for anyone, consider >>> this a nudge. >> >> I didn't look at commits, but it seems `dired-dwim-target-directory' >> calls `get-window-with-predicate' in such a way that the first window >> returned is possibly the current window itself. It seems the >> (unspecified?) order in which `get-window-with-predicate' tests windows >> may have changed. > >That's been the case, indeed. Thanks for catching this. I've now tried >to restore the previous behavior. Please try again. Confirmed to be working as before. >> I think the solution is to exclude from consideration >> dired buffers that have the same current directory as the current >> window. This seems most consistent with the current (23.2) stable emacs. >> >> The real problem might be with window.el though. dired-aux.el hasn't >> changed recently. >> >> Patch: > >I think installing your patch is a good idea anyway. There's no good >reason to _not_ return the selected window as first window provided it >satisfies `get-window-with-predicate'. Indeed. As I can't actually install the patch can someone else do it? >Thanks again for finding this, martin > > >PS: I now also restored the old behavior of `get-buffer-window-list' so >it starts with the selected window. As a consequence, windows on the >selected frame that come before the selected window will be listed after >windows on other frames. But as the present example shows it's better >to remain compatible with Emacs 23.