Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Ok, this is probably simple to do, but I just can't find how.

When opening a file in emacs, I use: C-x C-f. Which then drops me down into the command buffer with the current path already filled out.

In previous setups (other companies), I could just hit / and it would eliminate the current path, replacing it with the root directory /. Or, I could hit ~, and it would similarly clear out the path, going to my home directory ~.

In my current setup, I do not have that feature. I would like to turn that on.

share|improve this question

2 Answers 2

You can still start by typing / or ~, and any input before that will be ignored. E.g. if the minibuffer contains /home/foo//tmp/bar.txt, then /tmp/bar.txt will be opened.

There should be visual feedback for this, showing the part that will be ignored in a dimmer colour. Check that file-name-shadow-mode is t (it is by default), and that the shadow face is considerably different from the default face. I found that I had activated a colour theme that didn't really distinguish the two, so I typed M-x customize-face RET shadow and made it darker.

I seem to remember that there is a mode that actually deletes the part of input that will be ignored, but I can't find it now...

share|improve this answer
    
I didn't know about shadow mode -- that's very helpful to know. But I would prefer the mode that deletes the ignored input (I can't find it either). –  Tim Jun 10 '13 at 22:27

It won't provide exactly the same functionality as you describe, but ido can come very close to the desired behavior. As the bonus you get better navigation through the directories and files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.