Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to quickly delete all text in emacs' minibuffer?

I'm new to Emacs. I run emacs on Windows. When I start Emacs by click the runemacs.exe, I got a welcome window. Now to create a new file and do some experiment editing, I press C-x C-f. Now the minibuffer shows something similar to:

Find file: d:\emacs-23.3\bin

Normally I need to press backspace some time to delete d:\emacs-23\bin and type a new file name like c:\test\a.txt. My question is, how can I quickly delete d:\emacs-23\bin? How do you deal with the welcome window (I don't like it)?

Thanks

like image 431
Just a learner Avatar asked Jun 15 '11 09:06

Just a learner


2 Answers

backward-kill-sentence is bound to C-x DEL by default.

Alternatively, you could type C-a C-k which I find slightly easier to type because

  1. you don't have to release the CTRL key before hitting the third key.
  2. your right hand does not have to leave the home row

This key combination first moves point (aka the cursor) to the beginning of the line, and then kills the line. So it's actually two commands, but it's the same amount of key strokes.

like image 50
Thomas Avatar answered Sep 27 '22 16:09

Thomas


You don't need to delete the default filename. Just continue to enter your file

d:\emacs-23.3\bin\c:\test\a.txt
like image 22
Oleg Pavliv Avatar answered Sep 27 '22 16:09

Oleg Pavliv