help-gnu-emacs
[Top][All Lists]
Advanced

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

ido.el - changing root of prompt


From: Barney Dalton
Subject: ido.el - changing root of prompt
Date: Thu, 13 Feb 2003 13:19:27 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130


I use ido-find-file all the time in place of the standard find file. In the case where it can't locate a file for me I'd like to be able to give it some help. Due to the nature of my directory structures this is often a case of only changing the root of the directory. i.e. If I'm editing: 'f:/source/b/c/x.cpp' I need to find the matching header file which may be in 'f:headers/b/c/x.h'. Another example is that I need to see the same file but on a different drive. i.e. I want to switch from 'f:/source/b/c/x.cpp' to 'g:/source/b/c/x.cpp'.

At the moment I can do this by going C-xC-f and then C-e to edit (replace root part of dir) and press RET to get back to the find-file prompt. I have a function that does the search and replace for me.

Ideally I'd want to be able to perform this substitution without having to go via the edit buffer but the ido minibuffer is read only so I can't edit it from my function. If I try and call ido-edit-input from within a defun then the rest of the function never gets called. I guess this is something to do with the exit-minibuffer function that ido-edit-input calls - I don't know enough lisp to understand what this does though.

So to summarise: How do write a function that can change the directory that ido-find-file is currnently working from. The function needs to be callable via a key-binding from the ido minibuffer.

thanks
Barney





reply via email to

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