emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ido, Ibuffer, and dropping into Dired


From: Kim F. Storm
Subject: Re: ido, Ibuffer, and dropping into Dired
Date: Sun, 15 May 2005 01:04:13 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Daniel Brockman <address@hidden> writes:

> Not really sure whether this is a bug or a strange feature, but here's
> how to reproduce it:
>
>  1. Enable `ido-mode' and `ido-everywhere' via customize.
>  2. Type C-x C-f and verify that C-d drops you into dired.
>  3. Enter Ibuffer using M-x ibuffer RET.
>  4. Type C-x C-f and note how C-d is now bound to 'ignore.
>
> I don't see any reason why it should not be possible to drop into
> Dired just because C-x C-f was typed in the *Ibuffer* buffer.

Does the following patch give good results:

*** ido.el      06 May 2005 00:14:45 +0200      1.55
--- ido.el      15 May 2005 01:01:23 +0200      
***************
*** 4077,4082 ****
--- 4138,4144 ----
  ;;; Helper functions for other programs
  
  (put 'dired-do-rename 'ido 'ignore)
+ (put 'ibuffer-find-file 'ido 'find-file)
  
  ;;;###autoload
  (defun ido-read-buffer (prompt &optional default require-match)
***************
*** 4111,4117 ****
           (not (memq this-command ido-read-file-name-non-ido))
           (or (null predicate) (eq predicate 'file-exists-p)))
        (let* (ido-saved-vc-hb
!            (ido-context-switch-command 'ignore)
             (vc-handled-backends (and (boundp 'vc-handled-backends) 
vc-handled-backends))
             (ido-current-directory (ido-expand-directory dir))
             (ido-directory-nonreadable (not (file-readable-p 
ido-current-directory)))
--- 4173,4180 ----
           (not (memq this-command ido-read-file-name-non-ido))
           (or (null predicate) (eq predicate 'file-exists-p)))
        (let* (ido-saved-vc-hb
!            (ido-context-switch-command
!             (if (eq (get this-command 'ido) 'find-file) nil 'ignore))
             (vc-handled-backends (and (boundp 'vc-handled-backends) 
vc-handled-backends))
             (ido-current-directory (ido-expand-directory dir))
             (ido-directory-nonreadable (not (file-readable-p 
ido-current-directory)))
***************
*** 4126,4131 ****
--- 4189,4196 ----
        (cond
         ((eq ido-exit 'fallback)
          (setq filename 'fallback))
+        ((eq ido-exit 'dired)
+         (setq filename ido-current-directory))
         (filename
          (setq filename
                (concat ido-current-directory filename))))))

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]