I have the following problem : when i use 'C-x r t' (string-rectangle), i am prompted to enter some string, to replace the selected rectangle. Lets say i type ";;" (to comment out the rectangle). This works just fine, but the next time i call the same function, and i want to replace with nothing (empty string), i can not do that, because there is "default" string ";;" that i previously used, and if i just hit enter the command will use that ";;" string instead of empty one. How do i set it to empty string ?
Similar problem i had with some search/replace functions. Basicaly, when it remembers the last string i used, and sets it to default, how do i "enter" empty string instead ?
Kill-rectangle, mentioned by YoungFrog solves the specific problem, but i had another thing in mind : basicaly, in what ever function emacs remembers the last value you entered, and uses it as "default" when you just hit enter, you should be able to clear that "default" to whatever was real default before you first used the function. Here is another example :
In dired mode, if you 'M-x rgrep' it asks you for 3 inputs :
1) What to search for : whatever you enter here, will be used as default next time you use rgrep. As someone pointed out, it makes no sense to search for empty string, so clearing this "default" value is indeed never needed i guess.
2) Next it will ask in what files to search for. It's real default is "all" files. If i enter *.txt, and search, next time when i use rgrep, *.txt will be used as "default". Now i wish to clear this "default" *.txt, and return to its original default, "all", just as i wanted to clear ";;" "default" in string-rectangle function to it's real default, empty string.
Of course, this specific problem for all files could probably be solved with typing * ? But this general problem potentialy remains with other commands that remember last used value.
3) It will next ask for Base directory, no problem here.
So, the way i see it, whenever emacs tries to help me by remembering my last used value in some command (which i find very helpful most of the time) there should be a way to clear that used value as if i never used that command before.
P.S. I am still new to emacs, and perhaps the functionality i require is not needed, as there is always some workaround ?