0

For example, I am using M-x occur, and want to edit the default regexp (which is shown in the prompt), and then enter your edited regexp. can we edit the default value ^ *[[:digit:]]\.[[:digit:]]\.[[:digit:]] + to create a new input e.g. deleting + at the end to get ^ *[[:digit:]]\.[[:digit:]]\.[[:digit:]] ?
The problem is how to move the default value into the editable region.

Thanks. enter image description here

4
  • This question is unclear. Can you elaborate and explain what you're trying to do?
    – Dan
    Commented Feb 14, 2015 at 14:26
  • Yes, please provide a recipe: just what you are doing (commands, keys, code). And what you see vs what you expect to see.
    – Drew
    Commented Feb 14, 2015 at 14:45
  • Your edit is still unclear. There is no such thing as a "minibar" in Emacs, but there is a minibuffer -- is that what you mean? You need to explain what you mean by a "default value" and what command is supplying it -- your screenshot suggests that it's occur.
    – Dan
    Commented Feb 14, 2015 at 14:49
  • @Dan: Thanks. Edited again according to what Drew thought. Thanks, Drew.
    – Tim
    Commented Feb 14, 2015 at 14:51

1 Answer 1

1

Judging from the (hard-to-read) prompt, it looks like you are using something like M-x occur. And I'm guessing that you want to edit the default regexp (which is shown in the prompt), and then enter your edited regexp.

If so, i.e., if the question is how to get the default value for minibuffer input into the minibuffer, then the answer is to use M-n. If more than one default value is available, you can repeat M-n to cycle through them.

2
  • Thanks. Also found: keeping typing M-n doesn't circle. M-p goes backward.
    – Tim
    Commented Feb 14, 2015 at 14:52
  • M-n cycles among the default values. As soon as there are no more to cycle through, Emacs tells you there are no more. So if there is only one then a second M-n tells you right away that there are no more. And yes, M-p' goes backward - and it continues past any default values you might have cycled through, on to your past inputs. That is, M-p` goes through your minibuffer input history.
    – Drew
    Commented Feb 14, 2015 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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