all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sam Halliday <sam.halliday@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: ido-find-file
Date: Sat, 26 Dec 2015 16:00:13 -0800 (PST)	[thread overview]
Message-ID: <49d64550-5636-4ede-b124-6d04b874d1d7@googlegroups.com> (raw)
In-Reply-To: <97862b00-5aef-44c9-a845-f66fd05d9e2d@googlegroups.com>

On Saturday, 26 December 2015 23:49:01 UTC, Sam Halliday  wrote:
> On Saturday, 26 December 2015 23:27:44 UTC, Sam Halliday  wrote:
> > On Saturday, 26 December 2015 23:20:00 UTC, Sam Halliday  wrote:
> > > Dear Emacs users,
> > > 
> > > I have been trying out ido-find-file as a replacement for find-file and it was going really well until I tried to open a directory in dired.
> > > 
> > > The default in normal find-file is for RET to open a directory in dired, but with ido-find-file, RET will open a (useless) buffer containing the name of the files in that directory and C-d is needed to open the directory in dired.
> > > 
> > > There is no way I'm going to be able to retrain my fingers to do that, and it is also undesirable behaviour. Is there any way to get ido-find-file to DWIM?
> > 
> > 
> > I found this hack from JohnWiegley http://www.emacswiki.org/emacs/InteractivelyDoThings#toc29 which does the job but is really quite ugly/long. It would be good if this was in the mainline and possible the default.
> > 
> >  (defun ido-smart-select-text ()
> >     "Select the current completed item.  Do NOT descend into directories."
> >     (interactive)
> >     (when (and (or (not ido-require-match)
> >                    (if (memq ido-require-match
> >                              '(confirm confirm-after-completion))
> >                        (if (or (eq ido-cur-item 'dir)
> >                                (eq last-command this-command))
> >                            t
> >                          (setq ido-show-confirm-message t)
> >                          nil))
> >                    (ido-existing-item-p))
> >                (not ido-incomplete-regexp))
> >       (when ido-current-directory
> >         (setq ido-exit 'takeprompt)
> >         (unless (and ido-text (= 0 (length ido-text)))
> >           (let ((match (ido-name (car ido-matches))))
> >             (throw 'ido
> >                    (setq ido-selected
> >                          (if match
> >                              (replace-regexp-in-string "/\\'" "" match)
> >                            ido-text)
> >                          ido-text ido-selected
> >                          ido-final-text ido-text)))))
> >       (exit-minibuffer)))
> >   
> >   (eval-after-load "ido"
> >     '(define-key ido-common-completion-map "\C-m" 'ido-smart-select-text))
> 
> actually this hack doesn't do what I want. All I want is for ido-find-file to open up directories in dired instead of this functionless Fundamental mode it drops me into if I press RET when I select a directory.

Another Sacha fix... (setq ido-show-dot-for-dired t) does exactly what I wanted. Sorry for the noise!


  parent reply	other threads:[~2015-12-27  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-26 23:19 ido-find-file Sam Halliday
2015-12-26 23:27 ` ido-find-file Sam Halliday
2015-12-26 23:48   ` ido-find-file Sam Halliday
2015-12-26 23:51     ` ido-find-file Sam Halliday
2015-12-27  0:00     ` Sam Halliday [this message]
2015-12-26 23:35 ` ido-find-file Dmitry Gutov

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

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

  git send-email \
    --in-reply-to=49d64550-5636-4ede-b124-6d04b874d1d7@googlegroups.com \
    --to=sam.halliday@gmail.com \
    --cc=help-gnu-emacs@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 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.