[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired "dwim" mode seems to fail now
From: |
whda |
Subject: |
Re: dired "dwim" mode seems to fail now |
Date: |
Sun, 19 Jun 2011 16:58:59 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> 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. 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:
=== modified file 'lisp/dired-aux.el'
*** lisp/dired-aux.el 2011-05-21 02:07:25 +0000
--- lisp/dired-aux.el 2011-06-19 23:33:36 +0000
*************** Optional arg HOW-TO determiness how to t
*** 1583,1589 ****
(let* ((other-win (get-window-with-predicate
(lambda (window)
(with-current-buffer (window-buffer window)
! (eq major-mode 'dired-mode)))))
(other-dir (and other-win
(with-current-buffer (window-buffer other-win)
(and (eq major-mode 'dired-mode)
--- 1583,1591 ----
(let* ((other-win (get-window-with-predicate
(lambda (window)
(with-current-buffer (window-buffer window)
! (and (eq major-mode 'dired-mode)
! (not (eq (dired-current-directory)
! this-dir)))))))
(other-dir (and other-win
(with-current-buffer (window-buffer other-win)
(and (eq major-mode 'dired-mode)
- Re: Please don't refer to Emacs as "open source", (continued)
- Re: Please don't refer to Emacs as "open source", Richard Stallman, 2011/06/18
- Re: Please don't refer to Emacs as "open source", Jambunathan K, 2011/06/17
- Re: Please don't refer to Emacs as "open source", Lennart Borgman, 2011/06/17
- Re: Please don't refer to Emacs as "open source", Jambunathan K, 2011/06/17
- Re: Please don't refer to Emacs as "open source", Jambunathan K, 2011/06/17
- Re: Please don't refer to Emacs as "open source", PJ Weisberg, 2011/06/17
- Re: Please don't refer to Emacs as "open source", Richard Stallman, 2011/06/19
- dired "dwim" mode seems to fail now, Randal L. Schwartz, 2011/06/19
- Re: dired "dwim" mode seems to fail now,
whda <=
- Re: dired "dwim" mode seems to fail now, Tim Cross, 2011/06/19
- Re: dired "dwim" mode seems to fail now, Randal L. Schwartz, 2011/06/21
- Re: dired "dwim" mode seems to fail now, martin rudalics, 2011/06/20
- Re: dired "dwim" mode seems to fail now, whda, 2011/06/20
- Re: Please don't refer to Emacs as "open source", Richard Stallman, 2011/06/17
- Re: Please don't refer to Emacs as "open source", Stephen J. Turnbull, 2011/06/19
- Re: Please don't refer to Emacs as "open source", Richard Stallman, 2011/06/20
- Re: Please don't refer to Emacs as "open source", Chong Yidong, 2011/06/15
- Re: Please don't refer to Emacs as "open source", Miles Bader, 2011/06/16
- Re: Please don't refer to Emacs as "open source", David Kastrup, 2011/06/16