unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: ido, Ibuffer, and dropping into Dired
Date: Sun, 15 May 2005 01:04:13 +0200	[thread overview]
Message-ID: <m3sm0p9zpu.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <871x894neg.fsf@wigwam.deepwood.net> (Daniel Brockman's message of "Sat, 14 May 2005 21:29:11 +0200")

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

  reply	other threads:[~2005-05-14 23:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-14 19:29 ido, Ibuffer, and dropping into Dired Daniel Brockman
2005-05-14 23:04 ` Kim F. Storm [this message]
2005-05-15  2:56   ` Daniel Brockman
2005-05-15 23:10     ` Kim F. Storm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3sm0p9zpu.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).