* ido, Ibuffer, and dropping into Dired
@ 2005-05-14 19:29 Daniel Brockman
2005-05-14 23:04 ` Kim F. Storm
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Brockman @ 2005-05-14 19:29 UTC (permalink / raw)
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.
This is a sketchy outline of what's going on: In the *Ibuffer*
buffer, C-x C-f is bound to `ibuffer-find-file', which sets
`default-directory' and then calls `read-file-name', which in turn
calls `ido-read-file-name'.
>From there, I can't follow the code any longer. However, I believe
that at some point, `ido-context-switch-command' is set, which causes
this line in ido.el
(define-key map "\C-d" (or (and ido-context-switch-command 'ignore) 'ido-enter-dired))
to bind C-d to 'ignore. That line certainly looks like it knows what
it's doing, but I still think this is a bug. I've been annoyed by the
current behavior several times.
--
Daniel Brockman <daniel@brockman.se>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ido, Ibuffer, and dropping into Dired
2005-05-14 19:29 ido, Ibuffer, and dropping into Dired Daniel Brockman
@ 2005-05-14 23:04 ` Kim F. Storm
2005-05-15 2:56 ` Daniel Brockman
0 siblings, 1 reply; 4+ messages in thread
From: Kim F. Storm @ 2005-05-14 23:04 UTC (permalink / raw)
Cc: emacs-devel
Daniel Brockman <daniel@brockman.se> 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 <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ido, Ibuffer, and dropping into Dired
2005-05-14 23:04 ` Kim F. Storm
@ 2005-05-15 2:56 ` Daniel Brockman
2005-05-15 23:10 ` Kim F. Storm
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Brockman @ 2005-05-15 2:56 UTC (permalink / raw)
Cc: emacs-devel
storm@cua.dk (Kim F. Storm) writes:
> Daniel Brockman <daniel@brockman.se> 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:
Yes, it does. Thank you.
--
Daniel Brockman <daniel@brockman.se>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ido, Ibuffer, and dropping into Dired
2005-05-15 2:56 ` Daniel Brockman
@ 2005-05-15 23:10 ` Kim F. Storm
0 siblings, 0 replies; 4+ messages in thread
From: Kim F. Storm @ 2005-05-15 23:10 UTC (permalink / raw)
Cc: emacs-devel
Daniel Brockman <daniel@brockman.se> writes:
>> Does the following patch give good results:
>
> Yes, it does. Thank you.
Good. Installed.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-05-15 23:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-14 19:29 ido, Ibuffer, and dropping into Dired Daniel Brockman
2005-05-14 23:04 ` Kim F. Storm
2005-05-15 2:56 ` Daniel Brockman
2005-05-15 23:10 ` Kim F. Storm
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.