0

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.

2 Answers 2

4

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...

1
  • 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, 2013 at 22:27
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .